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

chore(statics): add babylon to statics #5355

Merged
merged 1 commit into from
Jan 10, 2025
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
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 @@ -331,6 +332,7 @@ export enum UnderlyingAsset {
AVAXP = 'avaxp',
AXL = 'AXL',
AXLV2 = 'axlv2',
BABY = 'baby',
BCH = 'bch',
BCHA = 'bcha',
BERA = 'bera',
Expand Down Expand Up @@ -2420,6 +2422,7 @@ export enum BaseUnit {
ATOM = 'uatom',
APT = 'octa',
ETH = 'wei',
BABY = 'ubaby',
MohammedRyaan786 marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please share the babylon docs reference in PR description which highlights 6 decimal places.

Copy link
Contributor Author

@MohammedRyaan786 MohammedRyaan786 Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the description with the right reference

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 @@ -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 = '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 @@ -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()),
Expand Down Expand Up @@ -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()),
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 @@ -81,6 +82,7 @@ export const expectedColdFeatures = {
'tada',
'tatom',
'tapt',
'tbaby',
'tbera',
'tbld',
'tbsc',
Expand Down
Loading