Skip to content

chore(statics): add vechain to statics #6030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/bitgo/test/v2/unit/keychains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('V2 Keychains', function () {
n.asset !== UnderlyingAsset.WORLD &&
n.asset !== UnderlyingAsset.STT &&
n.asset !== UnderlyingAsset.SONEIUM &&
n.asset !== UnderlyingAsset.VET &&
coinFamilyValues.includes(n.name)
);

Expand Down
6 changes: 4 additions & 2 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export enum CoinFamily {
TIA = 'tia', // Celestia
TON = 'ton',
TRX = 'trx',
VET = 'vet',
WORLD = 'world',
WEMIX = 'wemix',
XDC = 'xdc',
Expand Down Expand Up @@ -432,10 +433,11 @@ export enum UnderlyingAsset {
TIA = 'tia', // Celestia
TON = 'ton',
TRX = 'trx',
WEMIX = 'wemix',
WORLD = 'world',
SONEIUM = 'soneium',
STT = 'stt',
VET = 'vet',
WEMIX = 'wemix',
WORLD = 'world',
XLM = 'xlm',
XDC = 'xdc',
XRP = 'xrp',
Expand Down
9 changes: 9 additions & 0 deletions modules/statics/src/coinFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,12 @@ export const BERA_BGT_FEATURES = [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
];

export const VET_FEATURES = [
...AccountCoin.DEFAULT_FEATURES,
CoinFeature.TSS,
CoinFeature.TSS_COLD,
CoinFeature.SUPPORTS_TOKENS,
CoinFeature.ENTERPRISE_PAYS_FEES,
CoinFeature.TSS_ENTERPRISE_PAYS_FEES,
];
23 changes: 23 additions & 0 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import {
TON_FEATURES,
TRX_FEATURES,
TSOL_FEATURES,
VET_FEATURES,
WCT_FEATURES,
XLM_FEATURES,
XLM_TOKEN_FEATURES_WITH_FRANKFURT,
Expand Down Expand Up @@ -1336,6 +1337,28 @@ export const coins = CoinMap.fromCoins([
POLYX_FEATURES,
KeyCurve.Ed25519
),
account(
'98071460-1488-4edd-857f-0899bc5eee4f',
'vet',
'Mainnet VET',
Networks.main.vet,
18, // 1 VET = 10^18 wei
UnderlyingAsset.VET,
BaseUnit.ETH, // The smallest unit of VET, similar to Ethereum, is called 'wei'.
VET_FEATURES,
KeyCurve.Secp256k1
),
account(
'b3158e80-f6ea-4922-98ab-d773a680ce76',
'tvet',
'Testnet VET',
Networks.test.vet,
18,
UnderlyingAsset.VET,
BaseUnit.ETH,
VET_FEATURES,
KeyCurve.Secp256k1
),
erc20CompatibleAccountCoin(
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
'celo',
Expand Down
14 changes: 14 additions & 0 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,18 @@ class PolymeshTestnet extends Testnet implements AccountNetwork {
explorerUrl = 'https://polymesh-testnet.subscan.io/extrinsic/';
}

class Vet extends Mainnet implements AccountNetwork {
name = 'VeChain';
family = CoinFamily.VET;
explorerUrl = 'https://explore.vechain.org/';
}

class VetTestnet extends Testnet implements AccountNetwork {
name = 'VeChainTestnet';
family = CoinFamily.VET;
explorerUrl = 'https://explore-testnet.vechain.org/';
}

export const Networks = {
main: {
ada: Object.freeze(new Ada()),
Expand Down Expand Up @@ -1442,6 +1454,7 @@ export const Networks = {
tia: Object.freeze(new Tia()),
ton: Object.freeze(new Ton()),
trx: Object.freeze(new Trx()),
vet: Object.freeze(new Vet()),
wemix: Object.freeze(new Wemix()),
world: Object.freeze(new World()),
xdc: Object.freeze(new Xdc()),
Expand Down Expand Up @@ -1519,6 +1532,7 @@ export const Networks = {
tia: Object.freeze(new TiaTestnet()),
ton: Object.freeze(new TonTestnet()),
trx: Object.freeze(new TrxTestnet()),
vet: Object.freeze(new VetTestnet()),
wemix: Object.freeze(new WemixTestnet()),
world: Object.freeze(new WorldTestnet()),
xdc: Object.freeze(new XdcTestnet()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ export const expectedColdFeatures = {
'stt',
'sui',
'tao',
'xdc',
'vet',
'wemix',
'world',
'xdc',
'zeta',
'tada',
'tatom',
Expand Down Expand Up @@ -119,6 +120,7 @@ export const expectedColdFeatures = {
'ttao',
'tthorchain:rune',
'ttia',
'tvet',
'txdc',
'twemix',
'tzeta',
Expand Down