Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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 @@ -190,6 +190,13 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
}
// Fail if we're trying to transfer more than the available balance
if value.Sign() != 0 && !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
}
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 = 2 // Patch version component of the current release
VersionPatch = 3 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down