@@ -17,12 +17,13 @@ use revm::{
1717 context_interface:: result:: ExecutionResult :: Halt ,
1818 handler:: { EthFrame , EvmTr , FrameResult , Handler } ,
1919 interpreter:: {
20- gas:: STANDARD_TOKEN_COST , CallOutcome , Gas , InstructionResult , InterpreterResult ,
20+ gas:: calculate_initial_tx_gas_for_tx, CallOutcome , Gas , InstructionResult ,
21+ InterpreterResult ,
2122 } ,
2223 state:: Bytecode ,
2324 ExecuteEvm ,
2425} ;
25- use revm_primitives:: { bytes, U256 } ;
26+ use revm_primitives:: { bytes, hardfork :: SpecId , U256 } ;
2627
2728#[ test]
2829fn test_l1_message_validate_lacking_funds ( ) -> Result < ( ) , Box < dyn core:: error:: Error > > {
@@ -228,11 +229,11 @@ fn test_l1_message_should_not_have_floor_gas_as_gas_used() -> Result<(), Box<dyn
228229 } ) ;
229230 let tx = ctx. tx . clone ( ) ;
230231 let mut evm = ctx. build_scroll ( ) ;
231- let res = evm. transact ( tx) ?;
232+ let res = evm. transact ( tx. clone ( ) ) ?;
232233
233- let tokens_in_calldata = 4 * 24 + 11 ;
234234 // floor gas is TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata + 21_000 = 22070;
235- let expected_init_gas = STANDARD_TOKEN_COST * tokens_in_calldata + 21_000 ;
235+ let expected_init_gas =
236+ calculate_initial_tx_gas_for_tx ( tx, SpecId :: SHANGHAI , true , true ) . initial_gas ;
236237
237238 assert_eq ! ( res. result, Halt { reason: HaltReason :: OutOfFunds , gas_used: expected_init_gas } ) ;
238239
0 commit comments