From fbbdef787b4f6c64629e84ff1c03bce9d394c1df Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 15 Jan 2026 14:40:12 -0700 Subject: [PATCH] core/vm: add note about early return in gasCallEIP7702 --- core/vm/operations_acl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/vm/operations_acl.go b/core/vm/operations_acl.go index 0efd42a026..26ff411bd2 100644 --- a/core/vm/operations_acl.go +++ b/core/vm/operations_acl.go @@ -257,6 +257,10 @@ var ( ) func gasCallEIP7702(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // Return early if this call attempts to transfer value in a static context. + // Although it's checked in `gasCall`, EIP-7702 loads the target's code before + // to determine if it is resolving a delegation. This could incorrectly record + // the target in the block access list (BAL) if the call later fails. transfersValue := !stack.Back(2).IsZero() if evm.readOnly && transfersValue { return 0, ErrWriteProtection