From 4841985002422f1360cfd26eb3241e54b3f51e66 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Thu, 20 Mar 2025 10:23:40 -0500 Subject: [PATCH 1/2] Changed deprecated public Ankr RPC endpoints Ankr RPC endpoints now require an API key --- core/base/src/constants/rpc.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/base/src/constants/rpc.ts b/core/base/src/constants/rpc.ts index 87928ad22..08481850e 100644 --- a/core/base/src/constants/rpc.ts +++ b/core/base/src/constants/rpc.ts @@ -6,14 +6,14 @@ import type { Chain } from "./chains.js"; // prettier-ignore const rpcConfig = [[ "Mainnet", [ - ["Ethereum", "https://rpc.ankr.com/eth"], + ["Ethereum", "https://ethereum-rpc.publicnode.com"], ["Solana", "https://api.mainnet-beta.solana.com"], - ["Polygon", "https://rpc.ankr.com/polygon"], + ["Polygon", "https://polygon-bor-rpc.publicnode.com"], ["Bsc", "https://bscrpc.com"], - ["Avalanche", "https://rpc.ankr.com/avalanche"], + ["Avalanche", "https://avalanche-c-chain-rpc.publicnode.com"], ["Fantom", "https://rpcapi.fantom.network"], - ["Celo", "https://rpc.ankr.com/celo"], - ["Moonbeam", "https://rpc.ankr.com/moonbeam"], + ["Celo", "https://celo-rpc.publicnode.com"], + ["Moonbeam", "https://moonbeam-rpc.publicnode.com"], ["Sui", "https://rpc.mainnet.sui.io"], ["Aptos", "https://fullnode.mainnet.aptoslabs.com/v1"], ["Arbitrum", "https://arb1.arbitrum.io/rpc"], @@ -40,11 +40,11 @@ const rpcConfig = [[ ["Provenance","https://rpc.provenance.io/"], ["Noble", "https://noble-rpc.polkachu.com/"], ["Linea", "https://rpc.linea.build"], - ["Scroll", "https://rpc.ankr.com/scroll"], + ["Scroll", "https://scroll-rpc.publicnode.com"], ["Xlayer", "https://xlayerrpc.okx.com/"], - ["Gnosis", "https://rpc.ankr.com/gnosis"], + ["Gnosis", "https://gnosis-rpc.publicnode.com"], ["Mantle", "https://rpc.mantle.xyz"], - ["Klaytn", "https://rpc.ankr.com/klaytn"], + ["Klaytn", "https://public-en.node.kaia.io"], ["Snaxchain", "https://mainnet.snaxchain.io"], ["Berachain", "https://rpc.berachain.com"], ["Unichain", "https://mainnet.unichain.org"], @@ -89,9 +89,9 @@ const rpcConfig = [[ ["Seievm", "https://evm-rpc-testnet.sei-apis.com/"], ["Linea", "https://rpc.sepolia.linea.build"], ["Xlayer", "https://testrpc.xlayer.tech/"], - ["Scroll", "https://rpc.ankr.com/scroll_sepolia_testnet"], + ["Scroll", "https://scroll-sepolia-rpc.publicnode.com"], ["Gnosis", "https://rpc.chiadochain.net"], - ["Klaytn", "https://rpc.ankr.com/klaytn_testnet"], + ["Klaytn", "https://public-en-kairos.node.kaia.io"], ["Snaxchain", "https://testnet.snaxchain.io"], ["Unichain", "https://sepolia.unichain.org"], ["Worldchain", "https://worldchain-sepolia.g.alchemy.com/public"], From 5e141382bb63514b10e36c0119a5f47891cf6e87 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Thu, 20 Mar 2025 11:28:48 -0500 Subject: [PATCH 2/2] fixtures reflected updated rpc --- .../TokenBridge_Tests_Create_TokenBridge.json | 4 ++-- ...s_Token_Transfer_Transactions_Transfer_Token.json | 4 ++-- ..._Attestation_Transactions_Submit_Attestation.json | 4 ++-- ..._Asset_Details_getOriginalAsset_Real_Wrapped.json | 8 ++++---- ...d_Asset_Details_getWrappedAsset_Real_Wrapped.json | 12 ++++++------ ..._Wrapped_Asset_Details_hasWrappedAsset_Bogus.json | 4 ++-- ...set_Details_hasWrappedAsset_Real_Not_Wrapped.json | 4 ++-- ...d_Asset_Details_hasWrappedAsset_Real_Wrapped.json | 12 ++++++------ ...t_Wrapped_Asset_Details_isWrappedAsset_Bogus.json | 4 ++-- ...sset_Details_isWrappedAsset_Real_Not_Wrapped.json | 4 ++-- ...ed_Asset_Details_isWrappedAsset_Real_Wrapped.json | 4 ++-- .../evm/__tests__/integration/tokenBridge.test.ts | 3 +-- platforms/evm/__tests__/unit/platform.test.ts | 3 +-- 13 files changed, 34 insertions(+), 36 deletions(-) diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge.json index 5521aa150..c1a802c48 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": { "method": "eth_chainId", "params": [], diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge_Transactions_Token_Transfer_Transactions_Transfer_Token.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge_Transactions_Token_Transfer_Transactions_Transfer_Token.json index 18ea92135..4db631770 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge_Transactions_Token_Transfer_Transactions_Transfer_Token.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge_Transactions_Token_Transfer_Transactions_Transfer_Token.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_Token_Attestation_Transactions_Submit_Attestation.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_Token_Attestation_Transactions_Submit_Attestation.json index c98954d27..1d57f7b4a 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_Token_Attestation_Transactions_Submit_Attestation.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_Token_Attestation_Transactions_Submit_Attestation.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getOriginalAsset_Real_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getOriginalAsset_Real_Wrapped.json index 0a8cac500..68cfd4a80 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getOriginalAsset_Real_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getOriginalAsset_Real_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", @@ -84,9 +84,9 @@ "responseIsBinary": false }, { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getWrappedAsset_Real_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getWrappedAsset_Real_Wrapped.json index 997fc4836..147b8ac8d 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getWrappedAsset_Real_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getWrappedAsset_Real_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", @@ -84,9 +84,9 @@ "responseIsBinary": false }, { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", @@ -158,9 +158,9 @@ "responseIsBinary": false }, { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Bogus.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Bogus.json index 425c8c737..7891fd010 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Bogus.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Bogus.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Not_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Not_Wrapped.json index ec2a8481d..2713a1a84 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Not_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Not_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Wrapped.json index 451efea16..1bacca2be 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", @@ -62,9 +62,9 @@ "responseIsBinary": false }, { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", @@ -135,9 +135,9 @@ "responseIsBinary": false }, { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Bogus.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Bogus.json index a42afae22..90141fd73 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Bogus.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Bogus.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_chainId", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Not_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Not_Wrapped.json index 2d3346c1e..ddce84b92 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Not_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Not_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Wrapped.json b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Wrapped.json index b96a6e2cd..47a59ced4 100644 --- a/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Wrapped.json +++ b/platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Wrapped.json @@ -1,8 +1,8 @@ [ { - "scope": "https://rpc.ankr.com:443", + "scope": "https://ethereum-rpc.publicnode.com", "method": "POST", - "path": "/eth", + "path": "/", "body": [ { "method": "eth_call", diff --git a/platforms/evm/__tests__/integration/tokenBridge.test.ts b/platforms/evm/__tests__/integration/tokenBridge.test.ts index 7ec49284c..3f0d1c2c8 100644 --- a/platforms/evm/__tests__/integration/tokenBridge.test.ts +++ b/platforms/evm/__tests__/integration/tokenBridge.test.ts @@ -1,7 +1,6 @@ import { CONFIG, ChainAddress, - DEFAULT_NETWORK, Network, Signature, TokenBridge, @@ -82,7 +81,7 @@ afterEach(async () => { nockBack.setMode('wild'); }); -const network = DEFAULT_NETWORK; +const network = 'Mainnet'; const configs = CONFIG[network].chains; const TOKEN_ADDRESSES = { diff --git a/platforms/evm/__tests__/unit/platform.test.ts b/platforms/evm/__tests__/unit/platform.test.ts index a4947ad9e..72faba809 100644 --- a/platforms/evm/__tests__/unit/platform.test.ts +++ b/platforms/evm/__tests__/unit/platform.test.ts @@ -15,7 +15,6 @@ jest.mock('ethers', () => { import { CONFIG, - DEFAULT_NETWORK, chainToPlatform, chains, } from '@wormhole-foundation/sdk-connect'; @@ -35,7 +34,7 @@ const EVM_CHAINS = chains.filter( (c) => chainToPlatform(c) === EvmPlatform._platform, ) as EvmChains[]; -const network = DEFAULT_NETWORK; +const network = 'Mainnet'; const configs = CONFIG[network].chains; // TODO: