Skip to content

Commit

Permalink
chore(statics): add tao coin to statics
Browse files Browse the repository at this point in the history
TICKET: WIN-4289
  • Loading branch information
nvrakesh06 committed Jan 9, 2025
1 parent 60bfd35 commit 61e67f9
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export enum CoinFamily {
SUI = 'sui',
STX = 'stx',
SUSD = 'susd',
TAO = 'tao',
THOR = 'thor',
TIA = 'tia', // Celestia
TON = 'ton',
Expand Down Expand Up @@ -1483,6 +1484,7 @@ export enum UnderlyingAsset {
SYNCH = 'synch',
SYRUP = 'syrup',
'SYNTH-SUSD' = 'synth-susd',
TAO = 'tao',
THRESHOLD = 'threshold',
THEU = 'theu',
TAUD = 'taud',
Expand Down Expand Up @@ -2450,6 +2452,7 @@ export enum BaseUnit {
TCOREUM = 'utestcore', // Coreum testnet uses different name for native coin
ISLM = 'aISLM',
RUNE = 'rune',
TAO = 'rao',
}

export interface BaseCoinConstructorOptions {
Expand Down
24 changes: 24 additions & 0 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ const APT_FEATURES = [
CoinFeature.BULK_STAKING_TRANSACTION,
CoinFeature.SUPPORTS_TOKENS,
];
const TAO_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD, CoinFeature.STAKING];

const ETH_FEATURES_WITH_FRANKFURT = [...ETH_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
const ETH_FEATURES_WITH_FRANKFURT_GERMANY = [...ETH_FEATURES_WITH_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY];
const SOL_TOKEN_FEATURES_WITH_FRANKFURT = [
Expand Down Expand Up @@ -1418,6 +1420,28 @@ export const coins = CoinMap.fromCoins([
APT_FEATURES,
KeyCurve.Ed25519
),
account(
'a08453f0-a3be-4875-b82b-6b0c9bfa53e6',
'tao',
'Bittensor',
Networks.main.tao,
9,
UnderlyingAsset.TAO,
BaseUnit.TAO,
TAO_FEATURES,
KeyCurve.Ed25519
),
account(
'0f7a1a5b-7f34-4593-80bc-2fb4ea15ebfc',
'ttao',
'Testnet Bittensor',
Networks.test.tao,
9,
UnderlyingAsset.TAO,
BaseUnit.TAO,
TAO_FEATURES,
KeyCurve.Ed25519
),
erc20CompatibleAccountCoin(
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
'celo',
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 @@ -886,6 +886,18 @@ class Fiat extends Mainnet implements BaseNetwork {
explorerUrl = undefined;
}

class Bittensor extends Mainnet implements AccountNetwork {
name = 'Tao';
family = CoinFamily.TAO;
explorerUrl = 'https://taostats.io/evm/tx/';
}

class BittensorTestnet extends Testnet implements AccountNetwork {
name = 'Testnet Tao';
family = CoinFamily.TAO;
explorerUrl = 'https://explorer.finney.opentensor.ai/#/';
}

class Trx extends Mainnet implements TronNetwork {
name = 'Trx';
family = CoinFamily.TRX;
Expand Down Expand Up @@ -1195,6 +1207,7 @@ export const Networks = {
near: Object.freeze(new Near()),
stx: Object.freeze(new Stx()),
susd: Object.freeze(new SUSD()),
tao: Object.freeze(new Bittensor()),
tia: Object.freeze(new Tia()),
ton: Object.freeze(new Ton()),
trx: Object.freeze(new Trx()),
Expand Down Expand Up @@ -1259,6 +1272,7 @@ export const Networks = {
stx: Object.freeze(new StxTestnet()),
susd: Object.freeze(new SUSDTestnet()),
coreum: Object.freeze(new CoreumTestnet()),
tao: Object.freeze(new BittensorTestnet()),
tia: Object.freeze(new TiaTestnet()),
ton: Object.freeze(new TonTestnet()),
trx: Object.freeze(new TrxTestnet()),
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 @@ -76,6 +76,7 @@ export const expectedColdFeatures = {
'sei',
'sol',
'sui',
'tao',
'zeta',
'tada',
'tatom',
Expand All @@ -97,6 +98,7 @@ export const expectedColdFeatures = {
'tsei',
'tsol',
'tsui',
'ttao',
'tthorchain:rune',
'ttia',
'tzeta',
Expand Down

0 comments on commit 61e67f9

Please sign in to comment.