Skip to content

Commit

Permalink
ALL-6928 - Add TON L0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Jul 17, 2024
1 parent 5f87a32 commit 0013aff
Show file tree
Hide file tree
Showing 146 changed files with 3,900 additions and 14 deletions.
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

0 comments on commit 0013aff

Please sign in to comment.