@@ -430,16 +430,17 @@ type ChainConfig struct {
430430
431431 // Fork scheduling was switched from blocks to timestamps here
432432
433- ShanghaiTime * uint64 `json:"shanghaiTime,omitempty"` // Shanghai switch time (nil = no fork, 0 = already on shanghai)
434- CancunTime * uint64 `json:"cancunTime,omitempty"` // Cancun switch time (nil = no fork, 0 = already on cancun)
435- PragueTime * uint64 `json:"pragueTime,omitempty"` // Prague switch time (nil = no fork, 0 = already on prague)
436- OsakaTime * uint64 `json:"osakaTime,omitempty"` // Osaka switch time (nil = no fork, 0 = already on osaka)
437- VerkleTime * uint64 `json:"verkleTime,omitempty"` // Verkle switch time (nil = no fork, 0 = already on verkle)
438- BPO1Time * uint64 `json:"bpo1Time,omitempty"` // BPO1 switch time (nil = no fork, 0 = already on bpo1)
439- BPO2Time * uint64 `json:"bpo2Time,omitempty"` // BPO2 switch time (nil = no fork, 0 = already on bpo2)
440- BPO3Time * uint64 `json:"bpo3Time,omitempty"` // BPO3 switch time (nil = no fork, 0 = already on bpo3)
441- BPO4Time * uint64 `json:"bpo4Time,omitempty"` // BPO4 switch time (nil = no fork, 0 = already on bpo4)
442- BPO5Time * uint64 `json:"bpo5Time,omitempty"` // BPO5 switch time (nil = no fork, 0 = already on bpo5)
433+ ShanghaiTime * uint64 `json:"shanghaiTime,omitempty"` // Shanghai switch time (nil = no fork, 0 = already on shanghai)
434+ CancunTime * uint64 `json:"cancunTime,omitempty"` // Cancun switch time (nil = no fork, 0 = already on cancun)
435+ PragueTime * uint64 `json:"pragueTime,omitempty"` // Prague switch time (nil = no fork, 0 = already on prague)
436+ OsakaTime * uint64 `json:"osakaTime,omitempty"` // Osaka switch time (nil = no fork, 0 = already on osaka)
437+ AmsterdamTime * uint64 `json:"amsterdamTime,omitempty"` // Amsterdam switch time (nil = no fork, 0 = already on amsterdam)
438+ VerkleTime * uint64 `json:"verkleTime,omitempty"` // Verkle switch time (nil = no fork, 0 = already on verkle)
439+ BPO1Time * uint64 `json:"bpo1Time,omitempty"` // BPO1 switch time (nil = no fork, 0 = already on bpo1)
440+ BPO2Time * uint64 `json:"bpo2Time,omitempty"` // BPO2 switch time (nil = no fork, 0 = already on bpo2)
441+ BPO3Time * uint64 `json:"bpo3Time,omitempty"` // BPO3 switch time (nil = no fork, 0 = already on bpo3)
442+ BPO4Time * uint64 `json:"bpo4Time,omitempty"` // BPO4 switch time (nil = no fork, 0 = already on bpo4)
443+ BPO5Time * uint64 `json:"bpo5Time,omitempty"` // BPO5 switch time (nil = no fork, 0 = already on bpo5)
443444
444445 // TerminalTotalDifficulty is the amount of total difficulty reached by
445446 // the network that triggers the consensus upgrade.
@@ -698,6 +699,11 @@ func (c *ChainConfig) IsOsaka(num *big.Int, time uint64) bool {
698699 return c .IsLondon (num ) && isTimestampForked (c .OsakaTime , time )
699700}
700701
702+ // IsAmsterdam returns whether time is either equal to the Amsterdam fork time or greater.
703+ func (c * ChainConfig ) IsAmsterdam (num * big.Int , time uint64 ) bool {
704+ return c .IsLondon (num ) && isTimestampForked (c .AmsterdamTime , time )
705+ }
706+
701707// IsVerkle returns whether time is either equal to the Verkle fork time or greater.
702708func (c * ChainConfig ) IsVerkle (num * big.Int , time uint64 ) bool {
703709 return c .IsLondon (num ) && isTimestampForked (c .VerkleTime , time )
@@ -1225,13 +1231,13 @@ func (err *ConfigCompatError) Error() string {
12251231// Rules is a one time interface meaning that it shouldn't be used in between transition
12261232// phases.
12271233type Rules struct {
1228- ChainID * big.Int
1229- IsHomestead , IsEIP150 , IsEIP155 , IsEIP158 bool
1230- IsEIP2929 , IsEIP4762 bool
1231- IsByzantium , IsConstantinople , IsPetersburg , IsIstanbul bool
1232- IsBerlin , IsLondon bool
1233- IsMerge , IsShanghai , IsCancun , IsPrague , IsOsaka bool
1234- IsVerkle bool
1234+ ChainID * big.Int
1235+ IsHomestead , IsEIP150 , IsEIP155 , IsEIP158 bool
1236+ IsEIP2929 , IsEIP4762 bool
1237+ IsByzantium , IsConstantinople , IsPetersburg , IsIstanbul bool
1238+ IsBerlin , IsLondon bool
1239+ IsMerge , IsShanghai , IsCancun , IsPrague , IsOsaka , IsAmsterdam bool
1240+ IsVerkle bool
12351241}
12361242
12371243// Rules ensures c's ChainID is not nil.
@@ -1261,6 +1267,7 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
12611267 IsCancun : isMerge && c .IsCancun (num , timestamp ),
12621268 IsPrague : isMerge && c .IsPrague (num , timestamp ),
12631269 IsOsaka : isMerge && c .IsOsaka (num , timestamp ),
1270+ IsAmsterdam : isMerge && c .IsAmsterdam (num , timestamp ),
12641271 IsVerkle : isVerkle ,
12651272 IsEIP4762 : isVerkle ,
12661273 }
0 commit comments