-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Parachains/Moonbase to Evm Routes (#361)
* add moonbase to fantom routes and fix configuration accordingly to consider moonChain as source * add peaqAlphanet routes * fix moonAsset retrieval * fix asset in relayer fee * remove comment * udpate snap
- Loading branch information
Showing
13 changed files
with
217 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"darwiniacrab", | ||
"derivated", | ||
"dwellir", | ||
"extrinsics", | ||
"foucoco", | ||
"ftmwh", | ||
"fullnode", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; | ||
import { dev, ftm, ftmwh } from '../assets'; | ||
import { fantomTestnet, moonbaseAlpha } from '../chains'; | ||
import { ChainRoutes } from '../types/ChainRoutes'; | ||
|
||
export const moonbaseAlphaRoutes = new ChainRoutes({ | ||
chain: moonbaseAlpha, | ||
routes: [ | ||
{ | ||
source: { | ||
asset: ftmwh, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: ftmwh, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: ftm, | ||
chain: fantomTestnet, | ||
balance: BalanceBuilder().evm().native(), | ||
fee: { | ||
asset: ftm, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomatic: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: ftmwh, | ||
fee: { | ||
asset: dev, | ||
amount: 0.1, // TODO not really, it would be the source fee as source is moonChain | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: dev, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
destinationFee: { | ||
asset: dev, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
destination: { | ||
asset: dev, | ||
chain: fantomTestnet, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: dev, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomatic: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: dev, | ||
fee: { | ||
asset: dev, | ||
amount: 0.1, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; | ||
import { agng, dev, ftm, ftmwh } from '../assets'; | ||
import { fantomTestnet, peaqAlphanet } from '../chains'; | ||
import { ChainRoutes } from '../types/ChainRoutes'; | ||
|
||
export const peaqAlphanetRoutes = new ChainRoutes({ | ||
chain: peaqAlphanet, | ||
routes: [ | ||
{ | ||
source: { | ||
asset: ftmwh, | ||
balance: BalanceBuilder().substrate().assets().account(), | ||
destinationFee: { | ||
asset: ftmwh, | ||
balance: BalanceBuilder().substrate().assets().account(), | ||
}, | ||
fee: { | ||
asset: agng, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
destination: { | ||
asset: ftm, | ||
chain: fantomTestnet, | ||
balance: BalanceBuilder().evm().native(), | ||
fee: { | ||
asset: ftm, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomatic: true, | ||
transfer: MrlBuilder().wormhole().extrinsic().polkadotXcm().send(), | ||
moonChain: { | ||
asset: ftmwh, | ||
fee: { | ||
asset: dev, | ||
amount: 0.1, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: agng, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
destinationFee: { | ||
asset: ftmwh, | ||
balance: BalanceBuilder().substrate().assets().account(), | ||
}, | ||
}, | ||
destination: { | ||
asset: ftm, | ||
chain: fantomTestnet, | ||
balance: BalanceBuilder().evm().native(), | ||
fee: { | ||
asset: ftm, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomatic: true, | ||
transfer: MrlBuilder().wormhole().extrinsic().polkadotXcm().send(), | ||
moonChain: { | ||
asset: ftmwh, | ||
fee: { | ||
asset: dev, | ||
amount: 0.1, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.