aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm.go
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-11-23 20:46:35 -0500
committerAaron Buchwald <[email protected]>2020-12-15 10:46:26 -0500
commit368844ad2a28ec07848e3c0169cf2b83b579a2e8 (patch)
tree0b3956351add28aed944824eb45ffb2723809dba /plugin/evm/vm.go
parent2d0a37c6490dc9a4ec36ee4ebbed01c790f0426a (diff)
Add native asset precompiled contracts for apricot release
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r--plugin/evm/vm.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index c9bdad9..fc571b9 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -239,6 +239,15 @@ func (vm *VM) Initialize(
return err
}
+ // Set the Apricot Fork Block on the ChainConfig
+ // TODO switch to correct block number of the fork
+ switch {
+ case g.Config.ChainID.Cmp(params.AvalancheMainnetChainID) == 0:
+ g.Config.ApricotBlock = nil
+ case g.Config.ChainID.Cmp(params.AvalancheFujiChainID) == 0:
+ g.Config.ApricotBlock = nil
+ }
+
vm.acceptedDB = prefixdb.New([]byte(acceptedPrefix), db)
vm.chainID = g.Config.ChainID