diff --git a/packages/config/src/config/moonbase/assets/xrt.ts b/packages/config/src/config/moonbase/assets/xrt.ts new file mode 100644 index 00000000..642e7942 --- /dev/null +++ b/packages/config/src/config/moonbase/assets/xrt.ts @@ -0,0 +1,38 @@ +import { AssetSymbol, ChainKey } from '../../../constants'; +import { PolkadotXcmExtrinsicSuccessEvent } from '../../../extrinsic'; +import { + assets, + balance, + chains, + extrinsic, + withdraw, +} from '../moonbase.common'; +import { MoonbaseXcmConfig } from '../moonbase.interfaces'; + +const asset = assets[AssetSymbol.XRT]; +const origin = chains[ChainKey.RobonomicsAlphanet]; + +export const XRT: MoonbaseXcmConfig = { + 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/moonbase/moonbase.assets.ts b/packages/config/src/config/moonbase/moonbase.assets.ts index a117245f..9d872090 100644 --- a/packages/config/src/config/moonbase/moonbase.assets.ts +++ b/packages/config/src/config/moonbase/moonbase.assets.ts @@ -9,6 +9,7 @@ export const MOONBASE_ASSETS = [ AssetSymbol.LIT, AssetSymbol.TT1, AssetSymbol.UNIT, + AssetSymbol.XRT, ]; export const MOONBASE_ASSETS_MAP: AssetsMap = { @@ -46,4 +47,9 @@ export const MOONBASE_ASSETS_MAP: AssetsMap = { [ChainKey.StatemineAlphanet]: 2, }, }, + [AssetSymbol.XRT]: { + id: '108036400430056508975016746969135344601', + erc20Id: '0xffffffff51470dca3dbe535bd2880a9ccdbc6bd9', + originSymbol: AssetSymbol.XRT, + }, }; diff --git a/packages/config/src/config/moonbase/moonbase.chains.ts b/packages/config/src/config/moonbase/moonbase.chains.ts index 41e03876..c05bb710 100644 --- a/packages/config/src/config/moonbase/moonbase.chains.ts +++ b/packages/config/src/config/moonbase/moonbase.chains.ts @@ -7,6 +7,7 @@ export const MOONBASE_CHAINS = [ ChainKey.CloverAlphanet, ChainKey.CrustShadowAlphanet, ChainKey.LitentryAlphanet, + ChainKey.RobonomicsAlphanet, ChainKey.StatemineAlphanet, ]; @@ -41,6 +42,13 @@ export const MOONBASE_CHAINS_MAP: ChainsMap = { weight: 1_000_000_000, parachainId: 2106, }, + [ChainKey.RobonomicsAlphanet]: { + key: ChainKey.RobonomicsAlphanet, + name: 'Robonomics Alphanet', + ws: 'wss://moonriver.rpc.robonomics.network', + weight: 1_000_000_000, + parachainId: 2048, + }, [ChainKey.StatemineAlphanet]: { key: ChainKey.StatemineAlphanet, name: 'Statemine Alphanet', diff --git a/packages/config/src/config/moonbase/moonbase.ts b/packages/config/src/config/moonbase/moonbase.ts index 73079bf6..3a25f739 100644 --- a/packages/config/src/config/moonbase/moonbase.ts +++ b/packages/config/src/config/moonbase/moonbase.ts @@ -7,6 +7,7 @@ import { DEV } from './assets/dev'; import { LIT } from './assets/lit'; import { TT1 } from './assets/tt1'; import { UNIT } from './assets/unit'; +import { XRT } from './assets/xrt'; export const MOONBASE_CONFIGS: MoonbaseXcmConfigs = { [AssetSymbol.CLV]: CLV, @@ -15,4 +16,5 @@ export const MOONBASE_CONFIGS: MoonbaseXcmConfigs = { [AssetSymbol.LIT]: LIT, [AssetSymbol.TT1]: TT1, [AssetSymbol.UNIT]: UNIT, + [AssetSymbol.XRT]: XRT, }; diff --git a/packages/config/src/constants/assets.ts b/packages/config/src/constants/assets.ts index eff0d7cc..28c053dd 100644 --- a/packages/config/src/constants/assets.ts +++ b/packages/config/src/constants/assets.ts @@ -32,4 +32,5 @@ export enum AssetSymbol { TT1 = 'TT1', UNIT = 'UNIT', USDT = 'USDT', + XRT = 'XRT', } diff --git a/packages/config/src/constants/chains.ts b/packages/config/src/constants/chains.ts index 5f4ecce6..aa32eaec 100644 --- a/packages/config/src/constants/chains.ts +++ b/packages/config/src/constants/chains.ts @@ -58,6 +58,7 @@ export enum ChainKey { ParallelHeiko = 'ParallelHeiko', Phala = 'Phala', Polkadot = 'Polkadot', + RobonomicsAlphanet = 'RobonomicsAlphanet', Shiden = 'Shiden', Statemine = 'Statemine', StatemineAlphanet = 'StatemineAlphanet',