git.delta.rocks / unique-network / refs/commits / 748c609fe7ab

difftreelog

Build/941056 tests up (#938)

Max Andreev2023-05-22parent: #18191fc.patch.diff
in: master
Use XCM V2

2 files changed

modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
803 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 V2
806807
807 let messageSent: any;808 let messageSent: any;
808809
847 },848 },
848 };849 };
850
851 quartzCombinedMultilocationKarura = {
852 V1: {
853 parents: 1,
854 interior: {
855 X2: [quartzParachainJunction, quartzAccountJunction],
856 },
857 },
858 };
849859
850 // 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');
874884
875 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 };
14451455
1446 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 };
14591469
1460 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);
15161526
1517 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);
15811591
1582 const quartzMultilocation = {1592 const quartzMultilocation = {
1583 V1: {1593 V2: {
1584 parents: 1,1594 parents: 1,
1585 interior: {1595 interior: {
1586 X1: {1596 X1: {
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
805 let uniqueParachainMultilocation: any;805 let uniqueParachainMultilocation: any;
806 let uniqueAccountMultilocation: any;806 let uniqueAccountMultilocation: any;
807 let uniqueCombinedMultilocation: any;807 let uniqueCombinedMultilocation: any;
808 let uniqueCombinedMultilocationAcala: any; // TODO remove when Acala goes V2
808809
809 let messageSent: any;810 let messageSent: any;
810811
823 };824 };
824825
825 uniqueParachainMultilocation = {826 uniqueParachainMultilocation = {
826 V1: {827 V2: {
827 parents: 1,828 parents: 1,
828 interior: {829 interior: {
829 X1: uniqueParachainJunction,830 X1: uniqueParachainJunction,
849 },850 },
850 };851 };
852
853 uniqueCombinedMultilocationAcala = {
854 V1: {
855 parents: 1,
856 interior: {
857 X2: [uniqueParachainJunction, uniqueAccountJunction],
858 },
859 },
860 };
851861
852 // Set the default version to wrap the first message to other chains.862 // Set the default version to wrap the first message to other chains.
853 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);863 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
871 const id = {881 const id = {
872 Token: 'ACA',882 Token: 'ACA',
873 };883 };
874 const destination = uniqueCombinedMultilocation;884 const destination = uniqueCombinedMultilocationAcala;
875 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');885 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
876886
877 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);887 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
1436 itSub('Should connect to Astar and send UNQ back', async ({helper}) => {1446 itSub('Should connect to Astar and send UNQ back', async ({helper}) => {
1437 await usingAstarPlaygrounds(astarUrl, async (helper) => {1447 await usingAstarPlaygrounds(astarUrl, async (helper) => {
1438 const destination = {1448 const destination = {
1439 V1: {1449 V2: {
1440 parents: 1,1450 parents: 1,
1441 interior: {1451 interior: {
1442 X1: {1452 X1: {
1447 };1457 };
14481458
1449 const beneficiary = {1459 const beneficiary = {
1450 V1: {1460 V2: {
1451 parents: 0,1461 parents: 0,
1452 interior: {1462 interior: {
1453 X1: {1463 X1: {
1461 };1471 };
14621472
1463 const assets = {1473 const assets = {
1464 V1: [1474 V2: [
1465 {1475 {
1466 id: {1476 id: {
1467 Concrete: {1477 Concrete: {
1517 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);1527 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
15181528
1519 const uniqueMultilocation = {1529 const uniqueMultilocation = {
1520 V1: {1530 V2: {
1521 parents: 1,1531 parents: 1,
1522 interior: {1532 interior: {
1523 X1: {Parachain: UNIQUE_CHAIN},1533 X1: {Parachain: UNIQUE_CHAIN},
1582 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);1592 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
15831593
1584 const uniqueMultilocation = {1594 const uniqueMultilocation = {
1585 V1: {1595 V2: {
1586 parents: 1,1596 parents: 1,
1587 interior: {1597 interior: {
1588 X1: {1598 X1: {