Skip to content

Commit 247e9ab

Browse files
committed
refactor: move fork switches into chain config
Migrate fork activation heights from common globals into params.ChainConfig, including TIP2019Block, TIPSigningBlock, TIPXDCXMinerDisableBlock, TIPXDCXReceiverDisableBlock, Eip1559Block, CancunBlock, PragueBlock, OsakaBlock, DynamicGasLimitBlock, TIPUpgradeRewardBlock, TIPUpgradePenaltyBlock, and TIPEpochHalvingBlock. Remove corresponding common fallback storage/assignments and make activation checks and compatibility guards chainconfig-driven with explicit per-network defaults. Update genesis cloning/localnet canonicalization and runtime call sites to rely on ChainConfig helpers, and refresh tests for fallback-free behavior.
1 parent f356ffe commit 247e9ab

38 files changed

Lines changed: 1194 additions & 382 deletions

accounts/abi/abigen/bind_test.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ var bindTests = []struct {
298298
key, _ := crypto.GenerateKey()
299299
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
300300
301-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
301+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
302302
defer sim.Close()
303303
304304
// Deploy an interaction tester contract and call a transaction on it
@@ -355,7 +355,7 @@ var bindTests = []struct {
355355
key, _ := crypto.GenerateKey()
356356
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
357357
358-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
358+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
359359
defer sim.Close()
360360
361361
// Deploy a tuple tester contract and execute a structured call on it
@@ -402,7 +402,7 @@ var bindTests = []struct {
402402
key, _ := crypto.GenerateKey()
403403
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
404404
405-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
405+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
406406
defer sim.Close()
407407
408408
// Deploy a tuple tester contract and execute a structured call on it
@@ -461,7 +461,7 @@ var bindTests = []struct {
461461
key, _ := crypto.GenerateKey()
462462
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
463463
464-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
464+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
465465
defer sim.Close()
466466
467467
// Deploy a slice tester contract and execute a n array call on it
@@ -512,7 +512,7 @@ var bindTests = []struct {
512512
513513
config := *params.TestXDPoSMockChainConfig
514514
config.Eip1559Block = big.NewInt(0)
515-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, &config)
515+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, &config)
516516
defer sim.Close()
517517
518518
// Deploy a default method invoker contract and execute its default method
@@ -580,7 +580,7 @@ var bindTests = []struct {
580580
key, _ := crypto.GenerateKey()
581581
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
582582
583-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
583+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
584584
defer sim.Close()
585585
586586
// Deploy a structs method invoker contract and execute its default method
@@ -713,7 +713,7 @@ var bindTests = []struct {
713713
key, _ := crypto.GenerateKey()
714714
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
715715
716-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
716+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
717717
defer sim.Close()
718718
719719
// Deploy a funky gas pattern contract
@@ -765,7 +765,7 @@ var bindTests = []struct {
765765
key, _ := crypto.GenerateKey()
766766
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
767767
768-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
768+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
769769
defer sim.Close()
770770
771771
// Deploy a sender tester contract and execute a structured call on it
@@ -841,7 +841,7 @@ var bindTests = []struct {
841841
// Generate a new random account and a funded simulator
842842
key, _ := crypto.GenerateKey()
843843
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
844-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
844+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
845845
defer sim.Close()
846846
847847
// Deploy a underscorer tester contract and execute a structured call on it
@@ -936,7 +936,7 @@ var bindTests = []struct {
936936
key, _ := crypto.GenerateKey()
937937
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
938938
939-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
939+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
940940
defer sim.Close()
941941
942942
// Deploy an eventer contract
@@ -1128,7 +1128,7 @@ var bindTests = []struct {
11281128
key, _ := crypto.GenerateKey()
11291129
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
11301130
1131-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1131+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
11321132
defer sim.Close()
11331133
11341134
//deploy the test contract
@@ -1266,7 +1266,7 @@ var bindTests = []struct {
12661266
key, _ := crypto.GenerateKey()
12671267
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
12681268
1269-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1269+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
12701270
defer sim.Close()
12711271
12721272
_, _, contract, err := DeployTuple(auth, sim)
@@ -1406,7 +1406,7 @@ var bindTests = []struct {
14061406
key, _ := crypto.GenerateKey()
14071407
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
14081408
1409-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1409+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
14101410
defer sim.Close()
14111411
14121412
// deploy the test contract
@@ -1497,7 +1497,7 @@ var bindTests = []struct {
14971497
addr := crypto.PubkeyToAddress(key.PublicKey)
14981498
14991499
// Deploy registrar contract
1500-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1500+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
15011501
defer sim.Close()
15021502
15031503
transactOpts, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
@@ -1560,7 +1560,7 @@ var bindTests = []struct {
15601560
addr := crypto.PubkeyToAddress(key.PublicKey)
15611561
15621562
// Deploy registrar contract
1563-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1563+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
15641564
defer sim.Close()
15651565
15661566
transactOpts, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
@@ -1623,7 +1623,7 @@ var bindTests = []struct {
16231623
key, _ := crypto.GenerateKey()
16241624
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
16251625
1626-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1626+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
16271627
defer sim.Close()
16281628
16291629
// Deploy a tester contract and execute a structured call on it
@@ -1684,7 +1684,7 @@ var bindTests = []struct {
16841684
key, _ := crypto.GenerateKey()
16851685
addr := crypto.PubkeyToAddress(key.PublicKey)
16861686
1687-
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(10000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
1687+
sim := backends.NewXDCSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(1000000000000000000)}}, 10000000, params.TestXDPoSMockChainConfig)
16881688
defer sim.Close()
16891689
16901690
opts, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))

accounts/abi/bind/v2/util_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ var waitDeployedTests = map[string]struct {
5656
func TestWaitDeployed(t *testing.T) {
5757
t.Parallel()
5858
config := *params.TestXDPoSMockChainConfig
59-
config.Eip1559Block = big.NewInt(0)
6059
for name, test := range waitDeployedTests {
6160
backend := simulated.New(
6261
types.GenesisAlloc{
@@ -108,7 +107,6 @@ func TestWaitDeployed(t *testing.T) {
108107

109108
func TestWaitDeployedCornerCases(t *testing.T) {
110109
config := *params.TestXDPoSMockChainConfig
111-
config.Eip1559Block = big.NewInt(0)
112110
var (
113111
backend = backends.NewXDCSimulatedBackend(
114112
types.GenesisAlloc{

cmd/XDC/chaincmd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ func initGenesis(ctx *cli.Context) error {
187187
if err != nil {
188188
utils.Fatalf("invalid genesis json: %v", err)
189189
}
190-
191-
if genesis.Config.ChainID != nil {
190+
if genesis.Config != nil && genesis.Config.ChainID != nil {
192191
common.CopyConstants(genesis.Config.ChainID.Uint64())
193192
}
194193

cmd/utils/flags.go

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ var (
125125
Usage: "XDC develop network",
126126
Category: flags.EthCategory,
127127
}
128+
LocalnetFlag = &cli.BoolFlag{
129+
Name: "localnet",
130+
Usage: "XDC local network",
131+
Category: flags.EthCategory,
132+
}
128133

129134
// Dev mode
130135
DeveloperFlag = &cli.BoolFlag{
@@ -867,6 +872,7 @@ var (
867872
MainnetFlag,
868873
TestnetFlag,
869874
DevnetFlag,
875+
LocalnetFlag,
870876
}
871877

872878
// DatabaseFlags is the flag group of all database flags.
@@ -887,6 +893,9 @@ func MakeDataDir(ctx *cli.Context) string {
887893
if ctx.Bool(DevnetFlag.Name) {
888894
return filepath.Join(path, "devnet")
889895
}
896+
if ctx.Bool(LocalnetFlag.Name) {
897+
return filepath.Join(path, "localnet")
898+
}
890899
return path
891900
}
892901
Fatalf("Cannot determine default data directory, please set manually (--datadir)")
@@ -1404,6 +1413,8 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
14041413
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet")
14051414
case ctx.Bool(DevnetFlag.Name) && cfg.DataDir == node.DefaultDataDir():
14061415
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "devnet")
1416+
case ctx.Bool(LocalnetFlag.Name) && cfg.DataDir == node.DefaultDataDir():
1417+
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "localnet")
14071418
}
14081419
}
14091420

@@ -1487,7 +1498,8 @@ func SetXDCXConfig(ctx *cli.Context, cfg *XDCx.Config, XDCDataDir string) {
14871498
// SetEthConfig applies eth-related command line flags to the config.
14881499
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
14891500
// Avoid conflicting network flags
1490-
flags.CheckExclusive(ctx, MainnetFlag, TestnetFlag, DevnetFlag, DeveloperFlag)
1501+
flags.CheckExclusive(ctx, MainnetFlag, TestnetFlag, DevnetFlag, LocalnetFlag, DeveloperFlag)
1502+
core.SetLocalnetCanonicalize(ctx.Bool(LocalnetFlag.Name))
14911503

14921504
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
14931505
setEtherbase(ctx, ks, cfg)
@@ -1595,20 +1607,24 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
15951607
switch {
15961608
case ctx.Bool(MainnetFlag.Name):
15971609
if !ctx.IsSet(NetworkIdFlag.Name) {
1598-
cfg.NetworkId = 50
1610+
cfg.NetworkId = params.MainnetChainConfig.ChainID.Uint64() // 50
15991611
}
16001612
cfg.Genesis = core.DefaultGenesisBlock()
16011613
case ctx.Bool(TestnetFlag.Name):
16021614
common.IsTestnet = true
16031615
if !ctx.IsSet(NetworkIdFlag.Name) {
1604-
cfg.NetworkId = 51
1616+
cfg.NetworkId = params.TestnetChainConfig.ChainID.Uint64() // 51
16051617
}
16061618
cfg.Genesis = core.DefaultTestnetGenesisBlock()
16071619
case ctx.Bool(DevnetFlag.Name):
16081620
if !ctx.IsSet(NetworkIdFlag.Name) {
1609-
cfg.NetworkId = 551
1621+
cfg.NetworkId = params.DevnetChainConfig.ChainID.Uint64() // 551
16101622
}
16111623
cfg.Genesis = core.DefaultDevnetGenesisBlock()
1624+
case ctx.Bool(LocalnetFlag.Name):
1625+
if !ctx.IsSet(NetworkIdFlag.Name) {
1626+
cfg.NetworkId = params.LocalnetChainConfig.ChainID.Uint64() // 5151
1627+
}
16121628
case ctx.Bool(DeveloperFlag.Name):
16131629
// Create new developer account or reuse existing one
16141630
var (
@@ -1683,6 +1699,8 @@ func SetNetworkFlagById(ctx *cli.Context, cfg *ethconfig.Config) {
16831699
ctx.Set(TestnetFlag.Name, "true")
16841700
case 551:
16851701
ctx.Set(DevnetFlag.Name, "true")
1702+
case 5151:
1703+
ctx.Set(LocalnetFlag.Name, "true")
16861704
}
16871705
}
16881706
}
@@ -1771,6 +1789,7 @@ func MakeChainDatabase(ctx *cli.Context, stack *node.Node, readonly bool) ethdb.
17711789
}
17721790

17731791
func MakeGenesis(ctx *cli.Context) *core.Genesis {
1792+
core.SetLocalnetCanonicalize(ctx.Bool(LocalnetFlag.Name))
17741793
var genesis *core.Genesis
17751794
switch {
17761795
case ctx.Bool(MainnetFlag.Name):

common/constants.all.go

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,15 @@ type constant struct {
4545
denylistHFNumber uint64
4646
maxMasternodesV2 int // Last v1 masternodes
4747

48-
tip2019Block *big.Int
49-
tipSigning *big.Int
5048
tipRandomize *big.Int
5149
tipNoHalvingMNReward *big.Int // hard fork no halving masternodes reward
5250
tipXDCX *big.Int
5351
tipXDCXLending *big.Int
5452
tipXDCXCancellationFee *big.Int
5553
tipTRC21Fee *big.Int
5654
tipIncreaseMasternodes *big.Int // Upgrade MN Count at Block.
57-
berlinBlock *big.Int
58-
londonBlock *big.Int
59-
mergeBlock *big.Int
60-
shanghaiBlock *big.Int
6155
blockNumberGas50x *big.Int
6256
TIPV2SwitchBlock *big.Int
63-
tipXDCXMinerDisable *big.Int
64-
tipXDCXReceiverDisable *big.Int
65-
tipUpgradeReward *big.Int
66-
tipUpgradePenalty *big.Int
67-
tipEpochHalving *big.Int
68-
eip1559Block *big.Int
69-
cancunBlock *big.Int
70-
pragueBlock *big.Int
71-
osakaBlock *big.Int
72-
dynamicGasLimitBlock *big.Int
7357

7458
trc21IssuerSMC Address
7559
xdcxListingSMC Address
@@ -85,31 +69,15 @@ func (c *constant) print() {
8569
fmt.Println("chainID:", c.chainID)
8670
fmt.Println("denylistHFNumber:", c.denylistHFNumber)
8771
fmt.Println("maxMasternodesV2:", c.maxMasternodesV2)
88-
fmt.Println("tip2019Block:", c.tip2019Block)
89-
fmt.Println("tipSigning:", c.tipSigning)
9072
fmt.Println("tipRandomize:", c.tipRandomize)
9173
fmt.Println("tipNoHalvingMNReward:", c.tipNoHalvingMNReward)
9274
fmt.Println("tipXDCX:", c.tipXDCX)
9375
fmt.Println("tipXDCXLending:", c.tipXDCXLending)
9476
fmt.Println("tipXDCXCancellationFee:", c.tipXDCXCancellationFee)
9577
fmt.Println("tipTRC21Fee:", c.tipTRC21Fee)
9678
fmt.Println("tipIncreaseMasternodes:", c.tipIncreaseMasternodes)
97-
fmt.Println("berlinBlock:", c.berlinBlock)
98-
fmt.Println("londonBlock:", c.londonBlock)
99-
fmt.Println("mergeBlock:", c.mergeBlock)
100-
fmt.Println("shanghaiBlock:", c.shanghaiBlock)
10179
fmt.Println("blockNumberGas50x:", c.blockNumberGas50x)
10280
fmt.Println("TIPV2SwitchBlock:", c.TIPV2SwitchBlock)
103-
fmt.Println("tipXDCXMinerDisable:", c.tipXDCXMinerDisable)
104-
fmt.Println("tipXDCXReceiverDisable:", c.tipXDCXReceiverDisable)
105-
fmt.Println("tipUpgradeReward:", c.tipUpgradeReward)
106-
fmt.Println("tipUpgradePenalty:", c.tipUpgradePenalty)
107-
fmt.Println("tipEpochHalving:", c.tipEpochHalving)
108-
fmt.Println("eip1559Block:", c.eip1559Block)
109-
fmt.Println("cancunBlock:", c.cancunBlock)
110-
fmt.Println("pragueBlock:", c.pragueBlock)
111-
fmt.Println("osakaBlock:", c.osakaBlock)
112-
fmt.Println("dynamicGasLimitBlock:", c.dynamicGasLimitBlock)
11381
fmt.Println("trc21IssuerSMC:", c.trc21IssuerSMC)
11482
fmt.Println("xdcxListingSMC:", c.xdcxListingSMC)
11583
fmt.Println("relayerRegistrationSMC:", c.relayerRegistrationSMC)
@@ -123,30 +91,14 @@ var (
12391
DenylistHFNumber = MainnetConstant.denylistHFNumber
12492
MaxMasternodesV2 = MainnetConstant.maxMasternodesV2 // Last v1 masternodes
12593

126-
TIP2019Block = MainnetConstant.tip2019Block
127-
TIPSigning = MainnetConstant.tipSigning
12894
TIPRandomize = MainnetConstant.tipRandomize
12995
TIPNoHalvingMNReward = MainnetConstant.tipNoHalvingMNReward
13096
TIPXDCX = MainnetConstant.tipXDCX
13197
TIPXDCXLending = MainnetConstant.tipXDCXLending
13298
TIPXDCXCancellationFee = MainnetConstant.tipXDCXCancellationFee
13399
TIPTRC21Fee = MainnetConstant.tipTRC21Fee
134100
TIPIncreaseMasternodes = MainnetConstant.tipIncreaseMasternodes
135-
BerlinBlock = MainnetConstant.berlinBlock
136-
LondonBlock = MainnetConstant.londonBlock
137-
MergeBlock = MainnetConstant.mergeBlock
138-
ShanghaiBlock = MainnetConstant.shanghaiBlock
139101
BlockNumberGas50x = MainnetConstant.blockNumberGas50x
140-
TIPXDCXMinerDisable = MainnetConstant.tipXDCXMinerDisable
141-
TIPXDCXReceiverDisable = MainnetConstant.tipXDCXReceiverDisable
142-
Eip1559Block = MainnetConstant.eip1559Block
143-
CancunBlock = MainnetConstant.cancunBlock
144-
PragueBlock = MainnetConstant.pragueBlock
145-
OsakaBlock = MainnetConstant.osakaBlock
146-
DynamicGasLimitBlock = MainnetConstant.dynamicGasLimitBlock
147-
TIPUpgradeReward = MainnetConstant.tipUpgradeReward
148-
TipUpgradePenalty = MainnetConstant.tipUpgradePenalty
149-
TIPEpochHalving = MainnetConstant.tipEpochHalving
150102

151103
TRC21IssuerSMC = MainnetConstant.trc21IssuerSMC
152104
XDCXListingSMC = MainnetConstant.xdcxListingSMC
@@ -194,30 +146,14 @@ func CopyConstants(chainID uint64) {
194146

195147
MaxMasternodesV2 = c.maxMasternodesV2
196148
DenylistHFNumber = c.denylistHFNumber
197-
TIP2019Block = c.tip2019Block
198-
TIPSigning = c.tipSigning
199149
TIPRandomize = c.tipRandomize
200150
TIPNoHalvingMNReward = c.tipNoHalvingMNReward
201151
TIPXDCX = c.tipXDCX
202152
TIPXDCXLending = c.tipXDCXLending
203153
TIPXDCXCancellationFee = c.tipXDCXCancellationFee
204154
TIPTRC21Fee = c.tipTRC21Fee
205155
TIPIncreaseMasternodes = c.tipIncreaseMasternodes
206-
BerlinBlock = c.berlinBlock
207-
LondonBlock = c.londonBlock
208-
MergeBlock = c.mergeBlock
209-
ShanghaiBlock = c.shanghaiBlock
210156
BlockNumberGas50x = c.blockNumberGas50x
211-
TIPXDCXMinerDisable = c.tipXDCXMinerDisable
212-
TIPXDCXReceiverDisable = c.tipXDCXReceiverDisable
213-
Eip1559Block = c.eip1559Block
214-
CancunBlock = c.cancunBlock
215-
PragueBlock = c.pragueBlock
216-
OsakaBlock = c.osakaBlock
217-
DynamicGasLimitBlock = c.dynamicGasLimitBlock
218-
TIPUpgradeReward = c.tipUpgradeReward
219-
TipUpgradePenalty = c.tipUpgradePenalty
220-
TIPEpochHalving = c.tipEpochHalving
221157

222158
TRC21IssuerSMC = c.trc21IssuerSMC
223159
XDCXListingSMC = c.xdcxListingSMC

0 commit comments

Comments
 (0)