Skip to content

Commit

Permalink
ALL-10241 - Add ronin
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Jan 16, 2025
1 parent d28addf commit 3027430
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/dto/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export enum Currency {
CSPR = 'CSPR',
TON = 'TON',
ZKS = 'ZKS',
RON = 'RON',
}

export function networkToCurrency(network: Network): Currency {
Expand Down
12 changes: 12 additions & 0 deletions src/dto/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export enum Network {
CASPER = 'casper-mainnet',
TON = 'ton-mainnet',
ZK_SYNC = 'zksync-mainnet',
RONIN = 'ronin-mainnet',

// Testnets
ALGORAND_ALGOD_TESTNET = 'algorand-testnet-algod',
Expand Down Expand Up @@ -114,6 +115,7 @@ export enum Network {
ROSTRUM_TESTNET = 'bch-testnet-rostrum',
TON_TESTNET = 'ton-testnet',
ZK_SYNC_TESTNET = 'zksync-testnet',
RONIN_SAIGON = 'ronin-saigon',
}

export const EVM_BASED_NETWORKS = [
Expand Down Expand Up @@ -167,6 +169,8 @@ export const EVM_BASED_NETWORKS = [
Network.CHILIZ,
Network.ZK_SYNC,
Network.ZK_SYNC_TESTNET,
Network.RONIN,
Network.RONIN_SAIGON,
]

export const UTXO_BASED_NETWORKS = [
Expand Down Expand Up @@ -1001,4 +1005,12 @@ export const NETWORK_METADATA: Record<Network, NetworkMetadata> = {
testnet: true,
chainId: 300,
},
[Network.RONIN]: {
currency: Currency.RON,
testnet: false,
},
[Network.RONIN_SAIGON]: {
currency: Currency.RON,
testnet: true,
},
}
2 changes: 2 additions & 0 deletions src/e2e/rpc/evm/evm.rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const testNetworks = [
// { network: Network.OPTIMISM },
{ network: Network.HAQQ },
{ network: Network.HAQQ_TESTNET },
{ network: Network.RONIN },
{ network: Network.RONIN_SAIGON },
// {
// network: Network.TRON,
// data: {
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/rpc/other/tatum.rpc.cosmos.rosetta.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const getCosmosRosettaRpc = async () =>

const networks = [{ blockchain: 'cosmos', network: 'mainnet' }]

describe.skip.each(networks)('Cosmos Rosetta', ({ network, blockchain }) => {
describe.each(networks)('Cosmos Rosetta', ({ network, blockchain }) => {
describe('Mainnet', () => {
let tatum: CosmosRosetta

Expand Down
1 change: 1 addition & 0 deletions src/service/tatum/tatum.evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class Optimism extends NotificationEvm {}
export class Palm extends BaseEvm {}
export class Vechain extends BaseEvm {}
export class XinFin extends BaseEvm {}
export class Ronin extends BaseEvm {}
export class Base extends NotificationEvm {}
export class Flare extends NotificationEvm {}
export class Chiliz extends NotificationEvm {}
Expand Down
5 changes: 4 additions & 1 deletion src/util/util.shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import {
Oasis,
Optimism,
Palm,
Polygon,
Polygon, Ronin,
Rostrum,
Solana,
Stellar,
Expand Down Expand Up @@ -913,6 +913,9 @@ export const Utils = {
case Network.BASE:
case Network.BASE_SEPOLIA:
return new Base(id) as T
case Network.RONIN:
case Network.RONIN_SAIGON:
return new Ronin(id) as T
case Network.KADENA:
case Network.KADENA_TESTNET:
return new Kadena(id) as T
Expand Down

0 comments on commit 3027430

Please sign in to comment.