Skip to content

Commit

Permalink
add ValidtorV2SMCBlock constant and setup devnet block
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Lai authored and Liam Lai committed Sep 13, 2024
1 parent 6d900cc commit 4e5adf0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var BerlinBlock = big.NewInt(76321000) // Target 19th June 2024
var LondonBlock = big.NewInt(76321000) // Target 19th June 2024
var MergeBlock = big.NewInt(76321000) // Target 19th June 2024
var ShanghaiBlock = big.NewInt(76321000) // Target 19th June 2024
var ValidtorV2SMCBlock = big.NewInt(9999999999)

var TIPXDCXTestnet = big.NewInt(38383838)
var IsTestnet bool = false
Expand Down
2 changes: 2 additions & 0 deletions common/constants/constants.go.devnet
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var LondonBlock = big.NewInt(16832700)
var MergeBlock = big.NewInt(16832700)
var ShanghaiBlock = big.NewInt(16832700)
var Eip1559Block = big.NewInt(9999999999)
var ValidtorV2SMCBlock = big.NewInt(22320000)

var TIPXDCXTestnet = big.NewInt(0)
var IsTestnet bool = false
Expand All @@ -77,6 +78,7 @@ var TRC21IssuerSMCTestNet = HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44
var TRC21IssuerSMC = HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee")
var XDCXListingSMC = HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53")
var XDCXListingSMCTestNet = HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0")

var TRC21GasPriceBefore = big.NewInt(2500)
var TRC21GasPrice = big.NewInt(250000000)
var RateTopUp = big.NewInt(90) // 90%
Expand Down
1 change: 1 addition & 0 deletions common/constants/constants.go.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var LondonBlock = big.NewInt(61290000)
var MergeBlock = big.NewInt(61290000)
var ShanghaiBlock = big.NewInt(61290000) // Target 31st March 2024
var Eip1559Block = big.NewInt(9999999999)
var ValidtorV2SMCBlock = big.NewInt(9999999999)

var TIPXDCXTestnet = big.NewInt(23779191)
var IsTestnet bool = true
Expand Down
2 changes: 1 addition & 1 deletion consensus/XDPoS/engines/engine_v2/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func (x *XDPoS_v2) Finalize(chain consensus.ChainReader, header *types.Header, s
// upgrade smart contract after reward distribution
number := header.Number.Uint64()
log.Info("poc", "fun", "Finalize", "number", number)
if number == 99999999999 {
if number == common.ValidtorV2SMCBlock.Uint64() {
UpgradeXDCValidtorV2(state)
}

Expand Down

0 comments on commit 4e5adf0

Please sign in to comment.