Skip to content

Commit

Permalink
Merge pull request #5355 from BitGo/COIN-2691-sdk-statics-for-babylon
Browse files Browse the repository at this point in the history
chore(statics): add babylon to statics
  • Loading branch information
MohammedRyaan786 authored Jan 10, 2025
2 parents 5d3ad72 + 49d5583 commit f08a165
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/bitgo/test/v2/unit/keychains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('V2 Keychains', function () {
n.asset !== UnderlyingAsset.OAS && // TODO(WIN-3696): remove this once coin-specific module for oas is added
n.asset !== UnderlyingAsset.COREDAO && // TODO(WIN-3696): remove this once coin-specific module for coredao is added
n.asset !== UnderlyingAsset.RUNE &&
n.asset !== UnderlyingAsset.BABY &&
coinFamilyValues.includes(n.name)
);

Expand Down
3 changes: 3 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum CoinFamily {
AVAXC = 'avaxc',
AVAXP = 'avaxp',
BASEETH = 'baseeth',
BABY = 'baby',
BCH = 'bch',
BCHA = 'bcha',
BERA = 'bera',
Expand Down Expand Up @@ -332,6 +333,7 @@ export enum UnderlyingAsset {
AVAXP = 'avaxp',
AXL = 'AXL',
AXLV2 = 'axlv2',
BABY = 'baby',
BCH = 'bch',
BCHA = 'bcha',
BERA = 'bera',
Expand Down Expand Up @@ -2423,6 +2425,7 @@ export enum BaseUnit {
ATOM = 'uatom',
APT = 'octa',
ETH = 'wei',
BABY = 'ubaby',
BTC = 'satoshi',
BSC = 'jager',
XLM = 'stroop',
Expand Down
20 changes: 20 additions & 0 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,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.filter((feature) => feature !== CoinFeature.BULK_TRANSACTION)
),
account(
'ee22282b-c307-4861-b706-d9a178326ad5',
'tbaby',
'Testnet Babylon',
Networks.test.baby,
6,
UnderlyingAsset.BABY,
BaseUnit.BABY,
COSMOS_SIDECHAIN_FEATURES.filter((feature) => feature !== CoinFeature.BULK_TRANSACTION)
),
account(
'b473d5f0-1590-4edf-bc9f-813aff515a23',
'islm',
Expand Down
14 changes: 14 additions & 0 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,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 = 'https://babylon.explorers.guru/transaction/';
}

class BabyTestnet extends Testnet implements AccountNetwork {
name = 'Testnet Babylon';
family = CoinFamily.BABY;
explorerUrl = 'https://testnet.babylon.explorers.guru/transaction/';
}

class Islm extends Mainnet implements AccountNetwork {
name = 'Haqq';
family = CoinFamily.ISLM;
Expand Down Expand Up @@ -1175,6 +1187,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()),
Expand Down Expand Up @@ -1237,6 +1250,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()),
Expand Down
2 changes: 2 additions & 0 deletions modules/statics/test/unit/fixtures/expectedColdFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const expectedColdFeatures = {
'ada',
'apt',
'atom',
'baby',
'bera',
'bld',
'bsc',
Expand All @@ -82,6 +83,7 @@ export const expectedColdFeatures = {
'tada',
'tatom',
'tapt',
'tbaby',
'tbera',
'tbld',
'tbsc',
Expand Down

0 comments on commit f08a165

Please sign in to comment.