common, params: define cancun block for testnet and print more chain config

This commit is contained in:
Daniel Liu 2025-04-01 14:34:10 +08:00
parent 3ae8c64812
commit 880aac194e
9 changed files with 24 additions and 19 deletions

View file

@ -104,9 +104,11 @@ var (
TIPXDCXReceiverDisable = MaintnetConstant.tipXDCXReceiverDisable TIPXDCXReceiverDisable = MaintnetConstant.tipXDCXReceiverDisable
Eip1559Block = MaintnetConstant.eip1559Block Eip1559Block = MaintnetConstant.eip1559Block
CancunBlock = MaintnetConstant.cancunBlock CancunBlock = MaintnetConstant.cancunBlock
TIPUpgradeReward = MaintnetConstant.tipUpgradeReward
TIPEpochHalving = MaintnetConstant.tipEpochHalving
TRC21IssuerSMCTestNet = MaintnetConstant.trc21IssuerSMCTestNet
TRC21IssuerSMC = MaintnetConstant.trc21IssuerSMC TRC21IssuerSMC = MaintnetConstant.trc21IssuerSMC
TRC21IssuerSMCTestNet = MaintnetConstant.trc21IssuerSMCTestNet
XDCXListingSMC = MaintnetConstant.xdcxListingSMC XDCXListingSMC = MaintnetConstant.xdcxListingSMC
XDCXListingSMCTestNet = MaintnetConstant.xdcxListingSMCTestNet XDCXListingSMCTestNet = MaintnetConstant.xdcxListingSMCTestNet
@ -169,9 +171,11 @@ func CopyConstans(chainID uint64) {
TIPXDCXReceiverDisable = c.tipXDCXReceiverDisable TIPXDCXReceiverDisable = c.tipXDCXReceiverDisable
Eip1559Block = c.eip1559Block Eip1559Block = c.eip1559Block
CancunBlock = c.cancunBlock CancunBlock = c.cancunBlock
TIPUpgradeReward = c.tipUpgradeReward
TIPEpochHalving = c.tipEpochHalving
TRC21IssuerSMCTestNet = c.trc21IssuerSMCTestNet
TRC21IssuerSMC = c.trc21IssuerSMC TRC21IssuerSMC = c.trc21IssuerSMC
TRC21IssuerSMCTestNet = c.trc21IssuerSMCTestNet
XDCXListingSMC = c.xdcxListingSMC XDCXListingSMC = c.xdcxListingSMC
XDCXListingSMCTestNet = c.xdcxListingSMCTestNet XDCXListingSMCTestNet = c.xdcxListingSMCTestNet

View file

@ -32,8 +32,8 @@ var DevnetConstant = constant{
cancunBlock: big.NewInt(1702800), cancunBlock: big.NewInt(1702800),
tipUpgradeReward: big.NewInt(1773000), tipUpgradeReward: big.NewInt(1773000),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"),
xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"),

View file

@ -30,9 +30,11 @@ var localConstant = constant{
tipXDCXReceiverDisable: big.NewInt(0), tipXDCXReceiverDisable: big.NewInt(0),
eip1559Block: big.NewInt(0), eip1559Block: big.NewInt(0),
cancunBlock: big.NewInt(0), cancunBlock: big.NewInt(0),
tipUpgradeReward: big.NewInt(0),
tipEpochHalving: big.NewInt(0),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"),
xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"),

View file

@ -32,8 +32,8 @@ var MaintnetConstant = constant{
cancunBlock: big.NewInt(9999999999), cancunBlock: big.NewInt(9999999999),
tipUpgradeReward: big.NewInt(9999999999), tipUpgradeReward: big.NewInt(9999999999),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"),
xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"),

View file

@ -29,11 +29,11 @@ var TestnetConstant = constant{
tipXDCXMinerDisable: big.NewInt(61290000), // Target 31st March 2024 tipXDCXMinerDisable: big.NewInt(61290000), // Target 31st March 2024
tipXDCXReceiverDisable: big.NewInt(66825000), // Target 26 Aug 2024 tipXDCXReceiverDisable: big.NewInt(66825000), // Target 26 Aug 2024
eip1559Block: big.NewInt(71550000), // Target 14th Feb 2025 eip1559Block: big.NewInt(71550000), // Target 14th Feb 2025
cancunBlock: big.NewInt(9999999999), cancunBlock: big.NewInt(73425600),
tipUpgradeReward: big.NewInt(9999999999), tipUpgradeReward: big.NewInt(9999999999),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"),
xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"),

View file

@ -1,8 +1,7 @@
// Notice: this file only saves const variables for all network. // Notice: this file only saves const variables for all network.
// Please run the following commands after modify this file: // Please run the following commands after modify this file:
//
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.testnet // cp common/constants.go common/constants/constants.go.testnet
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.local // cp common/constants.go common/constants/constants.go.local
package common package common

View file

@ -1,8 +1,7 @@
// Notice: this file only saves const variables for all network. // Notice: this file only saves const variables for all network.
// Please run the following commands after modify this file: // Please run the following commands after modify this file:
//
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.testnet // cp common/constants.go common/constants/constants.go.testnet
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.local // cp common/constants.go common/constants/constants.go.local
package common package common

View file

@ -1,8 +1,7 @@
// Notice: this file only saves const variables for all network. // Notice: this file only saves const variables for all network.
// Please run the following commands after modify this file: // Please run the following commands after modify this file:
//
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.testnet // cp common/constants.go common/constants/constants.go.testnet
// cp common/constants.go common/constants/constants.go.devnet
// cp common/constants.go common/constants/constants.go.local // cp common/constants.go common/constants/constants.go.local
package common package common

View file

@ -602,6 +602,8 @@ func (c *ChainConfig) Description() string {
banner += fmt.Sprintf(" - Shanghai: %-8v\n", shanghaiBlock) banner += fmt.Sprintf(" - Shanghai: %-8v\n", shanghaiBlock)
banner += fmt.Sprintf(" - Eip1559: %-8v\n", eip1559Block) banner += fmt.Sprintf(" - Eip1559: %-8v\n", eip1559Block)
banner += fmt.Sprintf(" - Cancun: %-8v\n", cancunBlock) banner += fmt.Sprintf(" - Cancun: %-8v\n", cancunBlock)
banner += fmt.Sprintf(" - TIPUpgradeReward: %-8v\n", common.TIPUpgradeReward)
banner += fmt.Sprintf(" - TIPEpochHalving: %-8v\n", common.TIPEpochHalving)
banner += fmt.Sprintf(" - Engine: %v", engine) banner += fmt.Sprintf(" - Engine: %v", engine)
return banner return banner
} }