diff --git a/crates/blockifier/src/transaction/transaction_execution.rs b/crates/blockifier/src/transaction/transaction_execution.rs index e6bf862ba92..ec2a7aeac6a 100644 --- a/crates/blockifier/src/transaction/transaction_execution.rs +++ b/crates/blockifier/src/transaction/transaction_execution.rs @@ -144,7 +144,8 @@ impl ExecutableTransaction for L1HandlerTransaction { let limit_steps_by_resources = false; let mut context = EntryPointExecutionContext::new_invoke(tx_context.clone(), limit_steps_by_resources); - let mut remaining_gas = tx_context.initial_sierra_gas().0; + // The Sierra gas limit for L1 handler transaction is set to max_execute_sierra_gas. + let mut remaining_gas = context.mode_sierra_gas_limit().0; let execute_call_info = self.run_execute(state, &mut context, &mut remaining_gas)?; let l1_handler_payload_size = self.payload_size(); let TransactionReceipt { diff --git a/crates/blockifier/src/transaction/transactions_test.rs b/crates/blockifier/src/transaction/transactions_test.rs index a46db4032a9..534cc6c0498 100644 --- a/crates/blockifier/src/transaction/transactions_test.rs +++ b/crates/blockifier/src/transaction/transactions_test.rs @@ -2354,7 +2354,7 @@ fn test_l1_handler(#[values(false, true)] use_kzg_da: bool) { storage_address: contract_address, caller_address: ContractAddress::default(), call_type: CallType::Call, - initial_gas: initial_gas_amount_from_block_context(Some(block_context)).0, + initial_gas: block_context.versioned_constants.execute_max_sierra_gas.0, }, execution: CallExecution { retdata: Retdata(vec![value]),