@@ -11,6 +11,7 @@ import (
1111 "github.com/ethereum/go-ethereum/core/systemcontracts/bohr"
1212 "github.com/ethereum/go-ethereum/core/systemcontracts/bruno"
1313 "github.com/ethereum/go-ethereum/core/systemcontracts/euler"
14+ "github.com/ethereum/go-ethereum/core/systemcontracts/fermi"
1415 "github.com/ethereum/go-ethereum/core/systemcontracts/feynman"
1516 feynmanFix "github.com/ethereum/go-ethereum/core/systemcontracts/feynman_fix"
1617 "github.com/ethereum/go-ethereum/core/systemcontracts/gibbs"
9293 lorentzUpgrade = make (map [string ]* Upgrade )
9394
9495 maxwellUpgrade = make (map [string ]* Upgrade )
96+
97+ fermiUpgrade = make (map [string ]* Upgrade )
9598)
9699
97100func init () {
@@ -1019,6 +1022,40 @@ func init() {
10191022 },
10201023 },
10211024 }
1025+
1026+ // TODO(Nathan): update the Url once contracts merged into master branch for fermi hardfork
1027+ fermiUpgrade [mainNet ] = & Upgrade {
1028+ UpgradeName : "fermi" ,
1029+ Configs : []* UpgradeConfig {
1030+ {
1031+ ContractAddr : common .HexToAddress (StakeHubContract ),
1032+ CommitUrl : "https://github.com/allformless/bsc-genesis-contract/commit/62a516e06b73cff04a3f46a615c5d804753a2d29" ,
1033+ Code : fermi .MainnetStakeHubContract ,
1034+ },
1035+ },
1036+ }
1037+
1038+ fermiUpgrade [chapelNet ] = & Upgrade {
1039+ UpgradeName : "fermi" ,
1040+ Configs : []* UpgradeConfig {
1041+ {
1042+ ContractAddr : common .HexToAddress (StakeHubContract ),
1043+ CommitUrl : "https://github.com/allformless/bsc-genesis-contract/commit/62a516e06b73cff04a3f46a615c5d804753a2d29" ,
1044+ Code : fermi .ChapelStakeHubContract ,
1045+ },
1046+ },
1047+ }
1048+
1049+ fermiUpgrade [rialtoNet ] = & Upgrade {
1050+ UpgradeName : "fermi" ,
1051+ Configs : []* UpgradeConfig {
1052+ {
1053+ ContractAddr : common .HexToAddress (StakeHubContract ),
1054+ CommitUrl : "https://github.com/allformless/bsc-genesis-contract/commit/62a516e06b73cff04a3f46a615c5d804753a2d29" ,
1055+ Code : fermi .RialtoStakeHubContract ,
1056+ },
1057+ },
1058+ }
10221059}
10231060
10241061func TryUpdateBuildInSystemContract (config * params.ChainConfig , blockNumber * big.Int , lastBlockTime uint64 , blockTime uint64 , statedb vm.StateDB , atBlockBegin bool ) {
@@ -1134,6 +1171,10 @@ func upgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.I
11341171 applySystemContractUpgrade (maxwellUpgrade [network ], blockNumber , statedb , logger )
11351172 }
11361173
1174+ if config .IsOnFermi (blockNumber , lastBlockTime , blockTime ) {
1175+ applySystemContractUpgrade (fermiUpgrade [network ], blockNumber , statedb , logger )
1176+ }
1177+
11371178 /*
11381179 apply other upgrades
11391180 */
0 commit comments