From 9c8ddc0c2542c44d71a74a0fbc5f21b72088e3b6 Mon Sep 17 00:00:00 2001 From: Mohammed Ryaan Date: Thu, 9 Jan 2025 19:21:54 +0530 Subject: [PATCH] chore(statics): add babylon to statics TICKET: COIN-2691 --- modules/statics/src/base.ts | 3 +++ modules/statics/src/coins.ts | 20 +++++++++++++++++++ modules/statics/src/networks.ts | 14 +++++++++++++ .../unit/fixtures/expectedColdFeatures.ts | 2 ++ 4 files changed, 39 insertions(+) diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index 5c58448324..744975f87e 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -28,6 +28,7 @@ export enum CoinFamily { AVAXC = 'avaxc', AVAXP = 'avaxp', BASEETH = 'baseeth', + BABY = 'baby', BCH = 'bch', BCHA = 'bcha', BERA = 'bera', @@ -331,6 +332,7 @@ export enum UnderlyingAsset { AVAXP = 'avaxp', AXL = 'AXL', AXLV2 = 'axlv2', + BABY = 'baby', BCH = 'bch', BCHA = 'bcha', BERA = 'bera', @@ -2420,6 +2422,7 @@ export enum BaseUnit { ATOM = 'uatom', APT = 'octa', ETH = 'wei', + BABY = 'ubaby', BTC = 'satoshi', BSC = 'jager', XLM = 'stroop', diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index 3e782793d8..1bb4777244 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -1155,6 +1155,26 @@ export const coins = CoinMap.fromCoins([ BaseUnit.RUNE, COSMOS_SIDECHAIN_FEATURES.filter((feature) => feature !== CoinFeature.BULK_TRANSACTION) ), + account( + '12194de6-b68f-4dfb-b74c-b18b1fbb29d6', + 'baby', + 'Babylon', + Networks.main.baby, + 6, + UnderlyingAsset.BABY, + BaseUnit.BABY, + COSMOS_SIDECHAIN_FEATURES + ), + account( + 'ee22282b-c307-4861-b706-d9a178326ad5', + 'tbaby', + 'Testnet Baby', + Networks.test.baby, + 6, + UnderlyingAsset.BABY, + BaseUnit.BABY, + COSMOS_SIDECHAIN_FEATURES + ), account( 'b473d5f0-1590-4edf-bc9f-813aff515a23', 'islm', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index d2b810c6c1..2beab846d5 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -834,6 +834,18 @@ class RuneTestNet extends Testnet implements AccountNetwork { explorerUrl = 'https://runescan.io/tx/?network=stagenet'; } +class Baby extends Mainnet implements AccountNetwork { + name = 'Babylon'; + family = CoinFamily.BABY; + explorerUrl = ''; +} + +class BabyTestnet extends Testnet implements AccountNetwork { + name = 'Testnet Babylon'; + family = CoinFamily.BABY; + explorerUrl = 'https://testnet.babylon.explorers.guru/'; +} + class Islm extends Mainnet implements AccountNetwork { name = 'Haqq'; family = CoinFamily.ISLM; @@ -1164,6 +1176,7 @@ export const Networks = { atom: Object.freeze(new Atom()), avalancheC: Object.freeze(new AvalancheC()), avalancheP: Object.freeze(new AvalancheP()), + baby: Object.freeze(new Baby()), basechain: Object.freeze(new BaseChain()), bitcoin: Object.freeze(new Bitcoin()), bitcoinCash: Object.freeze(new BitcoinCash()), @@ -1225,6 +1238,7 @@ export const Networks = { atom: Object.freeze(new AtomTestnet()), avalancheC: Object.freeze(new AvalancheCTestnet()), avalancheP: Object.freeze(new AvalanchePTestnet()), + baby: Object.freeze(new BabyTestnet()), basechain: Object.freeze(new BaseChainTestnet()), bitcoin: Object.freeze(new BitcoinTestnet()), bitcoinPublicSignet: Object.freeze(new BitcoinPublicSignet()), diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index 5e44c017ee..0e12c396e4 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -60,6 +60,7 @@ export const expectedColdFeatures = { 'ada', 'apt', 'atom', + 'baby', 'bera', 'bld', 'bsc', @@ -81,6 +82,7 @@ export const expectedColdFeatures = { 'tada', 'tatom', 'tapt', + 'tbaby', 'tbera', 'tbld', 'tbsc',