Skip to content

Commit 4e5c948

Browse files
committed
chore(statics): add vechain to statics
Ticket: COIN-3811
1 parent ba4afc5 commit 4e5c948

File tree

6 files changed

+54
-3
lines changed

6 files changed

+54
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ describe('V2 Keychains', function () {
8080
n.asset !== UnderlyingAsset.WORLD &&
8181
n.asset !== UnderlyingAsset.STT &&
8282
n.asset !== UnderlyingAsset.SONEIUM &&
83+
n.asset !== UnderlyingAsset.VET &&
8384
coinFamilyValues.includes(n.name)
8485
);
8586

modules/statics/src/base.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export enum CoinFamily {
8282
TIA = 'tia', // Celestia
8383
TON = 'ton',
8484
TRX = 'trx',
85+
VET = 'vet',
8586
WORLD = 'world',
8687
WEMIX = 'wemix',
8788
XDC = 'xdc',
@@ -432,10 +433,11 @@ export enum UnderlyingAsset {
432433
TIA = 'tia', // Celestia
433434
TON = 'ton',
434435
TRX = 'trx',
435-
WEMIX = 'wemix',
436-
WORLD = 'world',
437436
SONEIUM = 'soneium',
438437
STT = 'stt',
438+
VET = 'vet',
439+
WEMIX = 'wemix',
440+
WORLD = 'world',
439441
XLM = 'xlm',
440442
XDC = 'xdc',
441443
XRP = 'xrp',

modules/statics/src/coinFeatures.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,3 +468,12 @@ export const BERA_BGT_FEATURES = [
468468
CoinFeature.CUSTODY_BITGO_FRANKFURT,
469469
CoinFeature.CUSTODY_BITGO_GERMANY,
470470
];
471+
472+
export const VET_FEATURES = [
473+
...AccountCoin.DEFAULT_FEATURES,
474+
CoinFeature.TSS,
475+
CoinFeature.TSS_COLD,
476+
CoinFeature.SUPPORTS_TOKENS,
477+
CoinFeature.ENTERPRISE_PAYS_FEES,
478+
CoinFeature.TSS_ENTERPRISE_PAYS_FEES,
479+
];

modules/statics/src/coins.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ import {
104104
TON_FEATURES,
105105
TRX_FEATURES,
106106
TSOL_FEATURES,
107+
VET_FEATURES,
107108
WCT_FEATURES,
108109
XLM_FEATURES,
109110
XLM_TOKEN_FEATURES_WITH_FRANKFURT,
@@ -1336,6 +1337,28 @@ export const coins = CoinMap.fromCoins([
13361337
POLYX_FEATURES,
13371338
KeyCurve.Ed25519
13381339
),
1340+
account(
1341+
'98071460-1488-4edd-857f-0899bc5eee4f',
1342+
'vet',
1343+
'Mainnet VET',
1344+
Networks.main.vet,
1345+
18, // 1 VET = 10^18 wei
1346+
UnderlyingAsset.VET,
1347+
BaseUnit.ETH, // The smallest unit of VET, similar to Ethereum, is called 'wei'.
1348+
VET_FEATURES,
1349+
KeyCurve.Secp256k1
1350+
),
1351+
account(
1352+
'b3158e80-f6ea-4922-98ab-d773a680ce76',
1353+
'tvet',
1354+
'Testnet VET',
1355+
Networks.test.vet,
1356+
18,
1357+
UnderlyingAsset.VET,
1358+
BaseUnit.ETH,
1359+
VET_FEATURES,
1360+
KeyCurve.Secp256k1
1361+
),
13391362
erc20CompatibleAccountCoin(
13401363
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
13411364
'celo',

modules/statics/src/networks.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,18 @@ class PolymeshTestnet extends Testnet implements AccountNetwork {
13771377
explorerUrl = 'https://polymesh-testnet.subscan.io/extrinsic/';
13781378
}
13791379

1380+
class Vet extends Mainnet implements AccountNetwork {
1381+
name = 'VeChain';
1382+
family = CoinFamily.VET;
1383+
explorerUrl = 'https://explore.vechain.org/';
1384+
}
1385+
1386+
class VetTestnet extends Testnet implements AccountNetwork {
1387+
name = 'VeChainTestnet';
1388+
family = CoinFamily.VET;
1389+
explorerUrl = 'https://explore-testnet.vechain.org/';
1390+
}
1391+
13801392
export const Networks = {
13811393
main: {
13821394
ada: Object.freeze(new Ada()),
@@ -1442,6 +1454,7 @@ export const Networks = {
14421454
tia: Object.freeze(new Tia()),
14431455
ton: Object.freeze(new Ton()),
14441456
trx: Object.freeze(new Trx()),
1457+
vet: Object.freeze(new Vet()),
14451458
wemix: Object.freeze(new Wemix()),
14461459
world: Object.freeze(new World()),
14471460
xdc: Object.freeze(new Xdc()),
@@ -1519,6 +1532,7 @@ export const Networks = {
15191532
tia: Object.freeze(new TiaTestnet()),
15201533
ton: Object.freeze(new TonTestnet()),
15211534
trx: Object.freeze(new TrxTestnet()),
1535+
vet: Object.freeze(new VetTestnet()),
15221536
wemix: Object.freeze(new WemixTestnet()),
15231537
world: Object.freeze(new WorldTestnet()),
15241538
xdc: Object.freeze(new XdcTestnet()),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ export const expectedColdFeatures = {
8282
'stt',
8383
'sui',
8484
'tao',
85-
'xdc',
85+
'vet',
8686
'wemix',
8787
'world',
88+
'xdc',
8889
'zeta',
8990
'tada',
9091
'tatom',
@@ -119,6 +120,7 @@ export const expectedColdFeatures = {
119120
'ttao',
120121
'tthorchain:rune',
121122
'ttia',
123+
'tvet',
122124
'txdc',
123125
'twemix',
124126
'tzeta',

0 commit comments

Comments
 (0)