diff --git a/ethereum/env/.env.monad.testnet b/ethereum/env/.env.monad.testnet new file mode 100644 index 0000000000..eb2d0bfc75 --- /dev/null +++ b/ethereum/env/.env.monad.testnet @@ -0,0 +1,14 @@ +# Monad testnet env +# Rename to .env + +# Common config for forge deployment +RPC_URL=public_url + +# Wormhole Core Migrations +INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"] +INIT_CHAIN_ID=48 +INIT_GOV_CHAIN_ID=0x1 +INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 +INIT_EVM_CHAIN_ID=10143 + +# Not deploying the token bridge at this time. \ No newline at end of file diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index d5646dd8a7..208d355317 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -195,6 +195,9 @@ var ( worldchainRPC *string worldchainContract *string + monadRPC *string + monadContract *string + monadDevnetRPC *string monadDevnetContract *string @@ -431,6 +434,9 @@ func init() { hyperEvmRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "hyperEvmRPC", "HyperEVM RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"}) hyperEvmContract = NodeCmd.Flags().String("hyperEvmContract", "", "HyperEVM contract address") + monadRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "monadRPC", "Monad RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"}) + monadContract = NodeCmd.Flags().String("monadContract", "", "Monad contract address") + seiEvmRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "seiEvmRPC", "SeiEVM RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"}) seiEvmContract = NodeCmd.Flags().String("seiEvmContract", "", "SeiEVM contract address") @@ -825,6 +831,7 @@ func runNode(cmd *cobra.Command, args []string) { *worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", true) *inkContract = checkEvmArgs(logger, *inkRPC, *inkContract, "ink", false) *hyperEvmContract = checkEvmArgs(logger, *hyperEvmRPC, *hyperEvmContract, "hyperEvm", false) + *monadContract = checkEvmArgs(logger, *monadRPC, *monadContract, "monad", false) *seiEvmContract = checkEvmArgs(logger, *seiEvmRPC, *seiEvmContract, "seiEvm", false) // These chains will only ever be testnet / devnet. @@ -953,6 +960,7 @@ func runNode(cmd *cobra.Command, args []string) { rpcMap["klaytnRPC"] = *klaytnRPC rpcMap["lineaRPC"] = *lineaRPC rpcMap["mantleRPC"] = *mantleRPC + rpcMap["monadRPC"] = *monadRPC rpcMap["moonbeamRPC"] = *moonbeamRPC rpcMap["nearRPC"] = *nearRPC rpcMap["oasisRPC"] = *oasisRPC @@ -1457,6 +1465,18 @@ func runNode(cmd *cobra.Command, args []string) { watcherConfigs = append(watcherConfigs, wc) } + if shouldStart(monadRPC) { + wc := &evm.WatcherConfig{ + NetworkID: "monad", + ChainID: vaa.ChainIDMonad, + Rpc: *monadRPC, + Contract: *monadContract, + CcqBackfillCache: *ccqBackfillCache, + } + + watcherConfigs = append(watcherConfigs, wc) + } + if shouldStart(seiEvmRPC) { wc := &evm.WatcherConfig{ NetworkID: "seievm", diff --git a/node/pkg/query/query.go b/node/pkg/query/query.go index 811e238785..43ddf437ff 100644 --- a/node/pkg/query/query.go +++ b/node/pkg/query/query.go @@ -142,6 +142,7 @@ var perChainConfig = map[vaa.ChainID]PerChainConfig{ vaa.ChainIDPolygonSepolia: {NumWorkers: 1, TimestampCacheSupported: true}, vaa.ChainIDMonadDevnet: {NumWorkers: 1, TimestampCacheSupported: true}, vaa.ChainIDHyperEVM: {NumWorkers: 1, TimestampCacheSupported: true}, + vaa.ChainIDMonad: {NumWorkers: 1, TimestampCacheSupported: true}, vaa.ChainIDSeiEVM: {NumWorkers: 1, TimestampCacheSupported: true}, } diff --git a/node/pkg/watchers/evm/watcher.go b/node/pkg/watchers/evm/watcher.go index fa230db746..70b8d379c2 100644 --- a/node/pkg/watchers/evm/watcher.go +++ b/node/pkg/watchers/evm/watcher.go @@ -715,6 +715,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) { w.chainID == vaa.ChainIDInk || w.chainID == vaa.ChainIDKarura || w.chainID == vaa.ChainIDMantle || + w.chainID == vaa.ChainIDMonad || w.chainID == vaa.ChainIDMonadDevnet || w.chainID == vaa.ChainIDMoonbeam || w.chainID == vaa.ChainIDOptimism || diff --git a/sdk/vaa/structs.go b/sdk/vaa/structs.go index 3ddd8ee835..8a1a48dc59 100644 --- a/sdk/vaa/structs.go +++ b/sdk/vaa/structs.go @@ -219,6 +219,8 @@ func (c ChainID) String() string { return "ink" case ChainIDHyperEVM: return "hyperevm" + case ChainIDMonad: + return "monad" case ChainIDCosmoshub: return "cosmoshub" case ChainIDEvmos: @@ -346,6 +348,8 @@ func ChainIDFromString(s string) (ChainID, error) { return ChainIDInk, nil case "hyperevm": return ChainIDHyperEVM, nil + case "monad": + return ChainIDMonad, nil case "cosmoshub": return ChainIDCosmoshub, nil case "seievm": @@ -430,6 +434,7 @@ func GetAllNetworkIDs() []ChainID { ChainIDWorldchain, ChainIDInk, ChainIDHyperEVM, + ChainIDMonad, ChainIDWormchain, ChainIDCosmoshub, ChainIDEvmos, @@ -538,6 +543,8 @@ const ( ChainIDInk ChainID = 46 // ChainIDHyperEVM is the ChainID of HyperEVM ChainIDHyperEVM ChainID = 47 + // ChainIDMonad is the ChainID of Monad + ChainIDMonad ChainID = 48 //ChainIDWormchain is the ChainID of Wormchain ChainIDWormchain ChainID = 3104 // ChainIDCosmoshub is the ChainID of Cosmoshub diff --git a/sdk/vaa/structs_test.go b/sdk/vaa/structs_test.go index fb5d4b58a5..8db34cea1c 100644 --- a/sdk/vaa/structs_test.go +++ b/sdk/vaa/structs_test.go @@ -70,6 +70,7 @@ func TestChainIDFromString(t *testing.T) { {input: "worldchain", output: ChainIDWorldchain}, {input: "ink", output: ChainIDInk}, {input: "hyperevm", output: ChainIDHyperEVM}, + {input: "monad", output: ChainIDMonad}, {input: "seievm", output: ChainIDSeiEVM}, {input: "wormchain", output: ChainIDWormchain}, {input: "cosmoshub", output: ChainIDCosmoshub}, @@ -131,6 +132,7 @@ func TestChainIDFromString(t *testing.T) { {input: "Worldchain", output: ChainIDWorldchain}, {input: "Ink", output: ChainIDInk}, {input: "HyperEVM", output: ChainIDHyperEVM}, + {input: "Monad", output: ChainIDMonad}, {input: "SeiEVM", output: ChainIDSeiEVM}, {input: "Wormchain", output: ChainIDWormchain}, {input: "Cosmoshub", output: ChainIDCosmoshub},