MCPcopy Create free account
hub / github.com/base/base / apply_pre_execution_changes

Method apply_pre_execution_changes

crates/common/evm/src/executor/block_executor.rs:131–159  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

129 type Result = BaseTxResult<E::HaltReason, <R::Transaction as TransactionEnvelope>::TxType>;
130
131 fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> {
132 self.system_caller.apply_blockhashes_contract_call(self.ctx.parent_hash, &mut self.evm)?;
133 self.system_caller
134 .apply_beacon_root_contract_call(self.ctx.parent_beacon_block_root, &mut self.evm)?;
135
136 // Ensure that the create2deployer is force-deployed at the canyon transition. Base
137 // blocks will always have at least a single transaction in them (the L1 info transaction),
138 // so we can safely assume that this will always be triggered upon the transition and that
139 // the above check for empty blocks will never be hit on Base chains.
140 canyon::ensure_create2_deployer(
141 &self.spec,
142 self.evm.block().timestamp().saturating_to(),
143 self.evm.db_mut(),
144 )
145 .map_err(BlockExecutionError::other)?;
146
147 // At the Cobalt (EIP-8130) transition, plant a code stub on the code-less
148 // enshrined system accounts (the 2D nonce manager) so the persistent state
149 // the enshrined path writes to them is not reaped by EIP-161 end-of-block
150 // state clearing.
151 crate::cobalt::ensure_eip8130_system_accounts(
152 &self.spec,
153 self.evm.block().timestamp().saturating_to(),
154 self.evm.db_mut(),
155 )
156 .map_err(BlockExecutionError::other)?;
157
158 Ok(())
159 }
160
161 fn execute_transaction_without_commit(
162 &mut self,

Callers

nothing calls this directly

Calls 5

ensure_create2_deployerFunction · 0.85
db_mutMethod · 0.80
timestampMethod · 0.45
blockMethod · 0.45

Tested by

no test coverage detected