diff --git a/modules/bitgo/test/v2/unit/keychains.ts b/modules/bitgo/test/v2/unit/keychains.ts index b720d56972..d797c49def 100644 --- a/modules/bitgo/test/v2/unit/keychains.ts +++ b/modules/bitgo/test/v2/unit/keychains.ts @@ -77,6 +77,8 @@ describe('V2 Keychains', function () { n.asset !== UnderlyingAsset.ZKETH && // TODO(WIN-1427): remove this once coin-specific module for zketh is added 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.FLR && // TODO(WIN-4215): remove this once coin-specific module for FLR is added + n.asset !== UnderlyingAsset.SGB && // TODO(WIN-4216): remove this once coin-specific module for SGB is added n.asset !== UnderlyingAsset.RUNE && n.asset !== UnderlyingAsset.BABY && coinFamilyValues.includes(n.name) diff --git a/modules/statics/src/base.ts b/modules/statics/src/base.ts index f76f24388e..d623d0820e 100644 --- a/modules/statics/src/base.ts +++ b/modules/statics/src/base.ts @@ -50,6 +50,7 @@ export enum CoinFamily { ETC = 'etc', EOS = 'eos', FIAT = 'fiat', + FLR = 'flr', HASH = 'hash', // Provenance HBAR = 'hbar', ICP = 'icp', @@ -65,6 +66,7 @@ export enum CoinFamily { OPETH = 'opeth', OSMO = 'osmo', RBTC = 'rbtc', + SGB = 'sgb', SEI = 'sei', SOL = 'sol', SUI = 'sui', @@ -359,6 +361,7 @@ export enum UnderlyingAsset { EURCV = 'eurcv', EUROC = 'euroc', EURR = 'eurr', + FLR = 'flr', GBP = 'gbp', GTC = 'gtc', HASH = 'hash', // Provenance @@ -376,6 +379,7 @@ export enum UnderlyingAsset { POLYGON = 'polygon', RBTC = 'rbtc', // RSK main coin SEI = 'sei', + SGB = 'sgb', SOL = 'sol', SUI = 'sui', STX = 'stx', @@ -2464,6 +2468,8 @@ export enum BaseUnit { RUNE = 'rune', TAO = 'rao', ICP = 'e8s', + SGB = 'sgb', + FLR = 'flr', } export interface BaseCoinConstructorOptions { diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index fb6c3e63ae..3b340d071d 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -89,7 +89,17 @@ const ETC_FEATURES = [ CoinFeature.CUSTODY_BITGO_NEW_YORK, CoinFeature.MULTISIG_COLD, ]; - +const EVM_FEATURES = [ + ...ETH_FEATURES, + CoinFeature.TSS, + CoinFeature.TSS_COLD, + CoinFeature.EVM_WALLET, + CoinFeature.MPCV2, + CoinFeature.EVM_WALLET, + CoinFeature.BULK_TRANSACTION, + CoinFeature.STUCK_TRANSACTION_MANAGEMENT_TSS, + CoinFeature.EIP1559, +]; const AVAXC_FEATURES = [ ...ETH_FEATURES_WITH_MMI, CoinFeature.CUSTODY_BITGO_GERMANY, @@ -1429,6 +1439,26 @@ export const coins = CoinMap.fromCoins([ BaseUnit.ETH, COREDAO_FEATURES ), + account( + '202caf8f-4d43-4208-b206-8231f555c518', + 'flr', + 'flare', + Networks.main.flr, + 18, + UnderlyingAsset.FLR, + BaseUnit.FLR, + EVM_FEATURES + ), + account( + 'c6b8f90b-1f89-4d26-b296-4097927f6b30', + 'sgb', + 'Songbird Testnet Flare', + Networks.test.sgb, + 18, + UnderlyingAsset.SGB, + BaseUnit.SGB, + EVM_FEATURES + ), account( '75a71e9c-e3a0-4852-8e4b-9613ffed2a4c', 'apt', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index 39070b2a6a..4d021da01c 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1149,7 +1149,50 @@ class CoredaoTestnet extends Testnet implements EthereumNetwork { forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; } - +class Flare extends Mainnet implements EthereumNetwork { + name = 'Flarechain'; + family = CoinFamily.FLR; + explorerUrl = 'https://flare-explorer.flare.network/tx'; + accountExplorerUrl = 'https://flare-explorer.flare.network/address'; + chainId = 14; + nativeCoinOperationHashPrefix = '14'; + batcherContractAddress = '0xedf1a0016d9c41d2ad0c275e1ba708361a90c0d1'; + forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; + forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; +} +class FlareTestnet extends Testnet implements EthereumNetwork { + name = 'FlarechainTestnet'; + family = CoinFamily.FLR; + explorerUrl = 'https://coston2-explorer.flare.network/tx'; + accountExplorerUrl = 'https://coston2-explorer.flare.network/address'; + chainId = 114; + nativeCoinOperationHashPrefix = '114'; + batcherContractAddress = '0xad7a34aa9c0c7cb2c4d1f07ce8d1d0530b07fe27'; + forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; + forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; +} +class Songbird extends Mainnet implements EthereumNetwork { + name = 'Songbirdchain'; + family = CoinFamily.SGB; + explorerUrl = 'https://songbird-explorer.flare.network/tx'; + accountExplorerUrl = 'https://songbird-explorer.flare.network/address'; + chainId = 19; + nativeCoinOperationHashPrefix = '19'; + batcherContractAddress = '0xedf1a0016d9c41d2ad0c275e1ba708361a90c0d1'; + forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; + forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; +} +class SongbirdTestnet extends Testnet implements EthereumNetwork { + name = 'SongbirdchainTestnet'; + family = CoinFamily.SGB; + explorerUrl = 'https://coston-explorer.flare.network/tx'; + accountExplorerUrl = 'https://coston-explorer.flare.network/address'; + chainId = 16; + nativeCoinOperationHashPrefix = '16'; + batcherContractAddress = '0xad7a34aa9c0c7cb2c4d1f07ce8d1d0530b07fe27'; + forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; + forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; +} class BaseChainTestnet extends Testnet implements EthereumNetwork { name = 'BaseChainTestnet'; family = CoinFamily.BASEETH; @@ -1210,6 +1253,7 @@ export const Networks = { ethereumClassic: Object.freeze(new EthereumClassic()), ethereumW: Object.freeze(new EthereumW()), fiat: Object.freeze(new Fiat()), + flr: Object.freeze(new Flare()), hash: Object.freeze(new Hash()), hedera: Object.freeze(new Hedera()), icp: Object.freeze(new Icp()), @@ -1227,6 +1271,7 @@ export const Networks = { rune: Object.freeze(new Rune()), stellar: Object.freeze(new Stellar()), sei: Object.freeze(new Sei()), + sgb: Object.freeze(new Songbird()), sol: Object.freeze(new Sol()), sui: Object.freeze(new Sui()), near: Object.freeze(new Near()), @@ -1271,6 +1316,7 @@ export const Networks = { eCash: Object.freeze(new ECashTestnet()), eos: Object.freeze(new EosTestnet()), fiat: Object.freeze(new FiatTestnet()), + flr: Object.freeze(new FlareTestnet()), pyrmont: Object.freeze(new Pyrmont()), ethereumClassicTestnet: Object.freeze(new EthereumClassicTestnet()), hash: Object.freeze(new HashTestnet()), @@ -1291,6 +1337,7 @@ export const Networks = { osmo: Object.freeze(new OsmoTestnet()), rbtc: Object.freeze(new RbtcTestnet()), rune: Object.freeze(new RuneTestNet()), + sgb: Object.freeze(new SongbirdTestnet()), stellar: Object.freeze(new StellarTestnet()), sei: Object.freeze(new SeiTestnet()), sol: Object.freeze(new SolTestnet()), diff --git a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts index ec3a484b40..f93a79183c 100644 --- a/modules/statics/test/unit/fixtures/expectedColdFeatures.ts +++ b/modules/statics/test/unit/fixtures/expectedColdFeatures.ts @@ -94,12 +94,14 @@ export const expectedColdFeatures = { 'thorchain:rune', 'tia', 'ticp', + 'tflr', 'tislm', 'tinjective', 'tkava', 'tnear', 'tosmo', 'tsei', + 'tsgb', 'tsol', 'tsui', 'ttao',