Gets code of an account, returning early if it’s not a delegated account, otherwise
Returns tuple (is_delegated, eip7702_cost, code_address, code).
Notice that it also inserts the delegated account to the “accessed accounts” set.
Compute (regular, state) intrinsic gas for a transaction without needing
a full VM instance. Mirrors VM::get_intrinsic_gas but operates on the raw
transaction, fork, and block gas limit (for cpsb derivation). Pre-Amsterdam
returns (regular, 0).
Standalone EIP-7623/7976/7981 floor gas for a transaction. Mirrors
VM::get_min_gas_used but operates on the raw transaction + fork, so it
can be called by mempool admission / the payload builder without needing a
VM instance. Returns TX_BASE_COST + floor_rate * total_floor_tokens.
Restore the state of the cache to the state it in the callframe backup.
Also restores BAL recorder state changes (but not touched_addresses) per EIP-7928.
Converts a U256 value into usize, returning an error if the value is over 32 bits
This is generally used for memory offsets and sizes, 32 bits is more than enough for this purpose.