diff --git a/clients/js/src/consts/networks.ts b/clients/js/src/consts/networks.ts index 592f9656b7..3bf6f7b70c 100644 --- a/clients/js/src/consts/networks.ts +++ b/clients/js/src/consts/networks.ts @@ -198,9 +198,9 @@ const Mainnet = { chain_id: undefined, }, Snaxchain: { - rpc: undefined, - key: undefined, - chain_id: undefined, + rpc: "https://mainnet.snaxchain.io", + key: getEnvVar("ETH_KEY"), + chain_id: 2192, }, Seievm: { rpc: undefined, @@ -420,9 +420,9 @@ const Testnet = { chain_id: 80084, }, Snaxchain: { - rpc: "https://rpc-snaxchain-s50q0kjngn.t.conduit.xyz/", + rpc: "https://testnet.snaxchain.io", key: getEnvVar("ETH_KEY_TESTNET"), - chain_id: 2192, + chain_id: 13001, }, Seievm: { rpc: "https://evm-rpc-arctic-1.sei-apis.com/", diff --git a/ethereum/env/.env.snaxchain.testnet b/ethereum/env/.env.snaxchain.testnet index 24b89e07cc..abf997ced8 100644 --- a/ethereum/env/.env.snaxchain.testnet +++ b/ethereum/env/.env.snaxchain.testnet @@ -2,7 +2,7 @@ # Rename to .env # Common config for forge deployment -RPC_URL="https://rpc-snaxchain-s50q0kjngn.t.conduit.xyz/" +RPC_URL="https://testnet.snaxchain.io" FORGE_ARGS="--legacy" # Wormhole Core Migrations @@ -10,12 +10,12 @@ INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"] INIT_CHAIN_ID=43 INIT_GOV_CHAIN_ID=0x1 INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 -INIT_EVM_CHAIN_ID=2192 +INIT_EVM_CHAIN_ID=13001 # Bridge Migrations BRIDGE_INIT_CHAIN_ID=43 BRIDGE_INIT_GOV_CHAIN_ID=0x1 BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 BRIDGE_INIT_FINALITY=1 -# TODO: This exists. Is this what we should use? +# Snaxchain is an OP Stack chain and therefore has the same WETH address. https://docs.optimism.io/stack/protocol/features/custom-gas-token#what-is-the-wrapped-erc-20-gas-token BRIDGE_INIT_WETH=0x4200000000000000000000000000000000000006 \ No newline at end of file diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index 70196ad3f4..fffe74c890 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -663,7 +663,7 @@ func runNode(cmd *cobra.Command, args []string) { *blastContract = checkEvmArgs(logger, *blastRPC, *blastContract, "blast", true) *xlayerContract = checkEvmArgs(logger, *xlayerRPC, *xlayerContract, "xlayer", true) *berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", false) - *snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", false) + *snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", true) // These chains will only ever be testnet / devnet. *sepoliaContract = checkEvmArgs(logger, *sepoliaRPC, *sepoliaContract, "sepolia", false) diff --git a/node/pkg/governor/mainnet_chains.go b/node/pkg/governor/mainnet_chains.go index 927d578556..e6e4dc597c 100644 --- a/node/pkg/governor/mainnet_chains.go +++ b/node/pkg/governor/mainnet_chains.go @@ -40,5 +40,6 @@ func chainList() []chainConfigEntry { {emitterChainID: vaa.ChainIDBlast, dailyLimit: 500_000, bigTransactionSize: 50_000}, {emitterChainID: vaa.ChainIDXLayer, dailyLimit: 500_000, bigTransactionSize: 50_000}, {emitterChainID: vaa.ChainIDWormchain, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDSnaxchain, dailyLimit: 500_000, bigTransactionSize: 50_000}, } } diff --git a/node/pkg/governor/mainnet_tokens_test.go b/node/pkg/governor/mainnet_tokens_test.go index e4d64b23c3..4ea21aafe9 100644 --- a/node/pkg/governor/mainnet_tokens_test.go +++ b/node/pkg/governor/mainnet_tokens_test.go @@ -38,9 +38,11 @@ func TestTokenListAddressSize(t *testing.T) { // populated.) While this is not a hard requirement, it may represent that a developer has forgotten to take the step // of configuring tokens when deploying the chain. This test helps to remind them. func TestGovernedChainHasGovernedAssets(t *testing.T) { - // Add a chain ID to this set if it genuinely has no native assets that should be governed. ignoredChains := map[vaa.ChainID]bool{ + // TODO: Remove this once we have governed tokens for Snax. + vaa.ChainIDSnaxchain: true, + // Wormchain is an abstraction over IBC-connected chains so no assets are "native" to it vaa.ChainIDWormchain: true, } @@ -71,6 +73,15 @@ func TestGovernedChainHasGovernedAssets(t *testing.T) { assert.True(t, found, "Chain is governed but has no governed native assets configured") }) } + + // Make sure we're not ignoring any chains with governed tokens. + for _, tokenEntry := range tokenList() { + t.Run(vaa.ChainID(tokenEntry.chain).String(), func(t *testing.T) { + if _, exists := ignoredChains[vaa.ChainID(tokenEntry.chain)]; exists { + assert.Fail(t, "Chain is in ignoredChains but it has governed tokens") + } + }) + } } func TestTokenListTokenAddressDuplicates(t *testing.T) { diff --git a/sdk/js/src/utils/consts.ts b/sdk/js/src/utils/consts.ts index 6cd8e9347b..cd09a8c430 100644 --- a/sdk/js/src/utils/consts.ts +++ b/sdk/js/src/utils/consts.ts @@ -346,8 +346,8 @@ const MAINNET = { nft_bridge: undefined, }, snaxchain: { - core: undefined, - token_bridge: undefined, + core: "0xc1BA3CC4bFE724A08FbbFbF64F8db196738665f4", + token_bridge: "0x8B94bfE456B48a6025b92E11Be393BAa86e68410", nft_bridge: undefined, }, wormchain: { diff --git a/sdk/mainnet_consts.go b/sdk/mainnet_consts.go index d6b6a9e041..3afca58c6e 100644 --- a/sdk/mainnet_consts.go +++ b/sdk/mainnet_consts.go @@ -122,6 +122,7 @@ var knownTokenbridgeEmitters = map[vaa.ChainID]string{ vaa.ChainIDMantle: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d", vaa.ChainIDBlast: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d", vaa.ChainIDXLayer: "0000000000000000000000005537857664B0f9eFe38C9f320F75fEf23234D904", + vaa.ChainIDSnaxchain: "0000000000000000000000008B94bfE456B48a6025b92E11Be393BAa86e68410", vaa.ChainIDInjective: "00000000000000000000000045dbea4617971d93188eda21530bc6503d153313", vaa.ChainIDSui: "ccceeb29348f71bdd22ffef43a2a19c1f5b5e17c5cca5411529120182672ade5", vaa.ChainIDSei: "86c5fd957e2db8389553e1728f9c27964b22a8154091ccba54d75f4b10c61f5e", @@ -189,4 +190,5 @@ var KnownAutomaticRelayerEmitters = []struct { {ChainId: vaa.ChainIDBlast, Addr: "00000000000000000000000027428DD2d3DD32A4D7f7C497eAaa23130d894911"}, {ChainId: vaa.ChainIDMantle, Addr: "00000000000000000000000027428dd2d3dd32a4d7f7c497eaaa23130d894911"}, {ChainId: vaa.ChainIDXLayer, Addr: "00000000000000000000000027428dd2d3dd32a4d7f7c497eaaa23130d894911"}, + {ChainId: vaa.ChainIDSnaxchain, Addr: "00000000000000000000000027428DD2d3DD32A4D7f7C497eAaa23130d894911"}, }