Skip to content

Commit ef5586d

Browse files
Merge pull request #5388 from BitGo/WIN-4173-4177-xdc-wemix
feat(statics): add xdc, wemix config
2 parents b6b3682 + 098c1ab commit ef5586d

File tree

5 files changed

+86
-1
lines changed

5 files changed

+86
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ describe('V2 Keychains', function () {
7979
n.asset !== UnderlyingAsset.COREDAO && // TODO(WIN-3696): remove this once coin-specific module for coredao is added
8080
n.asset !== UnderlyingAsset.FLR && // TODO(WIN-4215): remove this once coin-specific module for FLR is added
8181
n.asset !== UnderlyingAsset.SGB && // TODO(WIN-4216): remove this once coin-specific module for SGB is added
82+
n.asset !== UnderlyingAsset.WEMIX && // TODO(WIN-4177): remove this once coin-specific module for WEMIX is added
83+
n.asset !== UnderlyingAsset.XDC && // TODO(WIN-4173): remove this once coin-specific module for XDC is added
8284
n.asset !== UnderlyingAsset.RUNE &&
8385
n.asset !== UnderlyingAsset.BABY &&
8486
coinFamilyValues.includes(n.name)

modules/statics/src/base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export enum CoinFamily {
7777
TIA = 'tia', // Celestia
7878
TON = 'ton',
7979
TRX = 'trx',
80+
WEMIX = 'wemix',
81+
XDC = 'xdc',
8082
XLM = 'xlm',
8183
XRP = 'xrp',
8284
XTZ = 'xtz',
@@ -387,7 +389,9 @@ export enum UnderlyingAsset {
387389
TON = 'ton',
388390
TRX = 'trx',
389391
USD = 'usd',
392+
WEMIX = 'wemix',
390393
XLM = 'xlm',
394+
XDC = 'xdc',
391395
XRP = 'xrp',
392396
XTZ = 'xtz',
393397
ZEC = 'zec',

modules/statics/src/coins.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ const EVM_FEATURES = [
9393
...ETH_FEATURES,
9494
CoinFeature.TSS,
9595
CoinFeature.TSS_COLD,
96-
CoinFeature.EVM_WALLET,
9796
CoinFeature.MPCV2,
9897
CoinFeature.EVM_WALLET,
9998
CoinFeature.BULK_TRANSACTION,
@@ -1437,6 +1436,46 @@ export const coins = CoinMap.fromCoins([
14371436
BaseUnit.ETH,
14381437
COREDAO_FEATURES
14391438
),
1439+
account(
1440+
'0cdd9089-9ca6-41ea-ab2b-20211da4ac06',
1441+
'xdc',
1442+
'XDC',
1443+
Networks.main.xdc,
1444+
18,
1445+
UnderlyingAsset.XDC,
1446+
BaseUnit.ETH,
1447+
EVM_FEATURES.filter((feature) => feature !== CoinFeature.EIP1559)
1448+
),
1449+
account(
1450+
'e6ecb22e-0ae8-463a-b2fb-61502fd54240',
1451+
'txdc',
1452+
'Testnet XDC chain',
1453+
Networks.test.xdc,
1454+
18,
1455+
UnderlyingAsset.XDC,
1456+
BaseUnit.ETH,
1457+
EVM_FEATURES.filter((feature) => feature !== CoinFeature.EIP1559)
1458+
),
1459+
account(
1460+
'297edf01-b166-45fb-be6f-da6680635f72',
1461+
'wemix',
1462+
'Wemix',
1463+
Networks.main.wemix,
1464+
18,
1465+
UnderlyingAsset.WEMIX,
1466+
BaseUnit.ETH,
1467+
EVM_FEATURES
1468+
),
1469+
account(
1470+
'b18517e3-2fba-44df-be39-7ba062d14895',
1471+
'twemix',
1472+
'Testnet wemix chain',
1473+
Networks.test.wemix,
1474+
18,
1475+
UnderlyingAsset.WEMIX,
1476+
BaseUnit.ETH,
1477+
EVM_FEATURES
1478+
),
14401479
account(
14411480
'202caf8f-4d43-4208-b206-8231f555c518',
14421481
'flr',

modules/statics/src/networks.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,38 @@ class CoredaoTestnet extends Testnet implements EthereumNetwork {
11491149
forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a';
11501150
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';
11511151
}
1152+
class Xdc extends Mainnet implements EthereumNetwork {
1153+
name = 'XdcChain';
1154+
family = CoinFamily.XDC;
1155+
explorerUrl = 'https://xdcscan.com/tx';
1156+
accountExplorerUrl = 'https://xdcscan.com/address';
1157+
chainId = 50;
1158+
nativeCoinOperationHashPrefix = '50';
1159+
}
1160+
class XdcTestnet extends Testnet implements EthereumNetwork {
1161+
name = 'XdcChainTestnet';
1162+
family = CoinFamily.XDC;
1163+
explorerUrl = 'https://testnet.xdcscan.com/tx';
1164+
accountExplorerUrl = 'https://testnet.xdcscan.com/address';
1165+
chainId = 51;
1166+
nativeCoinOperationHashPrefix = '51';
1167+
}
1168+
class Wemix extends Mainnet implements EthereumNetwork {
1169+
name = 'WemixChain';
1170+
family = CoinFamily.WEMIX;
1171+
explorerUrl = 'https://explorer.wemix.com/tx';
1172+
accountExplorerUrl = 'https://explorer.wemix.com/address';
1173+
chainId = 1111;
1174+
nativeCoinOperationHashPrefix = '1111';
1175+
}
1176+
class WemixTestnet extends Testnet implements EthereumNetwork {
1177+
name = 'WemixChainTestnet';
1178+
family = CoinFamily.WEMIX;
1179+
explorerUrl = 'https://explorer.test.wemix.com/tx';
1180+
accountExplorerUrl = 'https://explorer.test.wemix.com/address';
1181+
chainId = 1112;
1182+
nativeCoinOperationHashPrefix = '1112';
1183+
}
11521184
class Flare extends Mainnet implements EthereumNetwork {
11531185
name = 'Flarechain';
11541186
family = CoinFamily.FLR;
@@ -1269,6 +1301,8 @@ export const Networks = {
12691301
tia: Object.freeze(new Tia()),
12701302
ton: Object.freeze(new Ton()),
12711303
trx: Object.freeze(new Trx()),
1304+
wemix: Object.freeze(new Wemix()),
1305+
xdc: Object.freeze(new Xdc()),
12721306
xrp: Object.freeze(new Xrp()),
12731307
xtz: Object.freeze(new Xtz()),
12741308
zCash: Object.freeze(new ZCash()),
@@ -1338,6 +1372,8 @@ export const Networks = {
13381372
tia: Object.freeze(new TiaTestnet()),
13391373
ton: Object.freeze(new TonTestnet()),
13401374
trx: Object.freeze(new TrxTestnet()),
1375+
wemix: Object.freeze(new WemixTestnet()),
1376+
xdc: Object.freeze(new XdcTestnet()),
13411377
xrp: Object.freeze(new XrpTestnet()),
13421378
xtz: Object.freeze(new XtzTestnet()),
13431379
zCash: Object.freeze(new ZCashTestnet()),

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export const expectedColdFeatures = {
8181
'sol',
8282
'sui',
8383
'tao',
84+
'xdc',
85+
'wemix',
8486
'zeta',
8587
'tada',
8688
'tatom',
@@ -109,6 +111,8 @@ export const expectedColdFeatures = {
109111
'ttao',
110112
'tthorchain:rune',
111113
'ttia',
114+
'txdc',
115+
'twemix',
112116
'tzeta',
113117
'toas',
114118
'ton',

0 commit comments

Comments
 (0)