Skip to content

Commit

Permalink
ALL-2999 - Add Avalanche rpc support (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored Oct 11, 2023
1 parent 28e8a55 commit 704b347
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [4.0.17] - 2023.10.11
### Added
- Added RPC support for the AVALANCHE_C network. Users can now make RPC calls to these network using the `Network.AVALANCHE_C` network.

## [4.0.16] - 2023.10.10
### Changed
- Fixed `tatumSdk.walletProvider.use()` method to return properly typed extension instance is case of custom typed configurations.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Interact seamlessly with various blockchains through native RPC calls. Say goodb
| [Chiliz RPC](https://docs.tatum.io/docs/rpc/evm-blockchains/chiliz-rpc-documentation) |
| [Ethereum Classic RPC](https://docs.tatum.io/docs/rpc/evm-blockchains/ethereum-classic-rpc-documentation) |
| [Klaytn RPC](https://docs.tatum.io/docs/rpc/evm-blockchains/klaytn-rpc-documentation) |
| [Avalanche RPC](https://docs.tatum.io/docs/rpc/evm-blockchains/avalanche-rpc-documentation) |
| **UTXO Blockchains** |
| [Bitcoin RPC](https://docs.tatum.io/docs/rpc/utxo-blockchains/bitcoin-rpc-documentation) |
| [Litecoin RPC](https://docs.tatum.io/docs/rpc/utxo-blockchains/litecoin-rpc-documentation) |
Expand Down Expand Up @@ -435,6 +436,7 @@ This section provides a list of various blockchain network status pages, powered
| [klaytn-mainnet-archive.status.tatum.io](https://klaytn-mainnet-archive.status.tatum.io) |
| [klaytn-baobab.status.tatum.io](https://klaytn-baobab.status.tatum.io) |
| [klaytn-baobab-archive.status.tatum.io](https://klaytn-baobab-archive.status.tatum.io) |
| [avalanche-c-mainnet-archive.status.tatum.io](https://avalanche-c-mainnet-archive.status.tatum.io) |


### Load Balancer
Expand Down Expand Up @@ -528,6 +530,7 @@ Here are the list of nodes for each blockchain:
| [rpc.tatum.io/klaytn-baobab/list.json](https://rpc.tatum.io/klaytn-baobab/list.json) |
| [rpc.tatum.io/klaytn-baobab-archive/list.json](https://rpc.tatum.io/klaytn-baobab-archive/list.json) |
| [rpc.tatum.io/bitcoin-cash-mainnet/list.json](https://rpc.tatum.io/bitcoin-cash-mainnet/list.json) |
| [rpc.tatum.io/avalanche-c-mainnet-archive/list.json](https://rpc.tatum.io/avalanche-c-mainnet-archive/list.json) |


Following pattern defines the URL for fetching the list of nodes:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum",
"version": "4.0.16",
"version": "4.0.17",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
3 changes: 2 additions & 1 deletion src/dto/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export enum Network {
ARBITRUM_NOVA = 'arb-nova-mainnet',
ARBITRUM_ONE = 'arbitrum-one-mainnet',
AURORA = 'aurora-mainnet',
AVALANCHE_C = 'avax-mainnet',
AVALANCHE_C = 'avalanche-c-mainnet',
AVALANCHE_P = 'avax-p-mainnet',
AVALANCHE_X = 'avax-x-mainnet',
BINANCE_SMART_CHAIN = 'bsc-mainnet',
Expand Down Expand Up @@ -217,6 +217,7 @@ export const EVM_LOAD_BALANCER_NETWORKS = [
Network.BINANCE_SMART_CHAIN,
Network.CHILIZ,
Network.ETHEREUM_CLASSIC,
Network.AVALANCHE_C,
]

export const TRON_LOAD_BALANCER_NETWORKS = [Network.TRON]
Expand Down
9 changes: 9 additions & 0 deletions src/e2e/rpc/evm/evm.rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ const testNetworks = [
expected: { chainId: 1001 },
apiKey: process.env.V4_API_KEY_TESTNET,
},
{
network: Network.AVALANCHE_C,
expected: { chainId: 43114 },
},
{
network: Network.AVALANCHE_C_TESTNET,
expected: { chainId: 43113 },
apiKey: process.env.V3_API_KEY_TESTNET,
},
]

describe.each(testNetworks)('RPC EVM', (testNetwork) => {
Expand Down

0 comments on commit 704b347

Please sign in to comment.