Skip to content

Commit 8e3d536

Browse files
committed
feat(statics): add coredao coin config
Ticket: WIN-3652
1 parent f4af4ae commit 8e3d536

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
@@ -351,6 +351,13 @@ const OAS_FEATURES = [
351351
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
352352
CoinFeature.BULK_TRANSACTION,
353353
];
354+
const COREDAO_FEATURES = [
355+
...ETH_FEATURES,
356+
CoinFeature.MULTISIG_COLD,
357+
CoinFeature.EVM_WALLET,
358+
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
359+
CoinFeature.BULK_TRANSACTION,
360+
];
354361
const ETH_FEATURES_WITH_FRANKFURT = [...ETH_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
355362
const ZETA_FEATURES = [...COSMOS_SIDECHAIN_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
356363
const ZETA_EVM_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
@@ -1253,6 +1260,26 @@ export const coins = CoinMap.fromCoins([
12531260
BaseUnit.ETH,
12541261
OAS_FEATURES
12551262
),
1263+
account(
1264+
'bac24d8c-0f8f-4530-a63c-bc52458acf95',
1265+
'coredao',
1266+
'coredaochain',
1267+
Networks.main.coredao,
1268+
18,
1269+
UnderlyingAsset.COREDAO,
1270+
BaseUnit.ETH,
1271+
COREDAO_FEATURES
1272+
),
1273+
account(
1274+
'd1d5e492-be8c-4b60-b2ab-3ed26b7dd8c8',
1275+
'tcoredao',
1276+
'Testnet coredao chain',
1277+
Networks.test.coredao,
1278+
18,
1279+
UnderlyingAsset.COREDAO,
1280+
BaseUnit.ETH,
1281+
COREDAO_FEATURES
1282+
),
12561283
erc20CompatibleAccountCoin(
12571284
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
12581285
'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)