From 9d655c4824a2b301a8768994f2016473266e79f6 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Thu, 18 Jan 2024 19:35:43 +0100 Subject: [PATCH] set deduct_caller in optimism handler (#988) --- crates/revm/src/optimism/handler_register.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/revm/src/optimism/handler_register.rs b/crates/revm/src/optimism/handler_register.rs index b0a5c91cdd..4dc9691ef7 100644 --- a/crates/revm/src/optimism/handler_register.rs +++ b/crates/revm/src/optimism/handler_register.rs @@ -20,7 +20,8 @@ pub fn optimism_handle_register(handler: &mut EvmHandler<'_, spec_to_generic!(handler.spec_id, { // Refund is calculated differently then mainnet. handler.execution_loop.first_frame_return = Arc::new(handle_call_return::); - // we reimburse caller the same was as in mainnet. + // An estimated batch cost is charged from the caller and added to L1 Fee Vault. + handler.pre_execution.deduct_caller = Arc::new(deduct_caller::); handler.post_execution.reward_beneficiary = Arc::new(reward_beneficiary::); // In case of halt of deposit transaction return Error. handler.post_execution.output = Arc::new(output::);