Update contracts.go

This commit is contained in:
Felix Lange 2025-06-05 16:07:56 +02:00 committed by GitHub
parent 9caab0d8de
commit 51f8da1d6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -441,7 +441,8 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 {
maxLenOver32 := gas.Cmp(big32) > 0
if c.eip2565 {
// EIP-2565 has three changes
// EIP-2565 (Berlin fork) has three changes:
//
// 1. Different multComplexity (inlined here)
// in EIP-2565 (https://eips.ethereum.org/EIPS/eip-2565):
//
@ -472,7 +473,7 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 {
return max(minPrice, gas.Uint64())
}
// Pre-osaka logic.
// Pre-Berlin logic.
gas = modexpMultComplexity(gas)
if adjExpLen.Cmp(big1) > 0 {
gas.Mul(gas, adjExpLen)