Skip to content

Commit

Permalink
add wsethe and wbtce configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Nov 22, 2024
1 parent 28503d1 commit ee0b8d3
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
32 changes: 32 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ import {
vglmr,
vmanta,
wbtc,
wbtce,
weth,
wethe,
wifd,
wstethe,
ztg,
} from '../assets';
import {
Expand Down Expand Up @@ -967,6 +969,36 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: wbtce,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: polkadotAssetHub,
destinationFee: {
amount: 0.0000004,
asset: wbtce,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: wstethe,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: polkadotAssetHub,
destinationFee: {
amount: 0.000006,
asset: wstethe,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
],
chain: moonbeam,
});
46 changes: 46 additions & 0 deletions packages/config/src/configs/polkadotAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {
stink,
usdc,
usdt,
wbtce,
wethe,
wifd,
wstethe,
} from '../assets';
import { moonbeam, polkadotAssetHub } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
Expand Down Expand Up @@ -221,6 +223,50 @@ export const polkadotAssetHubConfig = new ChainConfig({
},
min: AssetMinBuilder().foreignAssets().asset(),
}),
new AssetConfig({
asset: wbtce,
balance: BalanceBuilder().substrate().foreignAssets().account(),
destination: moonbeam,
destinationFee: {
amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({
isAssetReserveChain: false,
}),
asset: wbtce,
balance: BalanceBuilder().substrate().assets().account(),
},
extrinsic: ExtrinsicBuilder()
.polkadotXcm()
.transferAssetsUsingTypeAndThen()
.globalConcensusEthereum(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().foreignAssets().asset(),
}),
new AssetConfig({
asset: wstethe,
balance: BalanceBuilder().substrate().foreignAssets().account(),
destination: moonbeam,
destinationFee: {
amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({
isAssetReserveChain: false,
}),
asset: wstethe,
balance: BalanceBuilder().substrate().assets().account(),
},
extrinsic: ExtrinsicBuilder()
.polkadotXcm()
.transferAssetsUsingTypeAndThen()
.globalConcensusEthereum(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().foreignAssets().asset(),
}),
],
chain: polkadotAssetHub,
});
1 change: 0 additions & 1 deletion packages/types/src/chain/parachain/Parachain.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface ChainAssetsData {
address?: string;
balanceId?: ChainAssetId;
decimals?: number;
globalConcensusId?: ChainAssetId;
id?: ChainAssetId;
metadataId?: ChainAssetId;
minId?: ChainAssetId;
Expand Down

0 comments on commit ee0b8d3

Please sign in to comment.