From eeb3f889afb12ef1f2d9723d224e5e59a9ec59d3 Mon Sep 17 00:00:00 2001 From: Seetha GR Date: Wed, 19 Jul 2023 23:33:47 +0530 Subject: [PATCH] chore(statics): update zeta token statics Ticket: WIN-141 --- modules/bitgo/test/v2/unit/keychains.ts | 1 + modules/statics/src/base.ts | 3 +++ modules/statics/src/coins.ts | 22 ++++++++++++++++++- modules/statics/src/networks.ts | 15 +++++++++++++ .../unit/fixtures/expectedColdFeatures.ts | 2 ++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/modules/bitgo/test/v2/unit/keychains.ts b/modules/bitgo/test/v2/unit/keychains.ts index d085967b96..00d9732b08 100644 --- a/modules/bitgo/test/v2/unit/keychains.ts +++ b/modules/bitgo/test/v2/unit/keychains.ts @@ -59,6 +59,7 @@ describe('V2 Keychains', function () { n.asset !== UnderlyingAsset.AVAXP && n.asset !== UnderlyingAsset.DOGE && n.asset !== UnderlyingAsset.ETHW && + n.asset !== UnderlyingAsset.ZETA && coinFamilyValues.includes(n.name) ); diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index a0e04052d2..6026808d95 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -63,6 +63,7 @@ export enum CoinFamily { XRP = 'xrp', XTZ = 'xtz', ZEC = 'zec', + ZETA = 'zeta', } /** @@ -262,6 +263,7 @@ export enum UnderlyingAsset { XRP = 'xrp', XTZ = 'xtz', ZEC = 'zec', + ZETA = 'zeta', // ERC 20 tokens '1INCH' = '1inch', @@ -1286,6 +1288,7 @@ export enum BaseUnit { BLD = 'ubld', SEI = 'usei', INJECTIVE = 'inj', + ZETA = 'azeta', } export interface BaseCoinConstructorOptions { diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index a38e54afb7..84dc9c9b72 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -223,7 +223,7 @@ const INJECTIVE_FEATURES = [ CoinFeature.TSS_COLD, CoinFeature.STAKING, ]; - +const ZETA_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD, CoinFeature.STAKING]; const GENERIC_TOKEN_FEATURES = [ CoinFeature.ACCOUNT_MODEL, CoinFeature.REQUIRES_BIG_NUMBER, @@ -901,6 +901,26 @@ export const coins = CoinMap.fromCoins([ BaseUnit.SEI, SEI_FEATURES ), + account( + '9fbfb875-fb80-4a37-b844-48b9e48dfcdd', + 'zeta', + 'Zeta', + Networks.main.zeta, + 6, + UnderlyingAsset.ZETA, + BaseUnit.ZETA, + ZETA_FEATURES + ), + account( + '1aeb7754-1518-4aac-8cc0-e4bb07713a31', + 'tzeta', + 'Testnet Zeta', + Networks.test.zeta, + 6, + UnderlyingAsset.ZETA, + BaseUnit.ZETA, + ZETA_FEATURES + ), account( '5f9506c5-f10a-43c2-92d3-52941083bbc7', 'injective', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index f707dc9c14..127d6a6d58 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -629,6 +629,19 @@ class SeiTestnet extends Testnet implements AccountNetwork { explorerUrl = 'https://sei.explorers.guru/transaction/'; } +class Zeta extends Mainnet implements AccountNetwork { + name = 'Zeta'; + family = CoinFamily.ZETA; + // TODO(WIN-142): Zeta is still only in testnet update to mainnet url when it's live + explorerUrl = 'https://explorer.zetachain.com/cc/tx/'; +} + +class ZetaTestnet extends Testnet implements AccountNetwork { + name = 'Testnet Zeta'; + family = CoinFamily.ZETA; + explorerUrl = 'https://athens3.explorer.zetachain.com/cc/tx/'; +} + class Injective extends Mainnet implements AccountNetwork { name = 'Injective'; family = CoinFamily.INJECTIVE; @@ -822,6 +835,7 @@ export const Networks = { xrp: Object.freeze(new Xrp()), xtz: Object.freeze(new Xtz()), zCash: Object.freeze(new ZCash()), + zeta: Object.freeze(new Zeta()), }, test: { ada: Object.freeze(new AdaTestnet()), @@ -867,5 +881,6 @@ export const Networks = { xrp: Object.freeze(new XrpTestnet()), xtz: Object.freeze(new XtzTestnet()), zCash: Object.freeze(new ZCashTestnet()), + zeta: Object.freeze(new ZetaTestnet()), }, }; diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index 4aa7725192..61afbdc275 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -60,6 +60,7 @@ export const expectedColdFeatures = { 'sei', 'sol', 'sui', + 'zeta', 'tada', 'tatom', 'tbld', @@ -74,6 +75,7 @@ export const expectedColdFeatures = { 'tsol', 'tsui', 'ttia', + 'tzeta', ], neither: [ 'ethw',