Skip to content

Commit

Permalink
-wip- initial vastr and vmanta configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Feb 12, 2024
1 parent ec6f53a commit 42c8485
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ export const wftm = new Asset({
originSymbol: 'wFTM',
});

export const vastr = new Asset({
key: 'vastr',
originSymbol: 'vASTR',
});

export const vbnc = new Asset({
key: 'vbnc',
originSymbol: 'vBNC',
Expand All @@ -305,6 +310,11 @@ export const vksm = new Asset({
originSymbol: 'vKSM',
});

export const vmanta = new Asset({
key: 'vmanta',
originSymbol: 'vMANTA',
});

export const vmovr = new Asset({
key: 'vmovr',
originSymbol: 'vMOVR',
Expand Down Expand Up @@ -373,11 +383,13 @@ export const assetsList: Asset[] = [
usdcwh,
usdt,
usdtwh,
vastr,
vbnc,
vdot,
vfil,
vglmr,
vksm,
vmanta,
vmovr,
xrt,
wbtc,
Expand Down
20 changes: 20 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ import {
usdcwh,
usdt,
usdtwh,
vastr,
vbnc,
vdot,
vfil,
vglmr,
vksm,
vmanta,
vmovr,
wbtc,
weth,
Expand Down Expand Up @@ -210,6 +212,10 @@ export const bifrostPolkadot = new Parachain({
asset: fil,
id: { Token2: 4 },
},
{
asset: vastr,
id: { VToken2: 3 },
},
{
asset: vdot,
id: { VToken2: 0 },
Expand All @@ -223,6 +229,10 @@ export const bifrostPolkadot = new Parachain({
asset: vglmr,
id: { VToken2: 1 },
},
{
asset: vmanta,
id: { VToken2: 8 },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down Expand Up @@ -870,6 +880,11 @@ export const moonbeam = new EvmParachain({
asset: usdt,
id: '311091173110107856861649819128533077277',
},
{
asset: vastr,
id: '0xFffFffff55C732C47639231a4C4373245763d26E',
metadataId: '114018676402354620972806895487280206446', // registered XC20 id for ERC20 tokens
},
{
asset: vdot,
id: '0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf',
Expand All @@ -885,6 +900,11 @@ export const moonbeam = new EvmParachain({
id: '0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c',
metadataId: '204507659831918931608354793288110796652', // registered XC20 id for ERC20 tokens
},
{
asset: vmanta,
id: '0xFFfFFfFfdA2a05FB50e7ae99275F4341AEd43379',
metadataId: '289989900872525819559124583375550296953', // registered XC20 id for ERC20 tokens
},
{
asset: wbtc,
id: '0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D',
Expand Down
34 changes: 33 additions & 1 deletion packages/config/src/configs/bifrostPolkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { bnc, fil, glmr, vdot, vfil, vglmr } from '../assets';
import { bnc, fil, glmr, vastr, vdot, vfil, vglmr, vmanta } from '../assets';
import { bifrostPolkadot, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -54,6 +54,22 @@ export const bifrostPolkadotConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vastr,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.01, // TODO
asset: vastr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vdot,
balance: BalanceBuilder().substrate().tokens().accounts(),
Expand Down Expand Up @@ -102,6 +118,22 @@ export const bifrostPolkadotConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vmanta,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.2, // TODO
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
],
chain: bifrostPolkadot,
});
32 changes: 32 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import {
usdcwh,
usdt,
usdtwh,
vastr,
vdot,
vfil,
vglmr,
vmanta,
wbtc,
weth,
ztg,
Expand Down Expand Up @@ -556,6 +558,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vastr,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.0000001, // TODO
asset: vastr,
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vdot,
balance: BalanceBuilder().evm().erc20(),
Expand Down Expand Up @@ -601,6 +618,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vmanta,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.00000001,
asset: vmanta, // TODO
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: wbtc,
balance: BalanceBuilder().evm().erc20(),
Expand Down

0 comments on commit 42c8485

Please sign in to comment.