Steps 9-11 of the transaction pipeline:
Settle gas refund — the sender was debited
gas_limit * max_priceupfront. They actually owegas_used * effective_price. Refund the difference. On a successful tx the refund lands in the EVM-side db (which already reflects every side effect); on revert / out-of-gas / invalid it lands in the post-upfront, post-nonce-bump db, which also holds any EIP-7702 delegations (since EVM mutations are dropped).Coinbase reward — credit the block proposer
(effective_price - basefee) * gas_used.Build receipt + result — produce the
EEVM.TransactionResultstruct that callers consume.
Summary
Functions
Settle gas, credit the coinbase, and build the EEVM.TransactionResult.
Functions
@spec finalize( EEVM.Interpreter.MachineState.t(), non_neg_integer() | nil, EEVM.Context.Transaction.t(), binary(), EEVM.Database.t(), EEVM.Context.Block.t() ) :: {:ok, EEVM.TransactionResult.t()}
Settle gas, credit the coinbase, and build the EEVM.TransactionResult.
The database argument is the state after upfront charging, the nonce bump, and EIP-7702 authorizations; settlement starts from it when execution failed.