git.delta.rocks / unique-network / refs/commits / de884669db7a

difftreelog

fix astar xcm tests with xcm v3

Daniel Shiposha2023-03-30parent: #a8f5a1c.patch.diff
in: master

2 files changed

modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
996 const qtzToShidenTransferred = 10n * (10n ** QTZ_DECIMALS); // 10 QTZ996 const qtzToShidenTransferred = 10n * (10n ** QTZ_DECIMALS); // 10 QTZ
997 const qtzToShidenArrived = 9_999_999_999_088_000_000n; // 9.999 ... QTZ, Shiden takes a commision in foreign tokens997 const qtzToShidenArrived = 9_999_999_999_088_000_000n; // 9.999 ... QTZ, Shiden takes a commision in foreign tokens
998 const senderIinitialBalanceQTZ = 100n * (10n ** QTZ_DECIMALS); // How many QTZ sender has initially998 const senderIinitialBalanceQTZ = 100n * (10n ** QTZ_DECIMALS); // How many QTZ sender has initially
999 const senderBalanceAfterXCM = 89_941967662676666465n; // 89.94... QTZ after XCM call999 const senderBalanceAfterXCM = 89_946678090945539197n; // 89.94... QTZ after XCM call
10001000
1001 // Shiden -> Quartz1001 // Shiden -> Quartz
1002 const qtzFromShidenTransfered = 5n * (10n ** QTZ_DECIMALS); // 5 QTZ1002 const qtzFromShidenTransfered = 5n * (10n ** QTZ_DECIMALS); // 5 QTZ
1008 [sender] = await helper.arrange.createAccounts([100n], alice);1008 [sender] = await helper.arrange.createAccounts([100n], alice);
1009 console.log('sender', sender.address);1009 console.log('sender', sender.address);
1010
1011 // Set the default version to wrap the first message to other chains.
1012 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
1010 });1013 });
10111014
1012 await usingShidenPlaygrounds(shidenUrl, async (helper) => {1015 await usingShidenPlaygrounds(shidenUrl, async (helper) => {
10511054
1052 itSub('Should connect and send QTZ to Shiden', async ({helper}) => {1055 itSub('Should connect and send QTZ to Shiden', async ({helper}) => {
1053 const destination = {1056 const destination = {
1054 V1: {1057 V2: {
1055 parents: 1,1058 parents: 1,
1056 interior: {1059 interior: {
1057 X1: {1060 X1: {
1062 };1065 };
10631066
1064 const beneficiary = {1067 const beneficiary = {
1065 V1: {1068 V2: {
1066 parents: 0,1069 parents: 0,
1067 interior: {1070 interior: {
1068 X1: {1071 X1: {
1076 };1079 };
10771080
1078 const assets = {1081 const assets = {
1079 V1: [1082 V2: [
1080 {1083 {
1081 id: {1084 id: {
1082 Concrete: {1085 Concrete: {
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
998 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ998 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ
999 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Shiden takes a commision in foreign tokens999 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Shiden takes a commision in foreign tokens
1000 const senderIinitialBalanceUNQ = 100n * (10n ** UNQ_DECIMALS); // How many UNQ sender has initially1000 const senderIinitialBalanceUNQ = 100n * (10n ** UNQ_DECIMALS); // How many UNQ sender has initially
1001 const senderBalanceAfterXCM = 89_941967662676666465n; // 89.94... UNQ after XCM call1001 const senderBalanceAfterXCM = 89_946678090945539197n; // 89.94... UNQ after XCM call
10021002
1003 // Astar -> Unique1003 // Astar -> Unique
1004 const unqFromAstarTransfered = 5n * (10n ** UNQ_DECIMALS); // 5 UNQ1004 const unqFromAstarTransfered = 5n * (10n ** UNQ_DECIMALS); // 5 UNQ
1010 [randomAccount] = await helper.arrange.createAccounts([100n], alice);1010 [randomAccount] = await helper.arrange.createAccounts([100n], alice);
1011 console.log('randomAccount', randomAccount.address);1011 console.log('randomAccount', randomAccount.address);
1012
1013 // Set the default version to wrap the first message to other chains.
1014 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
1012 });1015 });
10131016
1014 await usingAstarPlaygrounds(astarUrl, async (helper) => {1017 await usingAstarPlaygrounds(astarUrl, async (helper) => {
10531056
1054 itSub('Should connect and send UNQ to Astar', async ({helper}) => {1057 itSub('Should connect and send UNQ to Astar', async ({helper}) => {
1055 const destination = {1058 const destination = {
1056 V1: {1059 V2: {
1057 parents: 1,1060 parents: 1,
1058 interior: {1061 interior: {
1059 X1: {1062 X1: {
1064 };1067 };
10651068
1066 const beneficiary = {1069 const beneficiary = {
1067 V1: {1070 V2: {
1068 parents: 0,1071 parents: 0,
1069 interior: {1072 interior: {
1070 X1: {1073 X1: {
1078 };1081 };
10791082
1080 const assets = {1083 const assets = {
1081 V1: [1084 V2: [
1082 {1085 {
1083 id: {1086 id: {
1084 Concrete: {1087 Concrete: {