difftreelog
Build/941056 tests up (#938)
in: master
Use XCM V2
2 files changed
tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth803 let quartzParachainMultilocation: any;803 let quartzParachainMultilocation: any;804 let quartzAccountMultilocation: any;804 let quartzAccountMultilocation: any;805 let quartzCombinedMultilocation: any;805 let quartzCombinedMultilocation: any;806 let quartzCombinedMultilocationKarura: any; // TODO remove it when Karura goes V2806807807 let messageSent: any;808 let messageSent: any;808809847 },848 },848 };849 };850851 quartzCombinedMultilocationKarura = {852 V1: {853 parents: 1,854 interior: {855 X2: [quartzParachainJunction, quartzAccountJunction],856 },857 },858 };849859850 // Set the default version to wrap the first message to other chains.860 // Set the default version to wrap the first message to other chains.851 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);861 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);869 const id = {879 const id = {870 Token: 'KAR',880 Token: 'KAR',871 };881 };872 const destination = quartzCombinedMultilocation;882 const destination = quartzCombinedMultilocationKarura;873 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');883 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');874884875 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);885 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);1433 itSub('Should connect to Shiden and send QTZ back', async ({helper}) => {1443 itSub('Should connect to Shiden and send QTZ back', async ({helper}) => {1434 await usingShidenPlaygrounds(shidenUrl, async (helper) => {1444 await usingShidenPlaygrounds(shidenUrl, async (helper) => {1435 const destination = {1445 const destination = {1436 V1: {1446 V2: {1437 parents: 1,1447 parents: 1,1438 interior: {1448 interior: {1439 X1: {1449 X1: {1444 };1454 };144514551446 const beneficiary = {1456 const beneficiary = {1447 V1: {1457 V2: {1448 parents: 0,1458 parents: 0,1449 interior: {1459 interior: {1450 X1: {1460 X1: {1458 };1468 };145914691460 const assets = {1470 const assets = {1461 V1: [1471 V2: [1462 {1472 {1463 id: {1473 id: {1464 Concrete: {1474 Concrete: {1515 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);1525 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);151615261517 const quartzMultilocation = {1527 const quartzMultilocation = {1518 V1: {1528 V2: {1519 parents: 1,1529 parents: 1,1520 interior: {1530 interior: {1521 X1: {Parachain: QUARTZ_CHAIN},1531 X1: {Parachain: QUARTZ_CHAIN},1580 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);1590 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);158115911582 const quartzMultilocation = {1592 const quartzMultilocation = {1583 V1: {1593 V2: {1584 parents: 1,1594 parents: 1,1585 interior: {1595 interior: {1586 X1: {1596 X1: {tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -805,6 +805,7 @@
let uniqueParachainMultilocation: any;
let uniqueAccountMultilocation: any;
let uniqueCombinedMultilocation: any;
+ let uniqueCombinedMultilocationAcala: any; // TODO remove when Acala goes V2
let messageSent: any;
@@ -823,7 +824,7 @@
};
uniqueParachainMultilocation = {
- V1: {
+ V2: {
parents: 1,
interior: {
X1: uniqueParachainJunction,
@@ -849,6 +850,15 @@
},
};
+ uniqueCombinedMultilocationAcala = {
+ V1: {
+ parents: 1,
+ interior: {
+ X2: [uniqueParachainJunction, uniqueAccountJunction],
+ },
+ },
+ };
+
// Set the default version to wrap the first message to other chains.
await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
});
@@ -871,7 +881,7 @@
const id = {
Token: 'ACA',
};
- const destination = uniqueCombinedMultilocation;
+ const destination = uniqueCombinedMultilocationAcala;
await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
@@ -1436,7 +1446,7 @@
itSub('Should connect to Astar and send UNQ back', async ({helper}) => {
await usingAstarPlaygrounds(astarUrl, async (helper) => {
const destination = {
- V1: {
+ V2: {
parents: 1,
interior: {
X1: {
@@ -1447,7 +1457,7 @@
};
const beneficiary = {
- V1: {
+ V2: {
parents: 0,
interior: {
X1: {
@@ -1461,7 +1471,7 @@
};
const assets = {
- V1: [
+ V2: [
{
id: {
Concrete: {
@@ -1517,7 +1527,7 @@
const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
const uniqueMultilocation = {
- V1: {
+ V2: {
parents: 1,
interior: {
X1: {Parachain: UNIQUE_CHAIN},
@@ -1582,7 +1592,7 @@
const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
const uniqueMultilocation = {
- V1: {
+ V2: {
parents: 1,
interior: {
X1: {
@@ -1652,5 +1662,4 @@
accountBalance = await helper.balance.getSubstrate(targetAccount.address);
expect(accountBalance).to.be.equal(0n);
});
-
});