@@ -29,7 +29,7 @@ import (
2929
3030// invalidateDelegateTime is the Unix timestamp for August 2nd, 2025, midnight Eastern Time
3131// (August 2nd, 2025, 04:00 UTC)
32- const invalidateDelegateUnix = 1754107200
32+ const InvalidateDelegateUnix = 1754107200
3333
3434// P256VerifyAddress is the address of the p256 signature verification precompile
3535var P256VerifyAddress = common .BytesToAddress ([]byte {0x1 , 0x00 })
@@ -139,12 +139,14 @@ func makePrecompile(contract contract.StatefulPrecompiledContract) libevm.Precom
139139 },
140140 }
141141
142- callType := env .IncomingCallType ()
143- isDissallowedCallType := callType == vm .DelegateCall || callType == vm .CallCode
144- if env .BlockTime () >= invalidateDelegateUnix {
145- if isDissallowedCallType {
146- env .InvalidateExecution (fmt .Errorf ("precompile cannot be called with %s" , callType ))
147- }
142+ switch call := env .IncomingCallType (); {
143+ case call != vm .DelegateCall && call != vm .CallCode : // Others always allowed
144+ case rules .IsGranite :
145+ return nil , 0 , vm .ErrExecutionReverted
146+ case env .BlockTime () >= InvalidateDelegateUnix :
147+ env .InvalidateExecution (fmt .Errorf ("precompile cannot be called with %s" , call ))
148+ default :
149+ // Otherwise, we allow the precompile to be called
148150 }
149151
150152 // EVM semantic addresses are used here to maintain consistency with prior behavior as present in AvalancheGo 1.13.0.
0 commit comments