Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
Loading