diff --git a/e2e-tests/tests/test-teleport-laos.ts b/e2e-tests/tests/test-teleport-laos.ts index ca7dd84b..cff5d361 100644 --- a/e2e-tests/tests/test-teleport-laos.ts +++ b/e2e-tests/tests/test-teleport-laos.ts @@ -52,23 +52,25 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { }, }, }); - const relayToken = apiLaos.createType("AssetIdV3", { + const relayToken = apiLaos.createType("AssetIdV3", { Concrete: { parents: "1", interior: { - Here + Here, }, }, - }); - const alith = new Keyring({ type: "ethereum" }).addFromUri(ALITH_PRIVATE_KEY); + }); + const alith = new Keyring({ type: "ethereum" }).addFromUri(ALITH_PRIVATE_KEY); const keyring = new Keyring({ type: "sr25519" }); const alice = keyring.addFromUri("//Alice"); const laosSiblingInAssetHub = "5Eg2fnssBDaFCWy7JnEZYnEuNPZbbzzEWGw5zryrTpmsTuPL"; console.log(alicebalance.data.free.toHuman()); - const balanceTx = apiAssetHub.tx.balances.transferKeepAlive(laosSiblingInAssetHub, 100000000000000).signAndSend(alice, () => { }) + const balanceTx = apiAssetHub.tx.balances + .transferKeepAlive(laosSiblingInAssetHub, 100000000000000) + .signAndSend(alice, () => {}) .catch((error: any) => { console.log("transaction failed", error); - });; + }); const balance = await apiAssetHub.query.system.account(laosSiblingInAssetHub); let accountId = apiAssetHub.createType("AccountId", laosSiblingInAssetHub); let amount = 7123; @@ -92,35 +94,35 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { }); const instruction = apiLaos.createType("XcmVersionedXcm", { - V3 : [ - { - WithdrawAsset:[ - apiLaos.createType("MultiAssetV3",{ - id:relayToken, - fun:apiLaos.createType("FungibilityV3",{ - Fungible:1000000 - }) - }) - ] - }, - { - BuyExecution: { - fees:relayToken, - weight_limit: "Unlimited" - } - }, + V3: [ + { + WithdrawAsset: [ + apiLaos.createType("MultiAssetV3", { + id: relayToken, + fun: apiLaos.createType("FungibilityV3", { + Fungible: 1000000, + }), + }), + ], + }, + { + BuyExecution: { + fees: relayToken, + weight_limit: "Unlimited", + }, + }, { Transact: { originKind, // XcmOriginKind instance requireWeightAtMost, // WeightV2 instance call: doubleEncodedCall, // DoubleEncodedCall instance }, - } - ] + }, + ], }) as XcmVersionedXcm; const call = apiLaos.tx.polkadotXcm.send(destination, instruction); - + call.signAndSend(alith, (result) => { console.log(`RESULT =>>> ${result}`); }).catch((error: any) => {