Skip to content

Commit

Permalink
ALL-4379 - Add Cronos & Fantom (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored Feb 28, 2024
1 parent 8d422df commit 42e85da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.12] - 2024.2.28

### Added

- Added support for Cronos and Fantom rpc loadbalancer.

## [4.2.11] - 2024.2.22

### Fixed
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.2.11",
"version": "4.2.12",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
9 changes: 6 additions & 3 deletions src/dto/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export enum Network {
BITCOIN_CASH = 'bitcoin-cash-mainnet',
CARDANO_ROSETTA = 'cardano-mainnet',
CELO = 'celo-mainnet',
CRONOS = 'cro-mainnet',
CRONOS = 'cronos-mainnet',
DOGECOIN = 'doge-mainnet',
EOS = 'eos-mainnet',
HORIZEN_EON = 'eon-mainnet',
Expand Down Expand Up @@ -160,7 +160,7 @@ export const UTXO_BASED_NETWORKS = [
Network.LITECOIN,
Network.LITECOIN_TESTNET,
Network.ZCASH,
Network.ZCASH_TESTNET
Network.ZCASH_TESTNET,
]

export const UTXO_LOAD_BALANCER_ESTIMATE_FEE_NETWORKS = [Network.BITCOIN_CASH]
Expand Down Expand Up @@ -228,6 +228,8 @@ export const EVM_LOAD_BALANCER_NETWORKS = [
Network.CELO,
Network.CELO_ALFAJORES,
Network.XINFIN,
Network.FANTOM,
Network.CRONOS,
]

export const TRON_LOAD_BALANCER_NETWORKS = [Network.TRON]
Expand Down Expand Up @@ -285,7 +287,8 @@ export const isUtxoBasedNetwork = (network: Network) => UTXO_BASED_NETWORKS.incl
export const isUtxoLoadBalancerEstimateFeeNetwork = (network: Network) =>
UTXO_LOAD_BALANCER_ESTIMATE_FEE_NETWORKS.includes(network)

export const isDogecoinLoadBalancedNetwork = (network: Network) => DOGECOIN_LOAD_BALANCED_NETWORKS.includes(network)
export const isDogecoinLoadBalancedNetwork = (network: Network) =>
DOGECOIN_LOAD_BALANCED_NETWORKS.includes(network)

export const isUtxoEstimateFeeNetwork = (network: Network) => UTXO_ESTIMATE_FEE_NETWORKS.includes(network)

Expand Down
4 changes: 3 additions & 1 deletion src/e2e/rpc/evm/evm.rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const testNetworks = [
{ network: Network.ETHEREUM_SEPOLIA },
{ network: Network.ETHEREUM_HOLESKY },
{ network: Network.ETHEREUM_GOERLI, apiKey: process.env.V3_API_KEY_TESTNET },
{ network: Network.FANTOM, apiKey: process.env.V3_API_KEY_MAINNET },
{ network: Network.FANTOM },
{ network: Network.FANTOM_TESTNET, apiKey: process.env.V3_API_KEY_TESTNET },
{ network: Network.ETHEREUM_CLASSIC },
{ network: Network.POLYGON },
Expand Down Expand Up @@ -69,6 +69,8 @@ const testNetworks = [
{
network: Network.XINFIN,
},
{ network: Network.CRONOS },
{ network: Network.CRONOS_TESTNET, apiKey: process.env.V3_API_KEY_TESTNET },
]

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

0 comments on commit 42e85da

Please sign in to comment.