-
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.
Ethereum, moonbeam and Hydration configurations (#409)
* Ethereum, moonbeam and Hydration configurations * remove unused vars * add routes to index file * moonbeam to ethereum configurations * remove peaq routes for now * xcm config adjustments and not throw error when amount is 0 in network fee and relayer fee
- Loading branch information
Showing
13 changed files
with
796 additions
and
10 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
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,282 @@ | ||
import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; | ||
import { | ||
dai, | ||
eth, | ||
glmr, | ||
usdc, | ||
usdcwh, | ||
usdt, | ||
usdtwh, | ||
wbtc, | ||
weth, | ||
} from '../assets'; | ||
import { ethereum, hydration, moonbeam } from '../chains'; | ||
import { MrlChainRoutes } from '../types/MrlChainRoutes'; | ||
|
||
export const ethereumRoutes = new MrlChainRoutes({ | ||
chain: ethereum, | ||
routes: [ | ||
/** | ||
* Destination Hydration | ||
*/ | ||
{ | ||
source: { | ||
asset: usdc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: usdc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: usdcwh, | ||
chain: hydration, | ||
balance: BalanceBuilder().substrate().tokens().accounts(), | ||
fee: { | ||
asset: usdcwh, | ||
amount: 0.004, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: false, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: usdcwh, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: dai, | ||
chain: hydration, | ||
balance: BalanceBuilder().substrate().tokens().accounts(), | ||
fee: { | ||
asset: dai, | ||
amount: 0.004, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: false, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
/** | ||
* Destination Moonbeam | ||
*/ | ||
{ | ||
source: { | ||
asset: eth, | ||
balance: BalanceBuilder().evm().native(), | ||
destinationFee: { | ||
asset: eth, | ||
balance: BalanceBuilder().evm().native(), | ||
}, | ||
}, | ||
destination: { | ||
asset: weth, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: weth, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: weth, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: usdc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: usdc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: usdcwh, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: usdcwh, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: usdcwh, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: usdt, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: usdt, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: usdtwh, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: usdtwh, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: usdtwh, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: dai, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: dai, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: dai, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: wbtc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: wbtc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: wbtc, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: wbtc, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: wbtc, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
source: { | ||
asset: glmr, | ||
balance: BalanceBuilder().evm().erc20(), | ||
destinationFee: { | ||
asset: glmr, | ||
balance: BalanceBuilder().evm().erc20(), | ||
}, | ||
}, | ||
destination: { | ||
asset: glmr, | ||
chain: moonbeam, | ||
balance: BalanceBuilder().evm().erc20(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0, | ||
}, | ||
}, | ||
mrl: { | ||
isAutomaticPossible: true, | ||
transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(), | ||
moonChain: { | ||
asset: glmr, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
fee: { | ||
asset: glmr, | ||
amount: 0.15, | ||
balance: BalanceBuilder().substrate().system().account(), | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}); |
Oops, something went wrong.