diff --git a/core/vm/evm.go b/core/vm/evm.go index d5d7de0e69a0..730956b1df32 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -289,6 +289,13 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, // if caller doesn't have enough balance, it would be an error to allow // over-charging itself. So the check here is necessary. if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + // EIP-7702: Ensure delegated code is loaded into witness even when balance check fails. + // revm always loads the code regardless of balance check result. + if code := evm.StateDB.GetCode(addr); len(code) > 0 { + if target, ok := types.ParseDelegation(code); ok { + evm.StateDB.GetCode(target) + } + } return nil, gas, ErrInsufficientBalance } var snapshot = evm.StateDB.Snapshot() diff --git a/params/version.go b/params/version.go index ca702e11bf47..ed010af72ecc 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 10 // Minor version component of the current release - VersionPatch = 4 // Patch version component of the current release + VersionPatch = 5 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )