diff --git a/core/state_transition.go b/core/state_transition.go index daa278d2e9..2dc8985455 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -863,9 +863,9 @@ func (st *stateTransition) chargeCallRecipientEIP2780(value *uint256.Int) bool { to = *st.msg.To ) // EIP-8037: a value transfer to an empty recipient charges NEW_ACCOUNT - // state gas — except for precompiles, which are protocol-inherent and not - // "created" by the transfer, so the charge is suppressed for them. - if !value.IsZero() && st.state.Empty(to) && !st.evm.IsPrecompile(to) { + // state gas. As of EIP-2780 spec update #3048 this also applies to + // precompiles (a value transfer to a zero-balance precompile is charged). + if !value.IsZero() && st.state.Empty(to) { cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte } if _, ok := types.ParseDelegation(st.state.GetCode(to)); ok { diff --git a/core/vm/evm.go b/core/vm/evm.go index f542ff6eac..c86704c54c 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -46,13 +46,6 @@ func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { return p, ok } -// IsPrecompile reports whether addr is an active precompile for the current -// fork ruleset. -func (evm *EVM) IsPrecompile(addr common.Address) bool { - _, ok := evm.precompiles[addr] - return ok -} - // BlockContext provides the EVM with auxiliary information. Once provided // it shouldn't be modified. type BlockContext struct {