Skip to content

Commit

Permalink
bifrost lsd asstes configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Sep 22, 2023
1 parent 299f836 commit 196eb72
Show file tree
Hide file tree
Showing 6 changed files with 292 additions and 3 deletions.
38 changes: 37 additions & 1 deletion packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const unit = new Asset({

export const usdc = new Asset({
key: 'usdc',
originSymbol: 'USDC',
originSymbol: 'USDC.Wh',
});

export const usdt = new Asset({
Expand All @@ -230,6 +230,36 @@ export const wftm = new Asset({
originSymbol: 'wFTM',
});

export const vbnc = new Asset({
key: 'xcvbnc',
originSymbol: 'vBNC',
});

export const vDOT = new Asset({
key: 'xcvdot',
originSymbol: 'vDOT',
});

export const vfil = new Asset({
key: 'xcvfil',
originSymbol: 'vFIL',
});

export const vglmr = new Asset({
key: 'xcvglmr',
originSymbol: 'vGLMR',
});

export const vksm = new Asset({
key: 'xcvksm',
originSymbol: 'vKSM',
});

export const vmovr = new Asset({
key: 'xcvmovr',
originSymbol: 'vMOVR',
});

export const xrt = new Asset({
key: 'xrt',
originSymbol: 'XRT',
Expand Down Expand Up @@ -278,6 +308,12 @@ export const assetsList: Asset[] = [
unit,
usdc,
usdt,
vbnc,
vDOT,
vfil,
vglmr,
vksm,
vmovr,
xrt,
wbtc,
weth,
Expand Down
61 changes: 61 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ import {
unit,
usdc,
usdt,
vDOT,
vbnc,
vfil,
vglmr,
vksm,
vmovr,
wbtc,
weth,
xrt,
Expand Down Expand Up @@ -152,6 +158,18 @@ export const bifrostKusama = new Parachain({
asset: bnc,
id: { Native: bnc.originSymbol },
},
{
asset: vbnc,
id: { VToken: 'BNC' },
},
{
asset: vksm,
id: { VToken: 'KSM' },
},
{
asset: vmovr,
id: { VToken: 'MOVR' },
},
],
ecosystem: Ecosystem.Kusama,
genesisHash:
Expand All @@ -173,6 +191,18 @@ export const bifrostPolkadot = new Parachain({
asset: bnc,
id: { Native: bnc.originSymbol },
},
{
asset: vDOT,
id: { VToken2: 0 },
},
{
asset: vfil,
id: { VToken2: 4 },
},
{
asset: vglmr,
id: { VToken2: 1 },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down Expand Up @@ -808,6 +838,22 @@ export const moonbeam = new EvmParachain({
asset: usdt,
id: '311091173110107856861649819128533077277',
},
{
asset: vDOT,
id: '0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: vfil,
// id: '272547899416482196831721420898811311297',
id: '0xFffffFffCd0aD0EA6576B7b285295c85E94cf4c1',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: vglmr,
id: '0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: wbtc,
id: '0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D',
Expand Down Expand Up @@ -914,6 +960,21 @@ export const moonriver = new EvmParachain({
asset: xrt,
id: '108036400430056508975016746969135344601',
},
{
asset: vbnc,
id: '0xFFffffff3646A00f78caDf8883c5A2791BfCDdc4',
metadataId: 0,
},
{
asset: vksm,
id: '0xFFffffFFC6DEec7Fc8B11A2C8ddE9a59F8c62EFe',
metadataId: 0,
},
{
asset: vmovr,
id: '0xfFfffFfF98e37bF6a393504b5aDC5B53B4D0ba11',
metadataId: 0,
},
],
ecosystem: Ecosystem.Kusama,
genesisHash:
Expand Down
50 changes: 49 additions & 1 deletion packages/config/src/configs/bifrostKusama.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, movr } from '../assets';
import { bnc, movr, vbnc, vksm, vmovr } from '../assets';
import { bifrostKusama, moonriver } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -38,6 +38,54 @@ export const bifrostKusamaConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vbnc,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonriver,
destinationFee: {
amount: 0.2,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vksm,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonriver,
destinationFee: {
amount: 0.2,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vmovr,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonriver,
destinationFee: {
amount: 0.2,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
],
chain: bifrostKusama,
});
50 changes: 49 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, glmr } from '../assets';
import { bnc, glmr, vDOT, vfil, vglmr } from '../assets';
import { bifrostPolkadot, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -38,6 +38,54 @@ export const bifrostPolkadotConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vDOT,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.2,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vfil,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.2,
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().currencyMetadatas(),
}),
new AssetConfig({
asset: vglmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.2,
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,
});
48 changes: 48 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import {
ring,
usdc,
usdt,
vDOT,
vfil,
vglmr,
wbtc,
weth,
} from '../assets';
Expand Down Expand Up @@ -390,6 +393,51 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vDOT,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.0000001,
asset: vDOT,
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vfil,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.00000001,
asset: vfil,
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: vglmr,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: bifrostPolkadot,
destinationFee: {
amount: 0.00000001,
asset: vglmr,
balance: BalanceBuilder().evm().erc20(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: wbtc,
balance: BalanceBuilder().evm().erc20(),
Expand Down
Loading

0 comments on commit 196eb72

Please sign in to comment.