diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index ebddc2bbf0..223fcd0b51 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -51,6 +51,7 @@ export enum CoinFamily { FIAT = 'fiat', HASH = 'hash', // Provenance HBAR = 'hbar', + ICP = 'icp', INJECTIVE = 'injective', ISLM = 'islm', KAVA = 'kava', @@ -359,6 +360,7 @@ export enum UnderlyingAsset { GTC = 'gtc', HASH = 'hash', // Provenance HBAR = 'hbar', // Hedera main coin + ICP = 'icp', INJECTIVE = 'injective', ISLM = 'islm', KAVA = 'kava', @@ -2454,6 +2456,7 @@ export enum BaseUnit { TCOREUM = 'utestcore', // Coreum testnet uses different name for native coin ISLM = 'aISLM', RUNE = 'rune', + ICP = 'icp', } export interface BaseCoinConstructorOptions { diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index 8f022b78d9..085b3f142d 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -430,6 +430,15 @@ const APT_FEATURES = [ CoinFeature.BULK_STAKING_TRANSACTION, CoinFeature.SUPPORTS_TOKENS, ]; +const ICP_FEATURES = [ + ...AccountCoin.DEFAULT_FEATURES, + CoinFeature.TSS, + CoinFeature.TSS_COLD, + CoinFeature.STAKING, + CoinFeature.BULK_TRANSACTION, + CoinFeature.BULK_STAKING_TRANSACTION, + CoinFeature.SUPPORTS_TOKENS, +]; 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 = [ @@ -1418,6 +1427,28 @@ export const coins = CoinMap.fromCoins([ APT_FEATURES, KeyCurve.Ed25519 ), + account( + '35254b6a-5370-4e22-844b-be504b510103', + 'icp', + 'internet computer', + Networks.main.icp, + 8, + UnderlyingAsset.ICP, + BaseUnit.ICP, + ICP_FEATURES, + KeyCurve.Ed25519 + ), + account( + 'ce572773-26c2-4038-a96d-26649a9a96df', + 'ticp', + 'Testnet icp', + Networks.test.icp, + 8, + UnderlyingAsset.ICP, + BaseUnit.ICP, + ICP_FEATURES, + KeyCurve.Ed25519 + ), erc20CompatibleAccountCoin( 'bfae821b-cf3a-4190-b1a8-a54af51d730e', 'celo', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index fbad3f76b2..9593ca9547 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -163,6 +163,17 @@ class AptTestnet extends Testnet implements AccountNetwork { explorerUrl = 'https://explorer.aptoslabs.com/?network=testnet'; } +class Icp extends Mainnet implements AccountNetwork { + name = 'Icp'; + family = CoinFamily.ICP; + explorerUrl = 'https://www.icpexplorer.org'; //TODO update to the prod rosetta explorer ticket: WIN-4236 +} + +class IcpTestnet extends Testnet implements AccountNetwork { + name = 'Testnet Icp'; + family = CoinFamily.ICP; + explorerUrl = 'https://www.icpexplorer.org'; //TODO update to the test rosetta explorer ticket: WIN-4236 +} class Arbitrum extends Mainnet implements EthereumNetwork { name = 'Arbitrum'; family = CoinFamily.ARBETH; @@ -1176,6 +1187,7 @@ export const Networks = { fiat: Object.freeze(new Fiat()), hash: Object.freeze(new Hash()), hedera: Object.freeze(new Hedera()), + icp: Object.freeze(new Icp()), injective: Object.freeze(new Injective()), islm: Object.freeze(new Islm()), kava: Object.freeze(new Kava()), @@ -1236,6 +1248,7 @@ export const Networks = { ethereumClassicTestnet: Object.freeze(new EthereumClassicTestnet()), hash: Object.freeze(new HashTestnet()), hedera: Object.freeze(new HederaTestnet()), + icp: Object.freeze(new IcpTestnet()), injective: Object.freeze(new InjectiveTestnet()), islm: Object.freeze(new IslmTestnet()), kava: Object.freeze(new KavaTestnet()), diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index ce860342a8..07581eed2a 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -67,6 +67,7 @@ export const expectedColdFeatures = { 'coreum', 'dot', 'hash', + 'icp', 'islm', 'injective', 'kava', @@ -89,6 +90,7 @@ export const expectedColdFeatures = { 'thash', 'thorchain:rune', 'tia', + 'ticp', 'tislm', 'tinjective', 'tkava',