From 737ed0a8b9ef7d6756ebdbd642ba93d09d2f2b29 Mon Sep 17 00:00:00 2001 From: Mario J Maurello Date: Mon, 7 Oct 2024 15:44:26 +0200 Subject: [PATCH] add peaq evm alphanet configuration --- packages/config/src/mrl-configs/index.ts | 2 + .../config/src/mrl-configs/peaqEvmAlphanet.ts | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 packages/config/src/mrl-configs/peaqEvmAlphanet.ts diff --git a/packages/config/src/mrl-configs/index.ts b/packages/config/src/mrl-configs/index.ts index fdfb929e..5978a785 100644 --- a/packages/config/src/mrl-configs/index.ts +++ b/packages/config/src/mrl-configs/index.ts @@ -3,12 +3,14 @@ import { fantomTestnetRoutes } from './fantomTestnet'; import { moonbaseAlphaRoutes } from './moonbaseAlpha'; import { moonbaseBetaRoutes } from './moonbaseBeta'; import { peaqAlphanetRoutes } from './peaqAlphanet'; +import { peaqEvmAlphanetRoutes } from './peaqEvmAlphanet'; export const mrlRoutesList: ChainRoutes[] = [ fantomTestnetRoutes, moonbaseAlphaRoutes, moonbaseBetaRoutes, peaqAlphanetRoutes, + peaqEvmAlphanetRoutes, ]; export const mrlRoutesMap = new Map( diff --git a/packages/config/src/mrl-configs/peaqEvmAlphanet.ts b/packages/config/src/mrl-configs/peaqEvmAlphanet.ts new file mode 100644 index 00000000..8976c595 --- /dev/null +++ b/packages/config/src/mrl-configs/peaqEvmAlphanet.ts @@ -0,0 +1,49 @@ +import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; +import { agng, dev, ftm, ftmwh } from '../assets'; +import { fantomTestnet, peaqEvmAlphanet } from '../chains'; +import { ChainRoutes } from '../types/ChainRoutes'; + +export const peaqEvmAlphanetRoutes = new ChainRoutes({ + chain: peaqEvmAlphanet, + routes: [ + { + source: { + asset: ftmwh, + balance: BalanceBuilder().evm().erc20(), + destinationFee: { + asset: ftmwh, + balance: BalanceBuilder().evm().erc20(), + }, + fee: { + asset: agng, + balance: BalanceBuilder().substrate().system().accountEvmTo32(), + }, + }, + destination: { + asset: ftm, + chain: fantomTestnet, + balance: BalanceBuilder().evm().native(), + fee: { + asset: ftm, + amount: 0, + }, + }, + mrl: { + isAutomaticPossible: true, + transfer: MrlBuilder() + .wormhole() + .contract() + .TokenBridge() + .transferTokens(), + moonChain: { + asset: ftmwh, + fee: { + asset: dev, + amount: 0.1, + balance: BalanceBuilder().substrate().system().account(), + }, + }, + }, + }, + ], +});