Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALL-6928 - Add TON L0 #1120

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.36] - 2024.7.18

### Added

- Support for Ton mainnet & testnet

## [4.2.35] - 2024.6.18

### Updated
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.35",
"version": "4.2.36",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
2 changes: 2 additions & 0 deletions src/dto/AddressEventNotificationChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ export enum AddressEventNotificationChain {
CRO = 'CRO',
BASE = 'BASE',
AVAX = 'AVAX',
FTM = 'FTM',
OPTIMISM = 'OPTIMISM',
}
1 change: 1 addition & 0 deletions src/dto/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export enum Currency {
ATOM = 'ATOM',
IOTA = 'IOTA',
CSPR = 'CSPR',
TON = 'TON'
}

export function networkToCurrency(network: Network): Currency {
Expand Down
14 changes: 14 additions & 0 deletions src/dto/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export enum Network {
ZILLIQA = 'zilliqa-mainnet',
BITCOIN_ELECTRS = 'bitcoin-mainnet-electrs',
CASPER = 'casper-mainnet',
TON = 'ton-mainnet',


// Testnets
Expand Down Expand Up @@ -110,6 +111,7 @@ export enum Network {
IOTA_TESTNET = 'iota-testnet',
BITCOIN_ELECTRS_TESTNET = 'bitcoin-testnet-electrs',
ROSTRUM_TESTNET = 'bch-testnet-rostrum',
TON_TESTNET = 'ton-testnet'
}

export const EVM_BASED_NETWORKS = [
Expand Down Expand Up @@ -267,6 +269,7 @@ export const IOTA_LOAD_BALANCER_NETWORKS = [Network.IOTA]
export const BITCOIN_ELECTRS_NETWORKS = [Network.BITCOIN_ELECTRS, Network.BITCOIN_ELECTRS_TESTNET]
export const IOTA_NETWORKS = [Network.IOTA, Network.IOTA_TESTNET]
export const CASPER_NETWORKS = [Network.CASPER]
export const TON_NETWORKS = [Network.TON, Network.TON_TESTNET]

export const LOAD_BALANCER_NETWORKS = [
...UTXO_LOAD_BALANCER_NETWORKS,
Expand All @@ -288,6 +291,7 @@ export const LOAD_BALANCER_NETWORKS = [
...IOTA_LOAD_BALANCER_NETWORKS,
...BITCOIN_ELECTRS_NETWORKS,
...CASPER_NETWORKS,
...TON_NETWORKS,
]

export const EVM_ARCHIVE_NON_ARCHIVE_LOAD_BALANCER_NETWORKS = [
Expand Down Expand Up @@ -388,6 +392,8 @@ export const isElectrsNetwork = (network: Network) => BITCOIN_ELECTRS_NETWORKS.i

export const isCasperNetwork = (network: Network) => CASPER_NETWORKS.includes(network)

export const isTonNetwork = (network: Network) => TON_NETWORKS.includes(network)

export const isSameGetBlockNetwork = (network: Network) =>
isUtxoBasedNetwork(network) ||
isEvmBasedNetwork(network) ||
Expand Down Expand Up @@ -960,5 +966,13 @@ export const NETWORK_METADATA: Record<Network, NetworkMetadata> = {
[Network.CASPER]: {
currency: Currency.CSPR,
testnet: false,
},
[Network.TON]: {
currency: Currency.TON,
testnet: false,
},
[Network.TON_TESTNET]: {
currency: Currency.TON,
testnet: true
}
}
Loading
Loading