From b385f64ff7f92fe1fbe3c62ff5985d015777b55c Mon Sep 17 00:00:00 2001 From: bruce-riley <96066700+bruce-riley@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:22:09 -0500 Subject: [PATCH] Deploy Mantle to Sepolia (#3830) --- ethereum/.env.mantle.testnet | 5 +++-- ethereum/truffle-config.js | 5 +++-- node/cmd/guardiand/node.go | 2 -- node/pkg/watchers/evm/watcher.go | 1 + sdk/js/CHANGELOG.md | 4 ++++ sdk/js/package.json | 2 +- sdk/js/src/utils/consts.ts | 6 +++--- sdk/testnet_consts.go | 4 ++-- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ethereum/.env.mantle.testnet b/ethereum/.env.mantle.testnet index fe8a0d151..c6e3f4b0a 100644 --- a/ethereum/.env.mantle.testnet +++ b/ethereum/.env.mantle.testnet @@ -6,11 +6,12 @@ INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"] INIT_CHAIN_ID=35 INIT_GOV_CHAIN_ID=0x1 INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 -INIT_EVM_CHAIN_ID=5001 +INIT_EVM_CHAIN_ID=5003 # Bridge Migrations BRIDGE_INIT_CHAIN_ID=35 BRIDGE_INIT_GOV_CHAIN_ID=0x1 BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 -BRIDGE_INIT_WETH=0xEa12Be2389c2254bAaD383c6eD1fa1e15202b52A +# Not sure if there's a WETH or not. Figure this out for Mainnet! +BRIDGE_INIT_WETH=0x0000000000000000000000000000000000000000 BRIDGE_INIT_FINALITY=1 diff --git a/ethereum/truffle-config.js b/ethereum/truffle-config.js index d0c464315..64434ab92 100644 --- a/ethereum/truffle-config.js +++ b/ethereum/truffle-config.js @@ -417,10 +417,11 @@ module.exports = { provider: () => { return new HDWalletProvider( process.env.MNEMONIC, - "https://rpc.testnet.mantle.xyz" + "https://rpc.sepolia.mantle.xyz" ); }, - network_id: 5001, + network_id: 5003, + gasPrice: 2520000000, }, rootstock: { provider: () => { diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index 087bf3a78..acb24ebab 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -692,8 +692,6 @@ func runNode(cmd *cobra.Command, args []string) { logger.Fatal("Both --scrollContract and --scrollRPC must be set together or both unset") } - // Mantle should not be allowed in mainnet until its finality policy is understood and implemented in the watcher. - // Note that as of 11/9/2023 Mantle does not support querying for `finalized` or `safe`, just `latest`, so we will need to implement a finalizer. if *mantleRPC != "" && !*testnetMode && !*unsafeDevMode { logger.Fatal("mantle is currently only supported in devnet and testnet") } diff --git a/node/pkg/watchers/evm/watcher.go b/node/pkg/watchers/evm/watcher.go index 98705dabc..73c20369a 100644 --- a/node/pkg/watchers/evm/watcher.go +++ b/node/pkg/watchers/evm/watcher.go @@ -740,6 +740,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) { w.chainID == vaa.ChainIDBSC || w.chainID == vaa.ChainIDEthereum || w.chainID == vaa.ChainIDKarura || + w.chainID == vaa.ChainIDMantle || w.chainID == vaa.ChainIDMoonbeam || w.chainID == vaa.ChainIDOptimism || w.chainID == vaa.ChainIDSepolia || diff --git a/sdk/js/CHANGELOG.md b/sdk/js/CHANGELOG.md index 49ee4ac99..4ad324268 100644 --- a/sdk/js/CHANGELOG.md +++ b/sdk/js/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.10.13 + +Mantle Sepolia support + ## 0.10.12 Polygon Sepolia support diff --git a/sdk/js/package.json b/sdk/js/package.json index 5c0a5ee23..68b31dde5 100644 --- a/sdk/js/package.json +++ b/sdk/js/package.json @@ -1,6 +1,6 @@ { "name": "@certusone/wormhole-sdk", - "version": "0.10.12", + "version": "0.10.13", "description": "SDK for interacting with Wormhole", "homepage": "https://wormhole.com", "main": "./lib/cjs/index.js", diff --git a/sdk/js/src/utils/consts.ts b/sdk/js/src/utils/consts.ts index e29f1ea6e..fb8a12129 100644 --- a/sdk/js/src/utils/consts.ts +++ b/sdk/js/src/utils/consts.ts @@ -563,9 +563,9 @@ const TESTNET = { nft_bridge: "0x47B9a1406BEe29a3001BFEB7e45aE45fFFB40c18", }, mantle: { - core: "0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35", - token_bridge: "0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e", - nft_bridge: "0x23908A62110e21C04F3A4e011d24F901F911744A", + core: "0x376428e7f26D5867e69201b275553C45B09EE090", + token_bridge: "0x75Bfa155a9D7A3714b0861c8a8aF0C4633c45b5D", + nft_bridge: "0xD7D732C8Bf5eBF620EA55b5828eae20418eEF083", }, wormchain: { core: "wormhole16jzpxp0e8550c9aht6q9svcux30vtyyyyxv5w2l2djjra46580wsazcjwp", diff --git a/sdk/testnet_consts.go b/sdk/testnet_consts.go index 94046487e..f46a1c939 100644 --- a/sdk/testnet_consts.go +++ b/sdk/testnet_consts.go @@ -25,7 +25,7 @@ var knownTestnetTokenbridgeEmitters = map[vaa.ChainID]string{ vaa.ChainIDKlaytn: "000000000000000000000000c7a13be098720840dea132d860fdfa030884b09a", vaa.ChainIDCelo: "00000000000000000000000005ca6037ec51f8b712ed2e6fa72219feae74e153", vaa.ChainIDNear: "c2c0b6ecbbe9ecf91b2b7999f0264018ba68126c2e83bf413f59f712f3a1df55", - vaa.ChainIDMantle: "000000000000000000000000C7A204bDBFe983FCD8d8E61D02b475D4073fF97e", + vaa.ChainIDMantle: "00000000000000000000000075Bfa155a9D7A3714b0861c8a8aF0C4633c45b5D", vaa.ChainIDMoonbeam: "000000000000000000000000bc976d4b9d57e57c3ca52e1fd136c45ff7955a96", vaa.ChainIDArbitrum: "00000000000000000000000023908A62110e21C04F3A4e011d24F901F911744A", vaa.ChainIDOptimism: "000000000000000000000000C7A204bDBFe983FCD8d8E61D02b475D4073fF97e", @@ -59,7 +59,7 @@ var knownTestnetNFTBridgeEmitters = map[vaa.ChainID]string{ vaa.ChainIDAcala: "00000000000000000000000096f1335e0acab3cfd9899b30b2374e25a2148a6e", vaa.ChainIDKlaytn: "00000000000000000000000094c994fc51c13101062958b567e743f1a04432de", vaa.ChainIDCelo: "000000000000000000000000acd8190f647a31e56a656748bc30f69259f245db", - vaa.ChainIDMantle: "00000000000000000000000023908A62110e21C04F3A4e011d24F901F911744A", + vaa.ChainIDMantle: "000000000000000000000000D7D732C8Bf5eBF620EA55b5828eae20418eEF083", vaa.ChainIDMoonbeam: "00000000000000000000000098a0f4b96972b32fcb3bd03caeb66a44a6ab9edb", vaa.ChainIDArbitrum: "000000000000000000000000Ee3dB83916Ccdc3593b734F7F2d16D630F39F1D0", vaa.ChainIDOptimism: "00000000000000000000000023908A62110e21C04F3A4e011d24F901F911744A",