2020-08-06 23:27:24 +08:00
|
|
|
package systemcontracts
|
2020-06-30 19:51:41 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/hex"
|
|
|
|
"fmt"
|
|
|
|
"math/big"
|
2024-08-13 17:06:07 +08:00
|
|
|
"reflect"
|
2024-06-26 14:51:52 +08:00
|
|
|
"strings"
|
2020-06-30 19:51:41 +08:00
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
2024-07-24 10:29:01 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/bohr"
|
2024-04-15 11:23:23 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/bruno"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/euler"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/feynman"
|
|
|
|
feynmanFix "github.com/ethereum/go-ethereum/core/systemcontracts/feynman_fix"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/gibbs"
|
2024-06-26 14:51:52 +08:00
|
|
|
haberFix "github.com/ethereum/go-ethereum/core/systemcontracts/haber_fix"
|
2024-04-15 11:23:23 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/kepler"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/luban"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/mirror"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/moran"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/niels"
|
2024-09-23 16:17:06 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/pascal"
|
2024-04-15 11:23:23 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/planck"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/plato"
|
|
|
|
"github.com/ethereum/go-ethereum/core/systemcontracts/ramanujan"
|
2024-08-13 17:06:07 +08:00
|
|
|
"github.com/ethereum/go-ethereum/core/vm"
|
2024-06-26 14:51:52 +08:00
|
|
|
"github.com/ethereum/go-ethereum/log"
|
|
|
|
"github.com/ethereum/go-ethereum/params"
|
2020-06-30 19:51:41 +08:00
|
|
|
)
|
|
|
|
|
2020-07-03 11:42:37 +08:00
|
|
|
type UpgradeConfig struct {
|
2020-08-06 23:27:24 +08:00
|
|
|
BeforeUpgrade upgradeHook
|
|
|
|
AfterUpgrade upgradeHook
|
2020-08-06 17:25:39 +08:00
|
|
|
ContractAddr common.Address
|
|
|
|
CommitUrl string
|
|
|
|
Code string
|
2020-07-03 11:42:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Upgrade struct {
|
|
|
|
UpgradeName string
|
|
|
|
Configs []*UpgradeConfig
|
|
|
|
}
|
|
|
|
|
2024-08-13 17:06:07 +08:00
|
|
|
type upgradeHook func(blockNumber *big.Int, contractAddr common.Address, statedb vm.StateDB) error
|
2020-08-06 17:25:39 +08:00
|
|
|
|
2020-08-06 19:42:02 +08:00
|
|
|
const (
|
2020-08-06 23:27:24 +08:00
|
|
|
mainNet = "Mainnet"
|
|
|
|
chapelNet = "Chapel"
|
|
|
|
rialtoNet = "Rialto"
|
|
|
|
defaultNet = "Default"
|
2020-08-06 19:42:02 +08:00
|
|
|
)
|
|
|
|
|
2020-06-30 19:51:41 +08:00
|
|
|
var (
|
2020-08-06 23:27:24 +08:00
|
|
|
GenesisHash common.Hash
|
2023-03-01 20:17:18 +08:00
|
|
|
// upgrade config
|
2020-08-06 19:42:02 +08:00
|
|
|
ramanujanUpgrade = make(map[string]*Upgrade)
|
2020-08-13 20:36:13 +08:00
|
|
|
|
|
|
|
nielsUpgrade = make(map[string]*Upgrade)
|
2021-01-19 11:35:01 +08:00
|
|
|
|
|
|
|
mirrorUpgrade = make(map[string]*Upgrade)
|
2021-10-25 16:33:16 +08:00
|
|
|
|
|
|
|
brunoUpgrade = make(map[string]*Upgrade)
|
2022-04-29 18:03:22 +08:00
|
|
|
|
|
|
|
eulerUpgrade = make(map[string]*Upgrade)
|
2022-08-18 14:36:45 +08:00
|
|
|
|
|
|
|
gibbsUpgrade = make(map[string]*Upgrade)
|
2022-10-11 11:16:30 +08:00
|
|
|
|
|
|
|
moranUpgrade = make(map[string]*Upgrade)
|
2023-03-01 15:49:05 +08:00
|
|
|
|
2023-03-07 09:59:03 +08:00
|
|
|
planckUpgrade = make(map[string]*Upgrade)
|
2023-04-10 18:36:45 +08:00
|
|
|
|
2023-04-21 17:07:11 +08:00
|
|
|
lubanUpgrade = make(map[string]*Upgrade)
|
2023-05-05 19:03:57 +08:00
|
|
|
|
|
|
|
platoUpgrade = make(map[string]*Upgrade)
|
2023-05-19 10:56:20 +08:00
|
|
|
|
2023-11-07 15:28:27 +08:00
|
|
|
keplerUpgrade = make(map[string]*Upgrade)
|
2024-02-26 16:17:03 +08:00
|
|
|
|
|
|
|
feynmanUpgrade = make(map[string]*Upgrade)
|
2024-03-18 15:30:32 +08:00
|
|
|
|
|
|
|
feynmanFixUpgrade = make(map[string]*Upgrade)
|
2024-06-26 14:51:52 +08:00
|
|
|
|
|
|
|
haberFixUpgrade = make(map[string]*Upgrade)
|
2024-07-23 13:55:45 +08:00
|
|
|
|
|
|
|
bohrUpgrade = make(map[string]*Upgrade)
|
2024-09-23 16:17:06 +08:00
|
|
|
|
|
|
|
pascalUpgrade = make(map[string]*Upgrade)
|
2020-08-06 19:42:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2022-12-22 12:39:36 +08:00
|
|
|
// For contract upgrades, the following information is from `bsc-genesis-contract`, to be specifically,
|
|
|
|
// 1) `CommitUrl` is the specific git commit, based on which the byte code is compiled from;
|
|
|
|
// 2) `Code` is the byte code of the contract, which is generated by compiling `bsc-genesis-contract`.
|
|
|
|
// You can refer to `https://github.com/bnb-chain/bsc-genesis-contract` to compile the smart contracts and do the verification.
|
|
|
|
|
2020-08-11 16:25:01 +08:00
|
|
|
ramanujanUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "ramanujan",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelValidatorContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelSlashContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelSystemRewardContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelLightClientContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelTokenHubContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelRelayerIncentivizeContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelRelayerHubContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelGovHubContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelTokenManagerContract,
|
2020-08-11 16:25:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: ramanujan.ChapelCrossChainContract,
|
2020-07-03 11:42:37 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2020-08-13 20:36:13 +08:00
|
|
|
|
|
|
|
nielsUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "niels",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelValidatorContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelSlashContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelSystemRewardContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelLightClientContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelTokenHubContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelRelayerIncentivizeContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelRelayerHubContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelGovHubContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelTokenManagerContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/823b953232a344ba3c32d6690e70a245477e5760",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: niels.ChapelCrossChainContract,
|
2020-08-13 20:36:13 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2021-01-19 11:35:01 +08:00
|
|
|
|
2021-02-05 09:51:32 +08:00
|
|
|
mirrorUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "mirror",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.MainnetTokenManagerContract,
|
2021-02-05 09:51:32 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.MainnetTokenHubContract,
|
2021-02-05 09:51:32 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.MainnetRelayerIncentivizeContract,
|
2021-02-05 09:51:32 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-01-19 11:35:01 +08:00
|
|
|
mirrorUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "mirror",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.ChapelTokenManagerContract,
|
2021-01-19 11:35:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.ChapelTokenHubContract,
|
2021-01-19 11:35:01 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/af4f3993303213052222f55c721e661862d19638",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: mirror.ChapelRelayerIncentivizeContract,
|
2021-01-19 11:35:01 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-10-25 16:33:16 +08:00
|
|
|
brunoUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "bruno",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/ce622fef469d84ee418fa6181f3ac962412a5f4f",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: bruno.MainnetValidatorContract,
|
2021-10-25 16:33:16 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
brunoUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "bruno",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-06-30 12:06:56 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/ce622fef469d84ee418fa6181f3ac962412a5f4f",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: bruno.ChapelValidatorContract,
|
2021-10-25 16:33:16 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-04-29 18:03:22 +08:00
|
|
|
eulerUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "euler",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/db8bb560ac5a1265c685b719c7e976dced162310",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: euler.MainnetValidatorContract,
|
2022-04-29 18:03:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/db8bb560ac5a1265c685b719c7e976dced162310",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: euler.MainnetSlashContract,
|
2022-04-29 18:03:22 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
eulerUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "euler",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/db8bb560ac5a1265c685b719c7e976dced162310",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: euler.ChapelValidatorContract,
|
2022-04-29 18:03:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/db8bb560ac5a1265c685b719c7e976dced162310",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: euler.ChapelSlashContract,
|
2022-04-29 18:03:22 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-11-21 19:42:35 +08:00
|
|
|
gibbsUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "gibbs",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/8cfa94e657670d60ac1ff0563cddcf4664f77227",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: gibbs.MainnetTokenHubContract,
|
2022-11-21 19:42:35 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/8cfa94e657670d60ac1ff0563cddcf4664f77227",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: gibbs.MainnetStakingContract,
|
2022-11-21 19:42:35 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-08-18 14:36:45 +08:00
|
|
|
gibbsUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "gibbs",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2022-08-31 14:42:23 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d45b31c12b2c04757284717f4351cb44e81a3a7",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: gibbs.ChapelTokenHubContract,
|
2022-08-18 14:36:45 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
2022-08-31 14:42:23 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d45b31c12b2c04757284717f4351cb44e81a3a7",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: gibbs.ChapelStakingContract,
|
2022-08-18 14:36:45 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-10-11 11:16:30 +08:00
|
|
|
moranUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "moran",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.MainnetRelayerHubContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.MainnetLightClientContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.MainnetCrossChainContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
moranUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "moran",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.ChapelRelayerHubContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.ChapelLightClientContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: moran.ChapelCrossChainContract,
|
2022-10-11 11:16:30 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-03-07 09:59:03 +08:00
|
|
|
planckUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "planck",
|
2023-03-01 15:49:05 +08:00
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.MainnetSlashContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.MainnetTokenHubContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.MainnetCrossChainContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-03-07 09:59:03 +08:00
|
|
|
planckUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "planck",
|
2023-03-01 15:49:05 +08:00
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.ChapelSlashContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.ChapelTokenHubContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.ChapelCrossChainContract,
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
2023-03-01 20:17:18 +08:00
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
2023-03-10 11:20:39 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/78e13b1d3a5a1b08c9208af94a9b14fc1efda213",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: planck.ChapelStakingContract,
|
2023-03-01 20:17:18 +08:00
|
|
|
},
|
2023-03-01 15:49:05 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-04-21 17:07:11 +08:00
|
|
|
lubanUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "luban",
|
2023-04-10 18:36:45 +08:00
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-04-20 22:28:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.MainnetValidatorContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-04-21 10:09:55 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.MainnetSlashContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-04-21 10:09:55 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.MainnetSystemRewardContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
2023-04-18 07:58:53 +01:00
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2023-04-20 22:28:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.MainnetRelayerHubContract,
|
2023-04-18 07:58:53 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-04-20 22:28:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.MainnetCrossChainContract,
|
2023-04-18 07:58:53 +01:00
|
|
|
},
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-04-21 17:07:11 +08:00
|
|
|
lubanUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "luban",
|
2023-04-10 18:36:45 +08:00
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-04-21 10:09:55 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.ChapelValidatorContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-04-21 10:09:55 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.ChapelSlashContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-04-21 10:09:55 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.ChapelSystemRewardContract,
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
2023-04-18 07:58:53 +01:00
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2023-04-20 22:28:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.ChapelRelayerHubContract,
|
2023-04-18 07:58:53 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2023-04-20 22:28:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b144718e94d7a1ebb24a7103202300f08826f369",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: luban.ChapelCrossChainContract,
|
2023-04-18 07:58:53 +01:00
|
|
|
},
|
2023-04-10 18:36:45 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-05-05 19:03:57 +08:00
|
|
|
platoUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "plato",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-05-10 11:00:54 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/0f352c4623898d92664a46cbfc26c52b79aad838",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: plato.MainnetValidatorContract,
|
2023-05-08 17:27:40 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-05-10 11:00:54 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/0f352c4623898d92664a46cbfc26c52b79aad838",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: plato.MainnetSlashContract,
|
2023-05-05 19:03:57 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
platoUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "plato",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-05-10 11:00:54 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/0f352c4623898d92664a46cbfc26c52b79aad838",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: plato.ChapelValidatorContract,
|
2023-05-08 17:27:40 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-05-10 11:00:54 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/0f352c4623898d92664a46cbfc26c52b79aad838",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: plato.ChapelSlashContract,
|
2023-05-05 19:03:57 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-11-07 15:28:27 +08:00
|
|
|
keplerUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "kepler",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.MainnetValidatorContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.MainnetSlashContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.MainnetSystemRewardContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
keplerUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "kepler",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.ChapelValidatorContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.ChapelSlashContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2023-12-06 18:09:25 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b3a5c1fa8882c0e546dc5ba913ce4db77ec9befe",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: kepler.ChapelSystemRewardContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-04-01 16:37:03 +08:00
|
|
|
feynmanUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "feynman",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetValidatorContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetSlashContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetTokenHubContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetGovHubContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetCrossChainContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetStakingContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetStakeHubContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeCreditContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetStakeCreditContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovernorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetGovernorContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovTokenContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetGovTokenContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TimelockContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetTimelockContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2dbebb57a0d436d6a30b78c1f123395035249035",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetTokenRecoverPortalContract,
|
2024-04-01 16:37:03 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-02-26 16:17:03 +08:00
|
|
|
feynmanUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "feynman",
|
2023-11-07 15:28:27 +08:00
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-02-26 16:17:03 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelValidatorContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2024-02-26 16:17:03 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelSlashContract,
|
2023-11-07 15:28:27 +08:00
|
|
|
},
|
|
|
|
{
|
2024-02-26 16:17:03 +08:00
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelTokenHubContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelGovHubContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelCrossChainContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelStakingContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelStakeHubContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeCreditContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetStakeCreditContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovernorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelGovernorContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovTokenContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.MainnetGovTokenContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TimelockContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelTimelockContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/9d09d0a3d6332460a810188261ec8195e05aa218",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynman.ChapelTokenRecoverPortalContract,
|
2024-02-26 16:17:03 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-03-18 15:30:32 +08:00
|
|
|
// This upgrade is to fix an error on testnet only. So the upgrade config of mainnet is empty.
|
|
|
|
feynmanFixUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "feynmanFix",
|
|
|
|
Configs: []*UpgradeConfig{},
|
|
|
|
}
|
|
|
|
|
|
|
|
feynmanFixUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "feynmanFix",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2d6372ddba77902ef01e45887a425938376d5a5c",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynmanFix.ChapelValidatorContract,
|
2024-03-18 15:30:32 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/2d6372ddba77902ef01e45887a425938376d5a5c",
|
2024-04-15 11:23:23 +08:00
|
|
|
Code: feynmanFix.ChapelStakeHubContract,
|
2024-03-18 15:30:32 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2024-06-26 14:51:52 +08:00
|
|
|
|
|
|
|
haberFixUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "haberFix",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b743ce3f1f1e94c349b175cd6593bc263463b33b",
|
|
|
|
Code: haberFix.MainnetValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b743ce3f1f1e94c349b175cd6593bc263463b33b",
|
|
|
|
Code: haberFix.MainnetSlashContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
haberFixUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "haberFix",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b743ce3f1f1e94c349b175cd6593bc263463b33b",
|
|
|
|
Code: haberFix.ChapelValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/b743ce3f1f1e94c349b175cd6593bc263463b33b",
|
|
|
|
Code: haberFix.ChapelSlashContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2024-07-24 10:29:01 +08:00
|
|
|
|
|
|
|
bohrUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "bohr",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-07-26 15:47:59 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
|
2024-07-24 10:29:01 +08:00
|
|
|
Code: bohr.MainnetValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
2024-07-26 15:47:59 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
|
2024-07-24 10:29:01 +08:00
|
|
|
Code: bohr.MainnetStakeHubContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
bohrUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "bohr",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-07-26 15:47:59 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
|
2024-07-24 10:29:01 +08:00
|
|
|
Code: bohr.ChapelValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
2024-07-26 15:47:59 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
|
2024-07-24 10:29:01 +08:00
|
|
|
Code: bohr.ChapelStakeHubContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-09-23 16:17:06 +08:00
|
|
|
pascalUpgrade[mainNet] = &Upgrade{
|
|
|
|
UpgradeName: "pascal",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetSlashContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetSystemRewardContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetLightClientContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetTokenHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetRelayerIncentivizeContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetRelayerHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetGovHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetTokenManagerContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetCrossChainContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetStakingContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetStakeHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeCreditContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetStakeCreditContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovernorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetGovernorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovTokenContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetGovTokenContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TimelockContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetTimelockContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.MainnetTokenRecoverPortalContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
pascalUpgrade[chapelNet] = &Upgrade{
|
|
|
|
UpgradeName: "pascal",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelSlashContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelSystemRewardContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelLightClientContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelTokenHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelRelayerIncentivizeContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelRelayerHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelGovHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelTokenManagerContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelCrossChainContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelStakingContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelStakeHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeCreditContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelStakeCreditContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovernorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelGovernorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovTokenContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelGovTokenContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TimelockContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelTimelockContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.ChapelTokenRecoverPortalContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
pascalUpgrade[rialtoNet] = &Upgrade{
|
|
|
|
UpgradeName: "pascal",
|
|
|
|
Configs: []*UpgradeConfig{
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(ValidatorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoValidatorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SlashContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoSlashContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(SystemRewardContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoSystemRewardContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(LightClientContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoLightClientContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoTokenHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoRelayerIncentivizeContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(RelayerHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoRelayerHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoGovHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenManagerContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoTokenManagerContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(CrossChainContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoCrossChainContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakingContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoStakingContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeHubContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoStakeHubContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(StakeCreditContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoStakeCreditContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovernorContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoGovernorContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(GovTokenContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoGovTokenContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TimelockContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoTimelockContract,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
|
2024-10-11 17:24:49 +08:00
|
|
|
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/020c0459e37d1f9d635c1cff86dd1099ab1383fa",
|
2024-09-23 16:17:06 +08:00
|
|
|
Code: pascal.RialtoTokenRecoverPortalContract,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2020-08-06 19:42:02 +08:00
|
|
|
}
|
2020-07-03 11:42:37 +08:00
|
|
|
|
2024-08-13 17:06:07 +08:00
|
|
|
func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, lastBlockTime uint64, blockTime uint64, statedb vm.StateDB) {
|
|
|
|
if config == nil || blockNumber == nil || statedb == nil || reflect.ValueOf(statedb).IsNil() {
|
2020-07-03 11:42:37 +08:00
|
|
|
return
|
|
|
|
}
|
2024-08-13 17:06:07 +08:00
|
|
|
|
2020-08-06 19:42:02 +08:00
|
|
|
var network string
|
2020-08-06 23:27:24 +08:00
|
|
|
switch GenesisHash {
|
2020-08-06 19:42:02 +08:00
|
|
|
/* Add mainnet genesis hash */
|
2021-01-19 11:35:01 +08:00
|
|
|
case params.BSCGenesisHash:
|
|
|
|
network = mainNet
|
2020-08-06 19:42:02 +08:00
|
|
|
case params.ChapelGenesisHash:
|
2020-08-06 23:27:24 +08:00
|
|
|
network = chapelNet
|
2020-08-06 19:42:02 +08:00
|
|
|
case params.RialtoGenesisHash:
|
2020-08-06 23:27:24 +08:00
|
|
|
network = rialtoNet
|
|
|
|
default:
|
|
|
|
network = defaultNet
|
2020-08-06 19:42:02 +08:00
|
|
|
}
|
2020-07-03 11:42:37 +08:00
|
|
|
|
2021-01-19 11:35:01 +08:00
|
|
|
logger := log.New("system-contract-upgrade", network)
|
2020-08-06 17:25:39 +08:00
|
|
|
if config.IsOnRamanujan(blockNumber) {
|
2020-08-06 19:42:02 +08:00
|
|
|
applySystemContractUpgrade(ramanujanUpgrade[network], blockNumber, statedb, logger)
|
2020-07-03 11:42:37 +08:00
|
|
|
}
|
|
|
|
|
2020-08-13 20:36:13 +08:00
|
|
|
if config.IsOnNiels(blockNumber) {
|
|
|
|
applySystemContractUpgrade(nielsUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2021-01-19 11:35:01 +08:00
|
|
|
if config.IsOnMirrorSync(blockNumber) {
|
|
|
|
applySystemContractUpgrade(mirrorUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2021-10-25 16:33:16 +08:00
|
|
|
if config.IsOnBruno(blockNumber) {
|
|
|
|
applySystemContractUpgrade(brunoUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2022-04-29 18:03:22 +08:00
|
|
|
if config.IsOnEuler(blockNumber) {
|
|
|
|
applySystemContractUpgrade(eulerUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2022-08-18 14:36:45 +08:00
|
|
|
if config.IsOnGibbs(blockNumber) {
|
|
|
|
applySystemContractUpgrade(gibbsUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2022-10-11 11:16:30 +08:00
|
|
|
if config.IsOnMoran(blockNumber) {
|
|
|
|
applySystemContractUpgrade(moranUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2023-03-07 09:59:03 +08:00
|
|
|
if config.IsOnPlanck(blockNumber) {
|
|
|
|
applySystemContractUpgrade(planckUpgrade[network], blockNumber, statedb, logger)
|
2023-03-01 15:49:05 +08:00
|
|
|
}
|
|
|
|
|
2023-04-21 17:07:11 +08:00
|
|
|
if config.IsOnLuban(blockNumber) {
|
|
|
|
applySystemContractUpgrade(lubanUpgrade[network], blockNumber, statedb, logger)
|
2023-04-10 18:36:45 +08:00
|
|
|
}
|
|
|
|
|
2023-05-05 19:03:57 +08:00
|
|
|
if config.IsOnPlato(blockNumber) {
|
|
|
|
applySystemContractUpgrade(platoUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2023-12-18 17:07:50 +08:00
|
|
|
if config.IsOnShanghai(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
logger.Info("Empty upgrade config for shanghai", "height", blockNumber.String())
|
|
|
|
}
|
|
|
|
|
2023-11-07 15:28:27 +08:00
|
|
|
if config.IsOnKepler(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(keplerUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
2024-02-26 16:17:03 +08:00
|
|
|
|
|
|
|
if config.IsOnFeynman(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(feynmanUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2024-03-18 15:30:32 +08:00
|
|
|
if config.IsOnFeynmanFix(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(feynmanFixUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2024-06-26 14:51:52 +08:00
|
|
|
if config.IsOnHaberFix(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(haberFixUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2024-07-23 13:55:45 +08:00
|
|
|
if config.IsOnBohr(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(bohrUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2024-09-23 16:17:06 +08:00
|
|
|
if config.IsOnPascal(blockNumber, lastBlockTime, blockTime) {
|
|
|
|
applySystemContractUpgrade(pascalUpgrade[network], blockNumber, statedb, logger)
|
|
|
|
}
|
|
|
|
|
2020-08-06 17:12:10 +08:00
|
|
|
/*
|
2020-08-06 17:25:39 +08:00
|
|
|
apply other upgrades
|
2020-08-06 17:12:10 +08:00
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
2024-08-13 17:06:07 +08:00
|
|
|
func applySystemContractUpgrade(upgrade *Upgrade, blockNumber *big.Int, statedb vm.StateDB, logger log.Logger) {
|
2020-08-06 19:42:02 +08:00
|
|
|
if upgrade == nil {
|
2020-08-06 23:27:24 +08:00
|
|
|
logger.Info("Empty upgrade config", "height", blockNumber.String())
|
2020-08-06 19:42:02 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-08-06 17:12:10 +08:00
|
|
|
logger.Info(fmt.Sprintf("Apply upgrade %s at height %d", upgrade.UpgradeName, blockNumber.Int64()))
|
2020-07-03 11:42:37 +08:00
|
|
|
for _, cfg := range upgrade.Configs {
|
2020-08-06 17:12:10 +08:00
|
|
|
logger.Info(fmt.Sprintf("Upgrade contract %s to commit %s", cfg.ContractAddr.String(), cfg.CommitUrl))
|
2020-08-06 17:25:39 +08:00
|
|
|
|
|
|
|
if cfg.BeforeUpgrade != nil {
|
2020-08-06 23:27:24 +08:00
|
|
|
err := cfg.BeforeUpgrade(blockNumber, cfg.ContractAddr, statedb)
|
|
|
|
if err != nil {
|
|
|
|
panic(fmt.Errorf("contract address: %s, execute beforeUpgrade error: %s", cfg.ContractAddr.String(), err.Error()))
|
|
|
|
}
|
2020-08-06 17:25:39 +08:00
|
|
|
}
|
|
|
|
|
2024-06-26 14:51:52 +08:00
|
|
|
newContractCode, err := hex.DecodeString(strings.TrimSpace(cfg.Code))
|
2020-06-30 19:51:41 +08:00
|
|
|
if err != nil {
|
2020-08-06 23:27:24 +08:00
|
|
|
panic(fmt.Errorf("failed to decode new contract code: %s", err.Error()))
|
2020-06-30 19:51:41 +08:00
|
|
|
}
|
2020-07-03 11:42:37 +08:00
|
|
|
statedb.SetCode(cfg.ContractAddr, newContractCode)
|
2020-08-06 17:25:39 +08:00
|
|
|
|
|
|
|
if cfg.AfterUpgrade != nil {
|
2020-08-06 23:27:24 +08:00
|
|
|
err := cfg.AfterUpgrade(blockNumber, cfg.ContractAddr, statedb)
|
|
|
|
if err != nil {
|
|
|
|
panic(fmt.Errorf("contract address: %s, execute afterUpgrade error: %s", cfg.ContractAddr.String(), err.Error()))
|
|
|
|
}
|
2020-08-06 17:25:39 +08:00
|
|
|
}
|
2020-06-30 19:51:41 +08:00
|
|
|
}
|
|
|
|
}
|