Skip to content

Commit dd561b1

Browse files
authored
Changed deprecated public Ankr RPC endpoints (#822)
* Changed deprecated public Ankr RPC endpoints Ankr RPC endpoints now require an API key * fixtures reflected updated rpc
1 parent 20193bd commit dd561b1

14 files changed

+44
-46
lines changed

core/base/src/constants/rpc.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import type { Chain } from "./chains.js";
66
// prettier-ignore
77
const rpcConfig = [[
88
"Mainnet", [
9-
["Ethereum", "https://rpc.ankr.com/eth"],
9+
["Ethereum", "https://ethereum-rpc.publicnode.com"],
1010
["Solana", "https://api.mainnet-beta.solana.com"],
11-
["Polygon", "https://rpc.ankr.com/polygon"],
11+
["Polygon", "https://polygon-bor-rpc.publicnode.com"],
1212
["Bsc", "https://bscrpc.com"],
13-
["Avalanche", "https://rpc.ankr.com/avalanche"],
13+
["Avalanche", "https://avalanche-c-chain-rpc.publicnode.com"],
1414
["Fantom", "https://rpcapi.fantom.network"],
15-
["Celo", "https://rpc.ankr.com/celo"],
16-
["Moonbeam", "https://rpc.ankr.com/moonbeam"],
15+
["Celo", "https://celo-rpc.publicnode.com"],
16+
["Moonbeam", "https://moonbeam-rpc.publicnode.com"],
1717
["Sui", "https://rpc.mainnet.sui.io"],
1818
["Aptos", "https://fullnode.mainnet.aptoslabs.com/v1"],
1919
["Arbitrum", "https://arb1.arbitrum.io/rpc"],
@@ -40,11 +40,11 @@ const rpcConfig = [[
4040
["Provenance","https://rpc.provenance.io/"],
4141
["Noble", "https://noble-rpc.polkachu.com/"],
4242
["Linea", "https://rpc.linea.build"],
43-
["Scroll", "https://rpc.ankr.com/scroll"],
43+
["Scroll", "https://scroll-rpc.publicnode.com"],
4444
["Xlayer", "https://xlayerrpc.okx.com/"],
45-
["Gnosis", "https://rpc.ankr.com/gnosis"],
45+
["Gnosis", "https://gnosis-rpc.publicnode.com"],
4646
["Mantle", "https://rpc.mantle.xyz"],
47-
["Klaytn", "https://rpc.ankr.com/klaytn"],
47+
["Klaytn", "https://public-en.node.kaia.io"],
4848
["Snaxchain", "https://mainnet.snaxchain.io"],
4949
["Berachain", "https://rpc.berachain.com"],
5050
["Unichain", "https://mainnet.unichain.org"],
@@ -89,9 +89,9 @@ const rpcConfig = [[
8989
["Seievm", "https://evm-rpc-testnet.sei-apis.com/"],
9090
["Linea", "https://rpc.sepolia.linea.build"],
9191
["Xlayer", "https://testrpc.xlayer.tech/"],
92-
["Scroll", "https://rpc.ankr.com/scroll_sepolia_testnet"],
92+
["Scroll", "https://scroll-sepolia-rpc.publicnode.com"],
9393
["Gnosis", "https://rpc.chiadochain.net"],
94-
["Klaytn", "https://rpc.ankr.com/klaytn_testnet"],
94+
["Klaytn", "https://public-en-kairos.node.kaia.io"],
9595
["Snaxchain", "https://testnet.snaxchain.io"],
9696
["Unichain", "https://sepolia.unichain.org"],
9797
["Worldchain", "https://worldchain-sepolia.g.alchemy.com/public"],

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": {
77
"method": "eth_chainId",
88
"params": [],

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_TokenBridge_Transactions_Token_Transfer_Transactions_Transfer_Token.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Create_Token_Attestation_Transactions_Submit_Attestation.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getOriginalAsset_Real_Wrapped.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",
@@ -84,9 +84,9 @@
8484
"responseIsBinary": false
8585
},
8686
{
87-
"scope": "https://rpc.ankr.com:443",
87+
"scope": "https://ethereum-rpc.publicnode.com",
8888
"method": "POST",
89-
"path": "/eth",
89+
"path": "/",
9090
"body": [
9191
{
9292
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_getWrappedAsset_Real_Wrapped.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",
@@ -84,9 +84,9 @@
8484
"responseIsBinary": false
8585
},
8686
{
87-
"scope": "https://rpc.ankr.com:443",
87+
"scope": "https://ethereum-rpc.publicnode.com",
8888
"method": "POST",
89-
"path": "/eth",
89+
"path": "/",
9090
"body": [
9191
{
9292
"method": "eth_call",
@@ -158,9 +158,9 @@
158158
"responseIsBinary": false
159159
},
160160
{
161-
"scope": "https://rpc.ankr.com:443",
161+
"scope": "https://ethereum-rpc.publicnode.com",
162162
"method": "POST",
163-
"path": "/eth",
163+
"path": "/",
164164
"body": [
165165
{
166166
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Bogus.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Not_Wrapped.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_hasWrappedAsset_Real_Wrapped.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",
@@ -62,9 +62,9 @@
6262
"responseIsBinary": false
6363
},
6464
{
65-
"scope": "https://rpc.ankr.com:443",
65+
"scope": "https://ethereum-rpc.publicnode.com",
6666
"method": "POST",
67-
"path": "/eth",
67+
"path": "/",
6868
"body": [
6969
{
7070
"method": "eth_call",
@@ -135,9 +135,9 @@
135135
"responseIsBinary": false
136136
},
137137
{
138-
"scope": "https://rpc.ankr.com:443",
138+
"scope": "https://ethereum-rpc.publicnode.com",
139139
"method": "POST",
140-
"path": "/eth",
140+
"path": "/",
141141
"body": [
142142
{
143143
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Bogus.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_chainId",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Not_Wrapped.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/fixtures/TokenBridge_Tests_Get_Wrapped_Asset_Details_isWrappedAsset_Real_Wrapped.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"scope": "https://rpc.ankr.com:443",
3+
"scope": "https://ethereum-rpc.publicnode.com",
44
"method": "POST",
5-
"path": "/eth",
5+
"path": "/",
66
"body": [
77
{
88
"method": "eth_call",

platforms/evm/__tests__/integration/tokenBridge.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
CONFIG,
33
ChainAddress,
4-
DEFAULT_NETWORK,
54
Network,
65
Signature,
76
TokenBridge,
@@ -82,7 +81,7 @@ afterEach(async () => {
8281
nockBack.setMode('wild');
8382
});
8483

85-
const network = DEFAULT_NETWORK;
84+
const network = 'Mainnet';
8685
const configs = CONFIG[network].chains;
8786

8887
const TOKEN_ADDRESSES = {

platforms/evm/__tests__/unit/platform.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jest.mock('ethers', () => {
1515

1616
import {
1717
CONFIG,
18-
DEFAULT_NETWORK,
1918
chainToPlatform,
2019
chains,
2120
} from '@wormhole-foundation/sdk-connect';
@@ -35,7 +34,7 @@ const EVM_CHAINS = chains.filter(
3534
(c) => chainToPlatform(c) === EvmPlatform._platform,
3635
) as EvmChains[];
3736

38-
const network = DEFAULT_NETWORK;
37+
const network = 'Mainnet';
3938
const configs = CONFIG[network].chains;
4039

4140
// TODO:

0 commit comments

Comments
 (0)