Skip to content

Commit

Permalink
add setup for dev in fantom > moonbase route
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Sep 27, 2024
1 parent 83e5e6e commit d0fcf25
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ export const fantomTestnet = new EvmChain({
ChainAsset.fromAsset(ftm, {
decimals: 18,
}),
// TODO should be WGLMR
ChainAsset.fromAsset(dev, {
address: '0x41E3CFDFC255A4bF3C8D3560Bc8D3D9b5080338e',
decimals: 18,
}),
],
ecosystem: Ecosystem.AlphanetRelay,
explorer: 'https://testnet.ftmscan.com',
Expand Down
33 changes: 32 additions & 1 deletion packages/config/src/mrl-configs/fantomTestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const fantomTestnetRoutes = new ChainRoutes({
balance: BalanceBuilder().evm().erc20(),
fee: {
asset: ftmwh,
amount: 0.01,
amount: 0,
},
},
mrl: {
Expand All @@ -68,5 +68,36 @@ export const fantomTestnetRoutes = new ChainRoutes({
},
},
},
{
source: {
asset: dev,
balance: BalanceBuilder().evm().erc20(),
destinationFee: {
asset: dev,
balance: BalanceBuilder().evm().erc20(),
},
},
destination: {
asset: dev,
chain: moonbaseAlpha,
balance: BalanceBuilder().substrate().system().account(),
fee: {
asset: dev,
amount: 0,
},
},
mrl: {
isAutomatic: false,
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(),
moonChain: {
asset: dev,
fee: {
asset: dev,
amount: 0.1,
balance: BalanceBuilder().substrate().system().account(),
},
},
},
},
],
});
3 changes: 1 addition & 2 deletions packages/mrl/src/getTransferData/getSourceData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export async function getSourceData({
}

const source = route.source.chain;
const destination = route.destination.chain;
const asset = source.getChainAsset(route.source.asset);
const feeAsset = route.source.fee
? source.getChainAsset(route.source.fee.asset)
Expand All @@ -71,7 +70,7 @@ export async function getSourceData({
sourceAddress,
});

const existentialDeposit = await getExistentialDeposit(destination);
const existentialDeposit = await getExistentialDeposit(source);
const min = await getAssetMin({
asset,
builder: route.source.min,
Expand Down

0 comments on commit d0fcf25

Please sign in to comment.