clients/js: Use ankr RPC instead of infura

This commit is contained in:
Csongor Kiss 2022-06-25 15:01:03 +01:00 committed by Csongor Kiss
parent f1dba4adfe
commit e65176d492
2 changed files with 24 additions and 24 deletions

View File

@ -31,7 +31,7 @@ const MAINNET = {
key: get_env_var("TERRA_MNEMONIC"), key: get_env_var("TERRA_MNEMONIC"),
}, },
ethereum: { ethereum: {
rpc: `https://mainnet.infura.io/v3/${get_env_var("INFURA_KEY")}`, rpc: `https://rpc.ankr.com/eth`,
key: get_env_var("ETH_KEY"), key: get_env_var("ETH_KEY"),
}, },
bsc: { bsc: {
@ -39,11 +39,11 @@ const MAINNET = {
key: get_env_var("ETH_KEY"), key: get_env_var("ETH_KEY"),
}, },
polygon: { polygon: {
rpc: "https://polygon-rpc.com", rpc: "https://rpc.ankr.com/polygon",
key: get_env_var("ETH_KEY"), key: get_env_var("ETH_KEY"),
}, },
avalanche: { avalanche: {
rpc: "https://api.avax.network/ext/bc/C/rpc", rpc: "https://rpc.ankr.com/avalanche",
key: get_env_var("ETH_KEY"), key: get_env_var("ETH_KEY"),
}, },
algorand: { algorand: {
@ -96,7 +96,7 @@ const MAINNET = {
key: get_env_var("TERRA_MNEMONIC"), key: get_env_var("TERRA_MNEMONIC"),
}, },
ropsten: { ropsten: {
rpc: `https://ropsten.infura.io/v3/${get_env_var("INFURA_KEY")}`, rpc: `https://rpc.ankr.com/eth_ropsten`,
key: get_env_var("ETH_KEY"), key: get_env_var("ETH_KEY"),
}, },
}; };
@ -116,7 +116,7 @@ const TESTNET = {
key: get_env_var("TERRA_MNEMONIC"), key: get_env_var("TERRA_MNEMONIC"),
}, },
ethereum: { ethereum: {
rpc: `https://goerli.infura.io/v3/${get_env_var("INFURA_KEY")}`, rpc: `https://rpc.ankr.com/eth_goerli`,
key: get_env_var("ETH_KEY_TESTNET"), key: get_env_var("ETH_KEY_TESTNET"),
}, },
bsc: { bsc: {
@ -124,11 +124,11 @@ const TESTNET = {
key: get_env_var("ETH_KEY_TESTNET"), key: get_env_var("ETH_KEY_TESTNET"),
}, },
polygon: { polygon: {
rpc: `https://polygon-mumbai.infura.io/v3/${get_env_var("INFURA_KEY")}`, rpc: `https://rpc.ankr.com/polygon_mumbai`,
key: get_env_var("ETH_KEY_TESTNET"), key: get_env_var("ETH_KEY_TESTNET"),
}, },
avalanche: { avalanche: {
rpc: "https://api.avax-test.network/ext/bc/C/rpc", rpc: "https://rpc.ankr.com/avalanche_fuji",
key: get_env_var("ETH_KEY_TESTNET"), key: get_env_var("ETH_KEY_TESTNET"),
}, },
oasis: { oasis: {
@ -181,7 +181,7 @@ const TESTNET = {
key: get_env_var("TERRA_MNEMONIC"), key: get_env_var("TERRA_MNEMONIC"),
}, },
ropsten: { ropsten: {
rpc: `https://ropsten.infura.io/v3/${get_env_var("INFURA_KEY")}`, rpc: `https://rpc.ankr.com/eth_ropsten`,
key: get_env_var("ETH_KEY_TESTNET"), key: get_env_var("ETH_KEY_TESTNET"),
}, },
}; };
@ -210,15 +210,15 @@ const DEVNET = {
}, },
polygon: { polygon: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
avalanche: { avalanche: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
oasis: { oasis: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
algorand: { algorand: {
rpc: undefined, rpc: undefined,
@ -226,27 +226,27 @@ const DEVNET = {
}, },
fantom: { fantom: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
aurora: { aurora: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
karura: { karura: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
acala: { acala: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
klaytn: { klaytn: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
celo: { celo: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
near: { near: {
rpc: undefined, rpc: undefined,
@ -254,11 +254,11 @@ const DEVNET = {
}, },
moonbeam: { moonbeam: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
neon: { neon: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
terra2: { terra2: {
rpc: "http://localhost:1318", rpc: "http://localhost:1318",
@ -267,7 +267,7 @@ const DEVNET = {
}, },
ropsten: { ropsten: {
rpc: undefined, rpc: undefined,
key: undefined, key: "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
}, },
}; };

View File

@ -20,7 +20,7 @@ module.exports = {
provider: () => provider: () =>
new HDWalletProvider( new HDWalletProvider(
process.env.MNEMONIC, process.env.MNEMONIC,
`https://mainnet.infura.io/v3/` + process.env.INFURA_KEY "https://rpc.ankr.com/eth",
), ),
network_id: 1, network_id: 1,
gas: 10000000, gas: 10000000,
@ -33,7 +33,7 @@ module.exports = {
provider: () => provider: () =>
new HDWalletProvider( new HDWalletProvider(
process.env.MNEMONIC, process.env.MNEMONIC,
`https://rinkeby.infura.io/v3/` + process.env.INFURA_KEY "https://rpc.ankr.com/eth_rinkeby",
), ),
network_id: 4, network_id: 4,
gas: 5500000, gas: 5500000,
@ -45,7 +45,7 @@ module.exports = {
provider: () => { provider: () => {
return new HDWalletProvider( return new HDWalletProvider(
process.env.MNEMONIC, process.env.MNEMONIC,
"https://goerli.infura.io/v3/" + process.env.INFURA_KEY "https://rpc.ankr.com/eth_goerli"
); );
}, },
network_id: "5", network_id: "5",
@ -84,7 +84,7 @@ module.exports = {
provider: () => { provider: () => {
return new HDWalletProvider( return new HDWalletProvider(
process.env.MNEMONIC, process.env.MNEMONIC,
"https://polygon-mumbai.infura.io/v3/" + process.env.INFURA_KEY "https://rpc.ankr.com/polygon_mumbai",
); );
}, },
network_id: "80001", network_id: "80001",