Skip to content

Commit

Permalink
set deduct_caller in optimism handler (bluealloy#988)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wollac committed Jan 18, 2024
1 parent b330f14 commit 9d655c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/revm/src/optimism/handler_register.rs
Expand Up @@ -20,7 +20,8 @@ pub fn optimism_handle_register<DB: Database, EXT>(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::<SPEC>);
// 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::<SPEC, EXT, DB>);
handler.post_execution.reward_beneficiary = Arc::new(reward_beneficiary::<SPEC, EXT, DB>);
// In case of halt of deposit transaction return Error.
handler.post_execution.output = Arc::new(output::<SPEC, EXT, DB>);
Expand Down

0 comments on commit 9d655c4

Please sign in to comment.