Skip to content

Commit

Permalink
add testnet network upgrade config
Browse files Browse the repository at this point in the history
Signed-off-by: pandainzoo <[email protected]>
  • Loading branch information
pandainzoo committed May 27, 2024
1 parent 757949a commit a72614d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
11 changes: 10 additions & 1 deletion core/mantle_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ var (
MetaTxV2UpgradeTime: nil, //TODO set upgrade timestamp
MetaTxV3UpgradeTime: nil, //TODO set upgrade timestamp
}
MantleSepoliaQA9UpgradeConfig = MantleUpgradeChainConfig{
ChainID: params.MantleSepoliaQA9ChainId,
BaseFeeTime: u64Ptr(0),
BVMETHMintUpgradeTime: u64Ptr(0),
MetaTxV2UpgradeTime: u64Ptr(0),
MetaTxV3UpgradeTime: u64Ptr(1716998400),
}
MantleLocalUpgradeConfig = MantleUpgradeChainConfig{
ChainID: params.MantleLocalChainId,
BaseFeeTime: u64Ptr(0),
Expand All @@ -33,7 +40,7 @@ var (
BaseFeeTime: u64Ptr(0),
BVMETHMintUpgradeTime: u64Ptr(0),
MetaTxV2UpgradeTime: u64Ptr(0),
MetaTxV3UpgradeTime: u64Ptr(0),
MetaTxV3UpgradeTime: nil,
}
)

Expand All @@ -55,6 +62,8 @@ func GetUpgradeConfigForMantle(chainID *big.Int) *MantleUpgradeChainConfig {
return &MantleMainnetUpgradeConfig
case params.MantleSepoliaChainId.Int64():
return &MantleSepoliaUpgradeConfig
case params.MantleSepoliaQA9ChainId.Int64():
return &MantleSepoliaQA9UpgradeConfig
case params.MantleLocalChainId.Int64():
return &MantleLocalUpgradeConfig
default:
Expand Down
2 changes: 1 addition & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (st *StateTransition) buyGas(metaTxV3 bool) (*big.Int, error) {
st.initialSponsorValue = sponsorAmount
st.state.SubBalance(st.msg.MetaTxParams.GasFeeSponsor, sponsorAmount)
st.state.SubBalance(st.msg.From, selfPayAmount)
log.Debug("BuyGas for metaTx",
log.Debug("BuyGas for metaTx", "v3", metaTxV3,
"sponsor", st.msg.MetaTxParams.GasFeeSponsor.String(), "amount", sponsorAmount.String(),
"user", st.msg.From.String(), "amount", selfPayAmount.String())
} else {
Expand Down
7 changes: 4 additions & 3 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ var (
BaseGoerliRegolithTime = uint64(1682614800)

// Mantle chain_id
MantleMainnetChainId = big.NewInt(5000)
MantleSepoliaChainId = big.NewInt(5003)
MantleLocalChainId = big.NewInt(17)
MantleMainnetChainId = big.NewInt(5000)
MantleSepoliaChainId = big.NewInt(5003)
MantleSepoliaQA9ChainId = big.NewInt(5003009)
MantleLocalChainId = big.NewInt(17)
)

// TrustedCheckpoints associates each known checkpoint with the genesis hash of
Expand Down

0 comments on commit a72614d

Please sign in to comment.