Skip to content

Commit ef013e9

Browse files
authored
Merge pull request #5080 from BitGo/WIN-3652_coredao_statics
feat(statics): add coredao coin config
2 parents 3a3ed54 + 8e3d536 commit ef013e9

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

modules/bitgo/test/v2/unit/keychains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe('V2 Keychains', function () {
7676
n.asset !== UnderlyingAsset.OPETH && // TODO(WIN-692): remove this once coin-specific module for opeth is added
7777
n.asset !== UnderlyingAsset.ZKETH && // TODO(WIN-1427): remove this once coin-specific module for zketh is added
7878
n.asset !== UnderlyingAsset.OAS && // TODO(WIN-3696): remove this once coin-specific module for oas is added
79+
n.asset !== UnderlyingAsset.COREDAO && // TODO(WIN-3696): remove this once coin-specific module for coredao is added
7980
n.asset !== UnderlyingAsset.RUNE &&
8081
coinFamilyValues.includes(n.name)
8182
);

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export enum CoinFamily {
3636
BTC = 'btc',
3737
BTG = 'btg',
3838
CELO = 'celo',
39+
COREDAO = 'coredao',
3940
COREUM = 'coreum',
4041
CSPR = 'cspr',
4142
DASH = 'dash',
@@ -330,6 +331,7 @@ export enum UnderlyingAsset {
330331
DASH = 'dash',
331332
DOT = 'dot',
332333
CELO = 'celo', // Celo main coin
334+
COREDAO = 'coredao',
333335
COREUM = 'coreum',
334336
CSPR = 'cspr',
335337
ETH = 'eth',

modules/statics/src/coins.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ const OAS_FEATURES = [
357357
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
358358
CoinFeature.BULK_TRANSACTION,
359359
];
360+
const COREDAO_FEATURES = [
361+
...ETH_FEATURES,
362+
CoinFeature.MULTISIG_COLD,
363+
CoinFeature.EVM_WALLET,
364+
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
365+
CoinFeature.BULK_TRANSACTION,
366+
];
360367
const ETH_FEATURES_WITH_FRANKFURT = [...ETH_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
361368
const SOL_TOKEN_FEATURES_WITH_FRANKFURT = [...SOL_TOKEN_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
362369
const XLM_TOKEN_FEATURES_WITH_FRANKFURT = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
@@ -1261,6 +1268,26 @@ export const coins = CoinMap.fromCoins([
12611268
BaseUnit.ETH,
12621269
OAS_FEATURES
12631270
),
1271+
account(
1272+
'bac24d8c-0f8f-4530-a63c-bc52458acf95',
1273+
'coredao',
1274+
'coredaochain',
1275+
Networks.main.coredao,
1276+
18,
1277+
UnderlyingAsset.COREDAO,
1278+
BaseUnit.ETH,
1279+
COREDAO_FEATURES
1280+
),
1281+
account(
1282+
'd1d5e492-be8c-4b60-b2ab-3ed26b7dd8c8',
1283+
'tcoredao',
1284+
'Testnet coredao chain',
1285+
Networks.test.coredao,
1286+
18,
1287+
UnderlyingAsset.COREDAO,
1288+
BaseUnit.ETH,
1289+
COREDAO_FEATURES
1290+
),
12641291
erc20CompatibleAccountCoin(
12651292
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
12661293
'celo',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,24 @@ class OasTestnet extends Testnet implements EthereumNetwork {
10741074
nativeCoinOperationHashPrefix = '20197';
10751075
}
10761076

1077+
class Coredao extends Mainnet implements EthereumNetwork {
1078+
name = 'Coredaochain';
1079+
family = CoinFamily.COREDAO;
1080+
explorerUrl = 'https://scan.coredao.org/tx/';
1081+
accountExplorerUrl = 'https://scan.coredao.org/address/';
1082+
chainId = 1116;
1083+
nativeCoinOperationHashPrefix = '1116';
1084+
}
1085+
1086+
class CoredaoTestnet extends Testnet implements EthereumNetwork {
1087+
name = 'CoredaochainTestnet';
1088+
family = CoinFamily.COREDAO;
1089+
explorerUrl = 'https://scan.test.btcs.network/tx/';
1090+
accountExplorerUrl = 'https://scan.test.btcs.network/address/';
1091+
chainId = 1115;
1092+
nativeCoinOperationHashPrefix = '1115';
1093+
}
1094+
10771095
class BaseChainTestnet extends Testnet implements EthereumNetwork {
10781096
name = 'BaseChainTestnet';
10791097
family = CoinFamily.BASEETH;
@@ -1120,6 +1138,7 @@ export const Networks = {
11201138
bsc: Object.freeze(new BinanceSmartChain()),
11211139
casper: Object.freeze(new Casper()),
11221140
celo: Object.freeze(new Celo()),
1141+
coredao: Object.freeze(new Coredao()),
11231142
coreum: Object.freeze(new Coreum()),
11241143
dash: Object.freeze(new Dash()),
11251144
dogecoin: Object.freeze(new Dogecoin()),
@@ -1180,6 +1199,7 @@ export const Networks = {
11801199
bld: Object.freeze(new BldTestnet()),
11811200
bsc: Object.freeze(new BinanceSmartChainTestnet()),
11821201
casper: Object.freeze(new CasperTestnet()),
1202+
coredao: Object.freeze(new CoredaoTestnet()),
11831203
celo: Object.freeze(new CeloTestnet()),
11841204
dash: Object.freeze(new DashTestnet()),
11851205
dogecoin: Object.freeze(new DogecoinTestnet()),

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const expectedColdFeatures = {
1212
'btc',
1313
'btg',
1414
'celo',
15+
'coredao',
1516
'cspr',
1617
'dash',
1718
'doge',
@@ -36,6 +37,7 @@ export const expectedColdFeatures = {
3637
'tbtc4',
3738
'tbtcbgsig',
3839
'tcelo',
40+
'tcoredao',
3941
'tcspr',
4042
'tdash',
4143
'tdoge',

0 commit comments

Comments
 (0)