difftreelog
fix quartz xcm tests for kusama 0.9.38
in: master
3 files changed
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth2959 await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.teleportAssets`, [destination, beneficiary, assets, feeAssetItem], true);2959 await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.teleportAssets`, [destination, beneficiary, assets, feeAssetItem], true);2960 }2960 }296129612962 async teleportNativeAsset(signer: TSigner, destinationParaId: number, targetAccount: Uint8Array, amount: bigint) {2962 async teleportNativeAsset(signer: TSigner, destinationParaId: number, targetAccount: Uint8Array, amount: bigint, xcmVersion: number = 3) {2963 const destination = {2963 const destinationContent = {2964 V1: {2965 parents: 0,2964 parents: 0,2966 interior: {2965 interior: {2967 X1: {2966 X1: {2968 Parachain: destinationParaId,2967 Parachain: destinationParaId,2969 },2968 },2970 },2969 },2971 },2972 };2970 };297329712974 const beneficiary = {2972 const beneficiaryContent = {2975 V1: {2976 parents: 0,2973 parents: 0,2977 interior: {2974 interior: {2978 X1: {2975 X1: {2982 },2979 },2983 },2980 },2984 },2981 },2985 },2986 };2982 };298729832988 const assets = {2984 const assetsContent = [2989 V1: [2990 {2985 {2991 id: {2986 id: {2992 Concrete: {2987 Concrete: {2998 Fungible: amount,2993 Fungible: amount,2999 },2994 },3000 },2995 },3001 ],2996 ];3002 };29972998 let destination;2999 let beneficiary;3000 let assets;30013002 if (xcmVersion == 2) {3003 destination = { V1: destinationContent };3004 beneficiary = { V1: beneficiaryContent };3005 assets = { V1: assetsContent };30063007 } else if (xcmVersion == 3) {3008 destination = { V2: destinationContent };3009 beneficiary = { V2: beneficiaryContent };3010 assets = { V2: assetsContent };30113012 } else {3013 throw Error("Unknown XCM version: " + xcmVersion);3014 }300330153004 const feeAssetItem = 0;3016 const feeAssetItem = 0;30053017tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -154,7 +154,7 @@
// (fee for USDT XCM are paid in relay tokens)
await usingRelayPlaygrounds(relayUrl, async (helper) => {
const destination = {
- V1: {
+ V2: {
parents: 0,
interior: {X1: {
Parachain: QUARTZ_CHAIN,
@@ -163,7 +163,7 @@
}};
const beneficiary = {
- V1: {
+ V2: {
parents: 0,
interior: {X1: {
AccountId32: {
@@ -175,7 +175,7 @@
};
const assets = {
- V1: [
+ V2: [
{
id: {
Concrete: {
@@ -200,7 +200,7 @@
itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {
await usingStateminePlaygrounds(statemineUrl, async (helper) => {
const dest = {
- V1: {
+ V2: {
parents: 1,
interior: {X1: {
Parachain: QUARTZ_CHAIN,
@@ -209,7 +209,7 @@
}};
const beneficiary = {
- V1: {
+ V2: {
parents: 0,
interior: {X1: {
AccountId32: {
@@ -221,7 +221,7 @@
};
const assets = {
- V1: [
+ V2: [
{
id: {
Concrete: {
@@ -341,7 +341,7 @@
await usingRelayPlaygrounds(relayUrl, async (helper) => {
const destination = {
- V1: {
+ V2: {
parents: 0,
interior: {X1: {
Parachain: QUARTZ_CHAIN,
@@ -350,7 +350,7 @@
}};
const beneficiary = {
- V1: {
+ V2: {
parents: 0,
interior: {X1: {
AccountId32: {
@@ -362,7 +362,7 @@
};
const assets = {
- V1: [
+ V2: [
{
id: {
Concrete: {
tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -85,8 +85,9 @@
await usingRelayPlaygrounds(relayUrl, async (helper) => {
// Fund accounts on Statemint
- await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, alice.addressRaw, FUNDING_AMOUNT);
- await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, bob.addressRaw, FUNDING_AMOUNT);
+ const relayXcmVersion = 2;
+ await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, alice.addressRaw, FUNDING_AMOUNT, relayXcmVersion);
+ await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, bob.addressRaw, FUNDING_AMOUNT, relayXcmVersion);
});
await usingStatemintPlaygrounds(statemintUrl, async (helper) => {