diff --git a/packages/config/src/config/moonriver/assets/xrt.ts b/packages/config/src/config/moonriver/assets/xrt.ts new file mode 100644 index 00000000..d9aa9921 --- /dev/null +++ b/packages/config/src/config/moonriver/assets/xrt.ts @@ -0,0 +1,38 @@ +import { AssetSymbol, ChainKey } from '../../../constants'; +import { PolkadotXcmExtrinsicSuccessEvent } from '../../../extrinsic'; +import { + assets, + balance, + chains, + extrinsic, + withdraw, +} from '../moonriver.common'; +import { MoonriverXcmConfig } from '../moonriver.interfaces'; + +const asset = assets[AssetSymbol.XRT]; +const origin = chains[ChainKey.Robonomics]; + +export const XRT: MoonriverXcmConfig = { + asset, + origin, + deposit: { + [origin.key]: { + source: origin, + balance: balance.system(), + extrinsic: extrinsic + .polkadotXcm() + .limitedReserveTransferAssets() + .successEvent(PolkadotXcmExtrinsicSuccessEvent.Attempted) + .origin(origin) + .V1() + .here(), + }, + }, + withdraw: { + [origin.key]: withdraw.xTokens({ + balance: balance.system(), + destination: origin, + feePerWeight: 0.000008, + }), + }, +}; diff --git a/packages/config/src/config/moonriver/moonriver.assets.ts b/packages/config/src/config/moonriver/moonriver.assets.ts index 75f4ee6b..810179da 100644 --- a/packages/config/src/config/moonriver/moonriver.assets.ts +++ b/packages/config/src/config/moonriver/moonriver.assets.ts @@ -20,6 +20,7 @@ export const MOONRIVER_ASSETS = [ AssetSymbol.SDN, AssetSymbol.TEER, AssetSymbol.USDT, + AssetSymbol.XRT, ]; export const MOONRIVER_ASSETS_MAP: AssetsMap = { @@ -115,4 +116,9 @@ export const MOONRIVER_ASSETS_MAP: AssetsMap = { [ChainKey.Statemine]: 1984, }, }, + [AssetSymbol.XRT]: { + id: '108036400430056508975016746969135344601', + erc20Id: '0xffffffff51470dca3dbe535bd2880a9ccdbc6bd9', + originSymbol: AssetSymbol.XRT, + }, }; diff --git a/packages/config/src/config/moonriver/moonriver.chains.ts b/packages/config/src/config/moonriver/moonriver.chains.ts index 72ceefad..d2f6a769 100644 --- a/packages/config/src/config/moonriver/moonriver.chains.ts +++ b/packages/config/src/config/moonriver/moonriver.chains.ts @@ -14,6 +14,7 @@ export const MOONRIVER_CHAINS = [ ChainKey.Kusama, ChainKey.Litmus, ChainKey.Parallel, + ChainKey.Robonomics, ChainKey.Shiden, ChainKey.Statemine, ]; @@ -102,6 +103,13 @@ export const MOONRIVER_CHAINS_MAP: ChainsMap = { parachainId: 2085, moonAssetId: 113, }, + [ChainKey.Robonomics]: { + key: ChainKey.Robonomics, + name: 'Robonomics', + ws: 'wss://robonomics.api.onfinality.io/public-ws', + weight: 1_000_000_000, + parachainId: 2048, + }, [ChainKey.Shiden]: { key: ChainKey.Shiden, name: 'Shiden', diff --git a/packages/config/src/config/moonriver/moonriver.ts b/packages/config/src/config/moonriver/moonriver.ts index f337042b..7fa3c7a1 100644 --- a/packages/config/src/config/moonriver/moonriver.ts +++ b/packages/config/src/config/moonriver/moonriver.ts @@ -18,6 +18,7 @@ import { RMRK } from './assets/rmrk'; import { SDN } from './assets/sdn'; import { TEER } from './assets/teer'; import { USDT } from './assets/usdt'; +import { XRT } from './assets/xrt'; export const MOONRIVER_CONFIGS: MoonriverXcmConfigs = { [AssetSymbol.AUSD]: AUSD, @@ -37,4 +38,5 @@ export const MOONRIVER_CONFIGS: MoonriverXcmConfigs = { [AssetSymbol.SDN]: SDN, [AssetSymbol.TEER]: TEER, [AssetSymbol.USDT]: USDT, + [AssetSymbol.XRT]: XRT, }; diff --git a/packages/config/src/constants/chains.ts b/packages/config/src/constants/chains.ts index e2e7a4dc..92075363 100644 --- a/packages/config/src/constants/chains.ts +++ b/packages/config/src/constants/chains.ts @@ -67,6 +67,7 @@ export enum ChainKey { ParallelHeiko = 'ParallelHeiko', Phala = 'Phala', Polkadot = 'Polkadot', + Robonomics = 'Robonomics', RobonomicsAlphanet = 'RobonomicsAlphanet', Shiden = 'Shiden', Statemine = 'Statemine',