File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -594,7 +594,9 @@ impl ClientFork {
594
594
#[ derive( Clone , Debug ) ]
595
595
pub struct ClientForkConfig {
596
596
pub eth_rpc_url : String ,
597
+ /// The block number of the forked block
597
598
pub block_number : u64 ,
599
+ /// The hash of the forked block
598
600
pub block_hash : B256 ,
599
601
// TODO make provider agnostic
600
602
pub provider : Arc < RetryProvider > ,
Original file line number Diff line number Diff line change @@ -1092,3 +1092,21 @@ async fn test_fork_reset_basefee() {
1092
1092
// basefee of the forked block: <https://etherscan.io/block/18835000>
1093
1093
assert_eq ! ( latest. header. base_fee_per_gas. unwrap( ) , rU256:: from( 59017001138u64 ) ) ;
1094
1094
}
1095
+
1096
+ // <https://github.com/foundry-rs/foundry/issues/6795>
1097
+ #[ tokio:: test( flavor = "multi_thread" ) ]
1098
+ async fn test_arbitrum_fork_dev_balance ( ) {
1099
+ let ( api, handle) = spawn (
1100
+ fork_config ( )
1101
+ . with_fork_block_number ( None :: < u64 > )
1102
+ . with_eth_rpc_url ( Some ( "https://arb1.arbitrum.io/rpc" . to_string ( ) ) ) ,
1103
+ )
1104
+ . await ;
1105
+
1106
+ let accounts: Vec < _ > = handle. dev_wallets ( ) . collect ( ) ;
1107
+ for acc in accounts {
1108
+ let balance =
1109
+ api. balance ( acc. address ( ) . to_alloy ( ) , Some ( Default :: default ( ) ) ) . await . unwrap ( ) ;
1110
+ assert_eq ! ( balance, rU256:: from( 100000000000000000000u128 ) ) ;
1111
+ }
1112
+ }
You can’t perform that action at this time.
0 commit comments