End-to-end transaction handler.
Orchestrates the per-transaction pipeline, deferring each phase to a sibling module so the layering stays inspectable:
EEVM.Handler.Validation— decode → recover sender → validateEEVM.Handler.PreExecution— charge upfront → intrinsic gas → bump nonce → apply EIP-7702 authorizationsEEVM.Handler.Execution— top-level CALL or CREATE through the EVMEEVM.Handler.PostExecution— settle refund, credit coinbase, build result
This split mirrors revm's handler/ crate (validation.rs,
pre_execution.rs, execution.rs, post_execution.rs) and keeps each
phase independently testable.
Summary
Functions
Execute a single transaction end-to-end.
Types
@type opts() :: [ hardfork: EEVM.HardforkConfig.spec_id(), chain_id: non_neg_integer(), config: EEVM.Config.t() ]
@type wire_tx() :: EEVM.Handler.Validation.wire_tx()
Functions
@spec execute(wire_tx(), EEVM.Context.Block.t(), EEVM.Database.t(), opts()) :: {:ok, EEVM.TransactionResult.t()} | {:error, atom()}
Execute a single transaction end-to-end.
tx_or_bytes may be either raw wire bytes (legacy RLP or a typed envelope
prefix + RLP) or one of the typed EEVM.Transaction.* structs.
Options
:chain_id— chain id used when recovering the sender and checking EIP-7702 authorization tuples (default:1).:hardfork— hardfork spec id governing gas rules and EIP activation (default::cancun).:config— fully assembledEEVM.Configto use instead of deriving one from:hardfork. Takes precedence when both are provided.
Returns
{:ok, %EEVM.TransactionResult{}}for any transaction that made it past validation — including reverted ones. Inspectresult.statusto tell success from revert.{:error, reason}when decoding, sender recovery, validation, or upfront balance charging fail. The database is returned unchanged in that case.