From fcc31be1d7187ca8a01f08e227a0eb98ee9bfde3 Mon Sep 17 00:00:00 2001 From: Sam Elamin Date: Mon, 11 Sep 2023 12:18:15 +0100 Subject: [PATCH] add teleport transfers (for system chains tests) (#108) * add teleport transfers (for system chains tests) * rename to match extrnsic * lint fixes --- helpers/api/index.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/helpers/api/index.ts b/helpers/api/index.ts index 80f38f8..e8d67fd 100644 --- a/helpers/api/index.ts +++ b/helpers/api/index.ts @@ -120,6 +120,35 @@ export const xcmPallet = { }, }, }), + limitedTeleportAssets: + (token: any, amount: any, dest: any) => + ({ api }: { api: ApiPromise }, acc: any) => + (api.tx.xcmPallet || api.tx.polkadotXcm).limitedTeleportAssets( + dest, + { + V3: { + parents: 0, + interior: { + X1: { + AccountId32: { + // network: 'Any', + id: acc, + }, + }, + }, + }, + }, + { + V3: [ + { + id: token, + fun: { Fungible: amount }, + }, + ], + }, + 0, + 'Unlimited' + ), limitedReserveTransferAssetsV2: (token: any, amount: any, dest: any) => ({ api }: { api: ApiPromise }, acc: any) =>