Skip to content

Commit

Permalink
single entry point to apply post block excution changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Sep 29, 2024
1 parent 4d553cc commit 19330d3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/evm/src/system_calls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ where
Ok(())
}

/// Apply post execution changes.
pub fn apply_post_execution_changes<DB, Ext>(
&mut self,
evm: &mut Evm<'_, Ext, DB>,
) -> Result<Vec<Request>, BlockExecutionError>
where
DB: Database + DatabaseCommit,
DB::Error: Display,
{
// Collect all EIP-7685 requests
let withdrawal_requests = self.apply_withdrawal_requests_contract_call(evm)?;

// Collect all EIP-7251 requests
let consolidation_requests = self.apply_consolidation_requests_contract_call(evm)?;
Ok([withdrawal_requests, consolidation_requests].concat())
}

/// Applies the pre-block call to the EIP-2935 blockhashes contract.
pub fn pre_block_blockhashes_contract_call<DB>(
&mut self,
Expand Down

0 comments on commit 19330d3

Please sign in to comment.