Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

enables cancun at EUpgrade #610

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions params/config_extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,10 @@ func getUpgradeTime(networkID uint32, upgradeTimes map[uint32]time.Time) *uint64
// genesis.
return utils.NewUint64(0)
}

// SetEVMUpgrades sets the mapped upgrades (Avalanche > EVM upgrades) for the chain config.
func (c *ChainConfig) SetEVMUpgrades() {
darioush marked this conversation as resolved.
Show resolved Hide resolved
if c.EUpgradeTime != nil {
c.CancunTime = utils.NewUint64(*c.EUpgradeTime)
}
}
2 changes: 2 additions & 0 deletions plugin/evm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ func (vm *VM) Initialize(

vm.chainID = g.Config.ChainID

g.Config.SetEVMUpgrades()

vm.ethConfig = ethconfig.NewDefaultConfig()
vm.ethConfig.Genesis = g
vm.ethConfig.NetworkId = vm.chainID.Uint64()
Expand Down
Loading