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

difftreelog

test run eslint --fix

Yaroslav Bolyukin2023-05-30parent: #833ab94.patch.diff
in: master

20 files changed

modifiedtests/src/benchmarks/mintFee/index.tsdiffbeforeafterboth
--- a/tests/src/benchmarks/mintFee/index.ts
+++ b/tests/src/benchmarks/mintFee/index.ts
@@ -222,9 +222,7 @@
       await collection.mintToken(
         donor,
         {Substrate: susbstrateReceiver.address},
-        PROPERTIES.slice(0, setup.propertiesNumber).map((p) => {
-          return {key: p.key, value: Buffer.from(p.value).toString()};
-        }),
+        PROPERTIES.slice(0, setup.propertiesNumber).map((p) => ({key: p.key, value: Buffer.from(p.value).toString()})),
       );
     },
   );
modifiedtests/src/benchmarks/opsFee/index.tsdiffbeforeafterboth
--- a/tests/src/benchmarks/opsFee/index.ts
+++ b/tests/src/benchmarks/opsFee/index.ts
@@ -379,7 +379,7 @@
   res['setCollectionProperties'].substrate = convertToTokens((await helper.arrange.calculcateFee(
     {Substrate: donor.address},
     () => collection.setProperties(donor, PROPERTIES.slice(0, 1)
-      .map(p => { return {key: p.key, value: p.value.toString()}; })),
+      .map(p => ({key: p.key, value: p.value.toString()}))),
   )));
 
   res['deleteCollectionProperties'].substrate = convertToTokens((await helper.arrange.calculcateFee(
@@ -755,7 +755,7 @@
   res['setCollectionProperties'].substrate = convertToTokens((await helper.arrange.calculcateFee(
     {Substrate: donor.address},
     () => collection.setProperties(donor, PROPERTIES.slice(0, 1)
-      .map(p => { return {key: p.key, value: p.value.toString()}; })),
+      .map(p => ({key: p.key, value: p.value.toString()}))),
   )));
 
   res['deleteCollectionProperties'].substrate = convertToTokens((await helper.arrange.calculcateFee(
modifiedtests/src/benchmarks/utils/common.tsdiffbeforeafterboth
--- a/tests/src/benchmarks/utils/common.ts
+++ b/tests/src/benchmarks/utils/common.ts
@@ -5,32 +5,26 @@
 
 export const PROPERTIES = Array(40)
   .fill(0)
-  .map((_, i) => {
-    return {
-      key: `key_${i}`,
-      value: Uint8Array.from(Buffer.from(`value_${i}`)),
-    };
-  });
+  .map((_, i) => ({
+    key: `key_${i}`,
+    value: Uint8Array.from(Buffer.from(`value_${i}`)),
+  }));
 
 export const SUBS_PROPERTIES = Array(40)
   .fill(0)
-  .map((_, i) => {
-    return {
-      key: `key_${i}`,
-      value: `value_${i}`,
-    };
-  });
+  .map((_, i) => ({
+    key: `key_${i}`,
+    value: `value_${i}`,
+  }));
 
-export const PERMISSIONS: ITokenPropertyPermission[] = PROPERTIES.map((p) => {
-  return {
-    key: p.key,
-    permission: {
-      tokenOwner: true,
-      collectionAdmin: true,
-      mutable: true,
-    },
-  };
-});
+export const PERMISSIONS: ITokenPropertyPermission[] = PROPERTIES.map((p) => ({
+  key: p.key,
+  permission: {
+    tokenOwner: true,
+    collectionAdmin: true,
+    mutable: true,
+  },
+}));
 
 export function convertToTokens(value: bigint, nominal = 1000_000_000_000_000_000n): number {
   return Number((value * 1000n) / nominal) / 1000;
modifiedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionAdmin.test.ts
+++ b/tests/src/eth/collectionAdmin.test.ts
@@ -76,9 +76,7 @@
 
       // 2. Expect methods.collectionAdmins == api.rpc.unique.adminlist
       let adminListEth = await collectionEvm.methods.collectionAdmins().call();
-      adminListEth = adminListEth.map((element: IEthCrossAccountId) => {
-        return helper.address.convertCrossAccountFromEthCrossAccount(element);
-      });
+      adminListEth = adminListEth.map((element: IEthCrossAccountId) => helper.address.convertCrossAccountFromEthCrossAccount(element));
       expect(adminListRpc).to.be.like(adminListEth);
 
       // 3. check isOwnerOrAdminCross returns true:
modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -181,17 +181,11 @@
       const propertyPermissions = data2?.raw.tokenPropertyPermissions;
       expect(propertyPermissions?.length).to.equal(2);
 
-      expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => {
-        return tpp.key === 'URI' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;
-      })).to.be.not.null;
+      expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => tpp.key === 'URI' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner)).to.be.not.null;
 
-      expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => {
-        return tpp.key === 'URISuffix' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;
-      })).to.be.not.null;
+      expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => tpp.key === 'URISuffix' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner)).to.be.not.null;
 
-      expect(data2?.raw.properties?.find((property: IProperty) => {
-        return property.key === 'baseURI' && property.value === BASE_URI;
-      })).to.be.not.null;
+      expect(data2?.raw.properties?.find((property: IProperty) => property.key === 'baseURI' && property.value === BASE_URI)).to.be.not.null;
 
       const token1Result = await contract.methods.mint(bruh).send();
       const tokenId1 = token1Result.events.Transfer.returnValues.tokenId;
modifiedtests/src/eth/evmCoder.test.tsdiffbeforeafterboth
--- a/tests/src/eth/evmCoder.test.ts
+++ b/tests/src/eth/evmCoder.test.ts
@@ -17,8 +17,7 @@
 import {IKeyringPair} from '@polkadot/types/types';
 import {itEth, expect, usingEthPlaygrounds} from './util';
 
-const getContractSource = (collectionAddress: string, contractAddress: string): string => {
-  return `
+const getContractSource = (collectionAddress: string, contractAddress: string): string => `
   // SPDX-License-Identifier: MIT
   pragma solidity ^0.8.0;
   interface ITest {
@@ -51,7 +50,6 @@
     }
   }
   `;
-};
 
 
 describe('Evm Coder tests', () => {
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -102,17 +102,15 @@
       const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(receiverSub);
 
       // const receiverCross = helper.ethCrossAccount.fromKeyringPair(bob);
-      const properties = Array(5).fill(0).map((_, i) => { return {key: `key_${i}`, value: Buffer.from(`value_${i}`)}; });
+      const properties = Array(5).fill(0).map((_, i) => ({key: `key_${i}`, value: Buffer.from(`value_${i}`)}));
       const permissions: ITokenPropertyPermission[] = properties
-        .map(p => {
-          return {
-            key: p.key, permission: {
-              tokenOwner: false,
-              collectionAdmin: true,
-              mutable: false,
-            },
-          };
-        });
+        .map(p => ({
+          key: p.key, permission: {
+            tokenOwner: false,
+            collectionAdmin: true,
+            mutable: false,
+          },
+        }));
 
       const collection = await helper.nft.mintCollection(minter, {
         tokenPrefix: 'ethp',
@@ -146,7 +144,7 @@
       expect(tokenId).to.be.equal(expectedTokenId);
 
       expect(await contract.methods.properties(tokenId, []).call()).to.be.like(properties
-        .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); }));
+        .map(p => helper.ethProperty.property(p.key, p.value.toString())));
 
       expect(await helper.nft.getTokenOwner(collection.collectionId, tokenId))
         .to.deep.eq(testCase === 'ethereum' ? {Ethereum: receiverEth.toLowerCase()} : {Substrate: receiverSub.address});
modifiedtests/src/eth/reFungible.test.tsdiffbeforeafterboth
before · tests/src/eth/reFungible.test.ts
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617import {Pallets, requirePalletsOrSkip} from '../util';18import {expect, itEth, usingEthPlaygrounds} from './util';19import {IKeyringPair} from '@polkadot/types/types';20import {ITokenPropertyPermission} from '../util/playgrounds/types';2122describe('Refungible: Plain calls', () => {23  let donor: IKeyringPair;24  let minter: IKeyringPair;25  let bob: IKeyringPair;26  let charlie: IKeyringPair;2728  before(async function() {29    await usingEthPlaygrounds(async (helper, privateKey) => {30      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);3132      donor = await privateKey({url: import.meta.url});33      [minter, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);34    });35  });3637  [38    'substrate' as const,39    'ethereum' as const,40  ].map(testCase => {41    itEth(`Can perform mintCross() for ${testCase} address`, async ({helper}) => {42      const collectionAdmin = await helper.eth.createAccountWithBalance(donor);4344      const receiverEth = helper.eth.createAccount();45      const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);46      const receiverSub = bob;47      const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(receiverSub);4849      const properties = Array(5).fill(0).map((_, i) => { return {key: `key_${i}`, value: Buffer.from(`value_${i}`)}; });50      const permissions: ITokenPropertyPermission[] = properties.map(p => { return {key: p.key, permission: {51        tokenOwner: false,52        collectionAdmin: true,53        mutable: false}};54      });555657      const collection = await helper.rft.mintCollection(minter, {58        tokenPrefix: 'ethp',59        tokenPropertyPermissions: permissions,60      });61      await collection.addAdmin(minter, {Ethereum: collectionAdmin});6263      const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);64      const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', collectionAdmin, true);65      let expectedTokenId = await contract.methods.nextTokenId().call();66      let result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, []).send();67      let tokenId = result.events.Transfer.returnValues.tokenId;68      expect(tokenId).to.be.equal(expectedTokenId);6970      let event = result.events.Transfer;71      expect(event.address).to.be.equal(collectionAddress);72      expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000');73      expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address));74      expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]);7576      expectedTokenId = await contract.methods.nextTokenId().call();77      result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, properties).send();78      event = result.events.Transfer;79      expect(event.address).to.be.equal(collectionAddress);80      expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000');81      expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address));82      expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]);8384      tokenId = result.events.Transfer.returnValues.tokenId;8586      expect(tokenId).to.be.equal(expectedTokenId);8788      expect(await contract.methods.properties(tokenId, []).call()).to.be.like(properties89        .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); }));9091      expect(await helper.nft.getTokenOwner(collection.collectionId, tokenId))92        .to.deep.eq(testCase === 'ethereum' ? {Ethereum: receiverEth.toLowerCase()} : {Substrate: receiverSub.address});93    });94  });9596  itEth.skip('Can perform mintBulk()', async ({helper}) => {97    const owner = await helper.eth.createAccountWithBalance(donor);98    const receiver = helper.eth.createAccount();99    const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'MintBulky', '6', '6', '');100    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner);101102    {103      const nextTokenId = await contract.methods.nextTokenId().call();104      expect(nextTokenId).to.be.equal('1');105      const result = await contract.methods.mintBulkWithTokenURI(106        receiver,107        [108          [nextTokenId, 'Test URI 0'],109          [+nextTokenId + 1, 'Test URI 1'],110          [+nextTokenId + 2, 'Test URI 2'],111        ],112      ).send();113114      const events = result.events.Transfer;115      for (let i = 0; i < 2; i++) {116        const event = events[i];117        expect(event.address).to.equal(collectionAddress);118        expect(event.returnValues.from).to.equal('0x0000000000000000000000000000000000000000');119        expect(event.returnValues.to).to.equal(receiver);120        expect(event.returnValues.tokenId).to.equal(String(+nextTokenId + i));121      }122123      expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI 0');124      expect(await contract.methods.tokenURI(+nextTokenId + 1).call()).to.be.equal('Test URI 1');125      expect(await contract.methods.tokenURI(+nextTokenId + 2).call()).to.be.equal('Test URI 2');126    }127  });128129  itEth('Can perform setApprovalForAll()', async ({helper}) => {130    const owner = await helper.eth.createAccountWithBalance(donor);131    const operator = helper.eth.createAccount();132133    const collection = await helper.rft.mintCollection(minter, {});134135    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);136    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner);137138    const approvedBefore = await contract.methods.isApprovedForAll(owner, operator).call();139    expect(approvedBefore).to.be.equal(false);140141    {142      const result = await contract.methods.setApprovalForAll(operator, true).send({from: owner});143144      expect(result.events.ApprovalForAll).to.be.like({145        address: collectionAddress,146        event: 'ApprovalForAll',147        returnValues: {148          owner,149          operator,150          approved: true,151        },152      });153154      const approvedAfter = await contract.methods.isApprovedForAll(owner, operator).call();155      expect(approvedAfter).to.be.equal(true);156    }157158    {159      const result = await contract.methods.setApprovalForAll(operator, false).send({from: owner});160161      expect(result.events.ApprovalForAll).to.be.like({162        address: collectionAddress,163        event: 'ApprovalForAll',164        returnValues: {165          owner,166          operator,167          approved: false,168        },169      });170171      const approvedAfter = await contract.methods.isApprovedForAll(owner, operator).call();172      expect(approvedAfter).to.be.equal(false);173    }174  });175176  itEth('Can perform burn with ApprovalForAll', async ({helper}) => {177    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});178179    const owner = await helper.eth.createAccountWithBalance(donor);180    const operator = await helper.eth.createAccountWithBalance(donor);181182    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});183184    const address = helper.ethAddress.fromCollectionId(collection.collectionId);185    const contract = await helper.ethNativeContract.collection(address, 'rft');186187    {188      await contract.methods.setApprovalForAll(operator, true).send({from: owner});189      const ownerCross = helper.ethCrossAccount.fromAddress(owner);190      const result = await contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: operator});191      const events = result.events.Transfer;192193      expect(events).to.be.like({194        address,195        event: 'Transfer',196        returnValues: {197          from: owner,198          to: '0x0000000000000000000000000000000000000000',199          tokenId: token.tokenId.toString(),200        },201      });202    }203  });204205  itEth('Can perform burn with approve and approvalForAll', async ({helper}) => {206    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});207208    const owner = await helper.eth.createAccountWithBalance(donor);209    const operator = await helper.eth.createAccountWithBalance(donor);210211    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});212213    const address = helper.ethAddress.fromCollectionId(collection.collectionId);214    const contract = await helper.ethNativeContract.collection(address, 'rft');215216    const rftToken = await helper.ethNativeContract.rftTokenById(token.collectionId, token.tokenId, owner, true);217218    {219      await rftToken.methods.approve(operator, 15n).send({from: owner});220      await contract.methods.setApprovalForAll(operator, true).send({from: owner});221      await rftToken.methods.burnFrom(owner, 10n).send({from: operator});222    }223    {224      const allowance = await rftToken.methods.allowance(owner, operator).call();225      expect(+allowance).to.be.equal(5);226    }227    {228      const ownerCross = helper.ethCrossAccount.fromAddress(owner);229      const operatorCross = helper.ethCrossAccount.fromAddress(operator);230      const allowance = await rftToken.methods.allowanceCross(ownerCross, operatorCross).call();231      expect(+allowance).to.equal(5);232    }233  });234235  itEth('Can perform transfer with ApprovalForAll', async ({helper}) => {236    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});237238    const owner = await helper.eth.createAccountWithBalance(donor);239    const operator = await helper.eth.createAccountWithBalance(donor);240    const receiver = charlie;241242    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});243244    const address = helper.ethAddress.fromCollectionId(collection.collectionId);245    const contract = await helper.ethNativeContract.collection(address, 'rft');246247    {248      await contract.methods.setApprovalForAll(operator, true).send({from: owner});249      const ownerCross = helper.ethCrossAccount.fromAddress(owner);250      const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);251      const result = await contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: operator});252      const event = result.events.Transfer;253      expect(event).to.be.like({254        address: helper.ethAddress.fromCollectionId(collection.collectionId),255        event: 'Transfer',256        returnValues: {257          from: owner,258          to: helper.address.substrateToEth(receiver.address),259          tokenId: token.tokenId.toString(),260        },261      });262    }263264    expect(await token.getTop10Owners()).to.be.like([{Substrate: receiver.address}]);265  });266267  itEth('Can perform burn()', async ({helper}) => {268    const caller = await helper.eth.createAccountWithBalance(donor);269    const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Burny', '6', '6');270    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);271272    const result = await contract.methods.mint(caller).send();273    const tokenId = result.events.Transfer.returnValues.tokenId;274    {275      const result = await contract.methods.burn(tokenId).send();276      const event = result.events.Transfer;277      expect(event.address).to.equal(collectionAddress);278      expect(event.returnValues.from).to.equal(caller);279      expect(event.returnValues.to).to.equal('0x0000000000000000000000000000000000000000');280      expect(event.returnValues.tokenId).to.equal(tokenId.toString());281    }282  });283284  itEth('Can perform transferFrom()', async ({helper}) => {285    const caller = await helper.eth.createAccountWithBalance(donor);286    const receiver = helper.eth.createAccount();287    const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'TransferFromy', '6', '6');288    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);289290    const result = await contract.methods.mint(caller).send();291    const tokenId = result.events.Transfer.returnValues.tokenId;292293    const tokenAddress = helper.ethAddress.fromTokenId(collectionId, tokenId);294295    const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, caller);296    await tokenContract.methods.repartition(15).send();297298    {299      const tokenEvents: any = [];300      tokenContract.events.allEvents((_: any, event: any) => {301        tokenEvents.push(event);302      });303      const result = await contract.methods.transferFrom(caller, receiver, tokenId).send();304      if (tokenEvents.length == 0) await helper.wait.newBlocks(1);305306      let event = result.events.Transfer;307      expect(event.address).to.equal(collectionAddress);308      expect(event.returnValues.from).to.equal(caller);309      expect(event.returnValues.to).to.equal(receiver);310      expect(event.returnValues.tokenId).to.equal(tokenId.toString());311312      event = tokenEvents[0];313      expect(event.address).to.equal(tokenAddress);314      expect(event.returnValues.from).to.equal(caller);315      expect(event.returnValues.to).to.equal(receiver);316      expect(event.returnValues.value).to.equal('15');317    }318319    {320      const balance = await contract.methods.balanceOf(receiver).call();321      expect(+balance).to.equal(1);322    }323324    {325      const balance = await contract.methods.balanceOf(caller).call();326      expect(+balance).to.equal(0);327    }328  });329330  // Soft-deprecated331  itEth('Can perform burnFrom()', async ({helper}) => {332    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});333334    const owner = await helper.eth.createAccountWithBalance(donor);335    const spender = await helper.eth.createAccountWithBalance(donor);336337    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});338339    const address = helper.ethAddress.fromCollectionId(collection.collectionId);340    const contract = await helper.ethNativeContract.collection(address, 'rft', spender, true);341342    const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId);343    const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, owner);344    await tokenContract.methods.repartition(15).send();345    await tokenContract.methods.approve(spender, 15).send();346347    {348      const result = await contract.methods.burnFrom(owner, token.tokenId).send();349      const event = result.events.Transfer;350      expect(event).to.be.like({351        address: helper.ethAddress.fromCollectionId(collection.collectionId),352        event: 'Transfer',353        returnValues: {354          from: owner,355          to: '0x0000000000000000000000000000000000000000',356          tokenId: token.tokenId.toString(),357        },358      });359    }360361    expect(await collection.getTokenBalance(token.tokenId, {Ethereum: owner})).to.be.eq(0n);362  });363364  itEth('Can perform burnFromCross()', async ({helper}) => {365    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});366367    const owner = bob;368    const spender = await helper.eth.createAccountWithBalance(donor);369370    const token = await collection.mintToken(minter, 100n, {Substrate: owner.address});371372    const address = helper.ethAddress.fromCollectionId(collection.collectionId);373    const contract = await helper.ethNativeContract.collection(address, 'rft');374375    await token.repartition(owner, 15n);376    await token.approve(owner, {Ethereum: spender}, 15n);377378    {379      const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner);380      const result = await contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender});381      const event = result.events.Transfer;382      expect(event).to.be.like({383        address: helper.ethAddress.fromCollectionId(collection.collectionId),384        event: 'Transfer',385        returnValues: {386          from: helper.address.substrateToEth(owner.address),387          to: '0x0000000000000000000000000000000000000000',388          tokenId: token.tokenId.toString(),389        },390      });391    }392393    expect(await collection.getTokenBalance(token.tokenId, {Substrate: owner.address})).to.be.eq(0n);394  });395396  itEth('Can perform transferFromCross()', async ({helper}) => {397    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});398399    const owner = bob;400    const spender = await helper.eth.createAccountWithBalance(donor);401    const receiver = charlie;402403    const token = await collection.mintToken(minter, 100n, {Substrate: owner.address});404405    const address = helper.ethAddress.fromCollectionId(collection.collectionId);406    const contract = await helper.ethNativeContract.collection(address, 'rft');407408    await token.repartition(owner, 15n);409    await token.approve(owner, {Ethereum: spender}, 15n);410411    {412      const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner);413      const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);414      const result = await contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender});415      const event = result.events.Transfer;416      expect(event).to.be.like({417        address: helper.ethAddress.fromCollectionId(collection.collectionId),418        event: 'Transfer',419        returnValues: {420          from: helper.address.substrateToEth(owner.address),421          to: helper.address.substrateToEth(receiver.address),422          tokenId: token.tokenId.toString(),423        },424      });425    }426427    expect(await token.getTop10Owners()).to.be.like([{Substrate: receiver.address}]);428  });429430  itEth('Can perform transfer()', async ({helper}) => {431    const caller = await helper.eth.createAccountWithBalance(donor);432    const receiver = helper.eth.createAccount();433    const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry', '6', '6');434    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);435436    const result = await contract.methods.mint(caller).send();437    const tokenId = result.events.Transfer.returnValues.tokenId;438439    {440      const result = await contract.methods.transfer(receiver, tokenId).send();441442      const event = result.events.Transfer;443      expect(event.address).to.equal(collectionAddress);444      expect(event.returnValues.from).to.equal(caller);445      expect(event.returnValues.to).to.equal(receiver);446      expect(event.returnValues.tokenId).to.equal(tokenId.toString());447    }448449    {450      const balance = await contract.methods.balanceOf(caller).call();451      expect(+balance).to.equal(0);452    }453454    {455      const balance = await contract.methods.balanceOf(receiver).call();456      expect(+balance).to.equal(1);457    }458  });459460  itEth('Can perform transferCross()', async ({helper}) => {461    const sender = await helper.eth.createAccountWithBalance(donor);462    const receiverEth = await helper.eth.createAccountWithBalance(donor);463    const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth);464    const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);465466    const collection = await helper.rft.mintCollection(minter, {});467    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);468    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'rft', sender);469470    const token = await collection.mintToken(minter, 50n, {Ethereum: sender});471472    {473      // Can transferCross to ethereum address:474      const result = await collectionEvm.methods.transferCross(receiverCrossEth, token.tokenId).send({from: sender});475      // Check events:476      const event = result.events.Transfer;477      expect(event.address).to.equal(collectionAddress);478      expect(event.returnValues.from).to.equal(sender);479      expect(event.returnValues.to).to.equal(receiverEth);480      expect(event.returnValues.tokenId).to.equal(token.tokenId.toString());481      // Sender's balance decreased:482      const senderBalance = await collectionEvm.methods.balanceOf(sender).call();483      expect(+senderBalance).to.equal(0);484      expect(await token.getBalance({Ethereum: sender})).to.eq(0n);485      // Receiver's balance increased:486      const receiverBalance = await collectionEvm.methods.balanceOf(receiverEth).call();487      expect(+receiverBalance).to.equal(1);488      expect(await token.getBalance({Ethereum: receiverEth})).to.eq(50n);489    }490491    {492      // Can transferCross to substrate address:493      const substrateResult = await collectionEvm.methods.transferCross(receiverCrossSub, token.tokenId).send({from: receiverEth});494      // Check events:495      const event = substrateResult.events.Transfer;496      expect(event.address).to.be.equal(collectionAddress);497      expect(event.returnValues.from).to.be.equal(receiverEth);498      expect(event.returnValues.to).to.be.equal(helper.address.substrateToEth(minter.address));499      expect(event.returnValues.tokenId).to.be.equal(`${token.tokenId}`);500      // Sender's balance decreased:501      const senderBalance = await collectionEvm.methods.balanceOf(receiverEth).call();502      expect(+senderBalance).to.equal(0);503      expect(await token.getBalance({Ethereum: receiverEth})).to.eq(0n);504      // Receiver's balance increased:505      const receiverBalance = await helper.nft.getTokensByAddress(collection.collectionId, {Substrate: minter.address});506      expect(receiverBalance).to.contain(token.tokenId);507      expect(await token.getBalance({Substrate: minter.address})).to.eq(50n);508    }509  });510511  ['transfer', 'transferCross'].map(testCase => itEth(`Cannot ${testCase} non-owned token`, async ({helper}) => {512    const sender = await helper.eth.createAccountWithBalance(donor);513    const tokenOwner = await helper.eth.createAccountWithBalance(donor);514    const receiverSub = minter;515    const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter);516517    const collection = await helper.rft.mintCollection(minter, {});518    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);519    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'rft', sender);520521    await collection.mintToken(minter, 50n, {Ethereum: sender});522    const nonSendersToken = await collection.mintToken(minter, 50n, {Ethereum: tokenOwner});523524    // Cannot transferCross someone else's token:525    const receiver = testCase === 'transfer' ? helper.address.substrateToEth(receiverSub.address) : receiverCrossSub;526    await expect(collectionEvm.methods[testCase](receiver, nonSendersToken.tokenId).send({from: sender})).to.be.rejected;527    // Cannot transfer token if it does not exist:528    await expect(collectionEvm.methods[testCase](receiver, 999999).send({from: sender})).to.be.rejected;529  }));530531  itEth('transfer event on transfer from partial ownership to full ownership', async ({helper}) => {532    const caller = await helper.eth.createAccountWithBalance(donor);533    const receiver = helper.eth.createAccount();534    const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry-Partial-to-Full', '6', '6');535    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);536537    const result = await contract.methods.mint(caller).send();538    const tokenId = result.events.Transfer.returnValues.tokenId;539540    const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller);541542    await tokenContract.methods.repartition(2).send();543    await tokenContract.methods.transfer(receiver, 1).send();544545    const events: any = [];546    contract.events.allEvents((_: any, event: any) => {547      events.push(event);548    });549550    await tokenContract.methods.transfer(receiver, 1).send();551    if (events.length == 0) await helper.wait.newBlocks(1);552    const event = events[0];553554    expect(event.address).to.equal(collectionAddress);555    expect(event.returnValues.from).to.equal('0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF');556    expect(event.returnValues.to).to.equal(receiver);557    expect(event.returnValues.tokenId).to.equal(tokenId.toString());558  });559560  itEth('transfer event on transfer from full ownership to partial ownership', async ({helper}) => {561    const caller = await helper.eth.createAccountWithBalance(donor);562    const receiver = helper.eth.createAccount();563    const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry-Full-to-Partial', '6', '6');564    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);565566    const result = await contract.methods.mint(caller).send();567    const tokenId = result.events.Transfer.returnValues.tokenId;568569    const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller);570571    await tokenContract.methods.repartition(2).send();572573    const events: any = [];574    contract.events.allEvents((_: any, event: any) => {575      events.push(event);576    });577578    await tokenContract.methods.transfer(receiver, 1).send();579    if (events.length == 0) await helper.wait.newBlocks(1);580    const event = events[0];581582    expect(event.address).to.equal(collectionAddress);583    expect(event.returnValues.from).to.equal(caller);584    expect(event.returnValues.to).to.equal('0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF');585    expect(event.returnValues.tokenId).to.equal(tokenId.toString());586  });587588  itEth('Check balanceOfCross()', async ({helper}) => {589    const collection = await helper.rft.mintCollection(minter, {});590    const owner = await helper.ethCrossAccount.createAccountWithBalance(donor);591    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);592    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner.eth);593594    expect(await collectionEvm.methods.balanceOfCross(owner).call({from: owner.eth})).to.be.eq('0');595596    for (let i = 1n; i < 10n; i++) {597      await collection.mintToken(minter, 100n, {Ethereum: owner.eth});598      expect(await collectionEvm.methods.balanceOfCross(owner).call({from: owner.eth})).to.be.eq(i.toString());599    }600  });601602  itEth('Check ownerOfCross()', async ({helper}) => {603    const collection = await helper.rft.mintCollection(minter, {});604    let owner = await helper.ethCrossAccount.createAccountWithBalance(donor);605    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);606    const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner.eth);607    const {tokenId} = await collection.mintToken(minter, 100n,{Ethereum: owner.eth});608609    for (let i = 1n; i < 10n; i++) {610      const ownerCross = await collectionEvm.methods.ownerOfCross(tokenId).call({from: owner.eth});611      expect(ownerCross.eth).to.be.eq(owner.eth);612      expect(ownerCross.sub).to.be.eq(owner.sub);613614      const newOwner = await helper.ethCrossAccount.createAccountWithBalance(donor);615      await collectionEvm.methods.transferCross(newOwner, tokenId).send({from: owner.eth});616      owner = newOwner;617    }618619    const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId);620    const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, owner.eth, true);621    const newOwner = await helper.ethCrossAccount.createAccountWithBalance(donor);622    await tokenContract.methods.transferCross(newOwner, 50).send({from: owner.eth});623    const ownerCross = await collectionEvm.methods.ownerOfCross(tokenId).call({from: owner.eth});624    expect(ownerCross.eth.toUpperCase()).to.be.eq('0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF');625    expect(ownerCross.sub).to.be.eq('0');626  });627});628629describe('RFT: Fees', () => {630  let donor: IKeyringPair;631632  before(async function() {633    await usingEthPlaygrounds(async (helper, privateKey) => {634      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);635636      donor = await privateKey({url: import.meta.url});637    });638  });639640  itEth('transferFrom() call fee is less than 0.2UNQ', async ({helper}) => {641    const caller = await helper.eth.createAccountWithBalance(donor);642    const receiver = helper.eth.createAccount();643    const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Feeful-Transfer-From', '6', '6');644    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);645646    const result = await contract.methods.mint(caller).send();647    const tokenId = result.events.Transfer.returnValues.tokenId;648649    const cost = await helper.eth.recordCallFee(caller, () => contract.methods.transferFrom(caller, receiver, tokenId).send());650    expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal())));651    expect(cost > 0n);652  });653654  itEth('transfer() call fee is less than 0.2UNQ', async ({helper}) => {655    const caller = await helper.eth.createAccountWithBalance(donor);656    const receiver = helper.eth.createAccount();657    const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Feeful-Transfer', '6', '6');658    const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller);659660    const result = await contract.methods.mint(caller).send();661    const tokenId = result.events.Transfer.returnValues.tokenId;662663    const cost = await helper.eth.recordCallFee(caller, () => contract.methods.transfer(receiver, tokenId).send());664    expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal())));665    expect(cost > 0n);666  });667});668669describe('Common metadata', () => {670  let donor: IKeyringPair;671  let alice: IKeyringPair;672673  before(async function() {674    await usingEthPlaygrounds(async (helper, privateKey) => {675      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);676677      donor = await privateKey({url: import.meta.url});678      [alice] = await helper.arrange.createAccounts([20n], donor);679    });680  });681682  itEth('Returns collection name', async ({helper}) => {683    // FIXME: should not have balance to use .call()684    const caller = await helper.eth.createAccountWithBalance(alice);685    const tokenPropertyPermissions = [{686      key: 'URI',687      permission: {688        mutable: true,689        collectionAdmin: true,690        tokenOwner: false,691      },692    }];693    const collection = await helper.rft.mintCollection(694      alice,695      {696        name: 'Leviathan',697        tokenPrefix: '11',698        properties: [{key: 'ERC721Metadata', value: '1'}],699        tokenPropertyPermissions,700      },701    );702703    const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'rft', caller);704    const name = await contract.methods.name().call();705    expect(name).to.equal('Leviathan');706  });707708  itEth('Returns symbol name', async ({helper}) => {709    const caller = await helper.eth.createAccountWithBalance(donor);710    const tokenPropertyPermissions = [{711      key: 'URI',712      permission: {713        mutable: true,714        collectionAdmin: true,715        tokenOwner: false,716      },717    }];718    const {collectionId} = await helper.rft.mintCollection(719      alice,720      {721        name: 'Leviathan',722        tokenPrefix: '12',723        properties: [{key: 'ERC721Metadata', value: '1'}],724        tokenPropertyPermissions,725      },726    );727728    const contract = await helper.ethNativeContract.collectionById(collectionId, 'rft', caller);729    const symbol = await contract.methods.symbol().call();730    expect(symbol).to.equal('12');731  });732});733734describe('Negative tests', () => {735  let donor: IKeyringPair;736  let minter: IKeyringPair;737  let alice: IKeyringPair;738739  before(async function() {740    await usingEthPlaygrounds(async (helper, privateKey) => {741      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);742743      donor = await privateKey({url: import.meta.url});744      [minter, alice] = await helper.arrange.createAccounts([100n, 100n], donor);745    });746  });747748  itEth('[negative] Cant perform burn without approval', async ({helper}) => {749    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});750751    const owner = await helper.eth.createAccountWithBalance(donor);752    const spender = await helper.eth.createAccountWithBalance(donor);753754    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});755756    const address = helper.ethAddress.fromCollectionId(collection.collectionId);757    const contract = await helper.ethNativeContract.collection(address, 'rft');758759    const ownerCross = helper.ethCrossAccount.fromAddress(owner);760761    await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;762763    await contract.methods.setApprovalForAll(spender, true).send({from: owner});764    await contract.methods.setApprovalForAll(spender, false).send({from: owner});765766    await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;767  });768769  itEth('[negative] Cant perform transfer without approval', async ({helper}) => {770    const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});771    const owner = await helper.eth.createAccountWithBalance(donor);772    const receiver = alice;773774    const spender = await helper.eth.createAccountWithBalance(donor);775776    const token = await collection.mintToken(minter, 100n, {Ethereum: owner});777778    const address = helper.ethAddress.fromCollectionId(collection.collectionId);779    const contract = await helper.ethNativeContract.collection(address, 'rft');780781    const ownerCross = helper.ethCrossAccount.fromAddress(owner);782    const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);783784    await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;785786    await contract.methods.setApprovalForAll(spender, true).send({from: owner});787    await contract.methods.setApprovalForAll(spender, false).send({from: owner});788789    await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;790  });791});
modifiedtests/src/eth/tokenProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/tokenProperties.test.ts
+++ b/tests/src/eth/tokenProperties.test.ts
@@ -241,10 +241,10 @@
     itEth.ifWithPallets(`Can be multiple set/read for ${testCase.mode}`, testCase.requiredPallets, async({helper}) => {
       const caller = await helper.eth.createAccountWithBalance(donor);
 
-      const properties = Array(5).fill(0).map((_, i) => { return {key: `key_${i}`, value: Buffer.from(`value_${i}`)}; });
-      const permissions: ITokenPropertyPermission[] = properties.map(p => { return {key: p.key, permission: {tokenOwner: true,
+      const properties = Array(5).fill(0).map((_, i) => ({key: `key_${i}`, value: Buffer.from(`value_${i}`)}));
+      const permissions: ITokenPropertyPermission[] = properties.map(p => ({key: p.key, permission: {tokenOwner: true,
         collectionAdmin: true,
-        mutable: true}}; });
+        mutable: true}}));
 
       const collection = await helper[testCase.mode].mintCollection(alice, {
         tokenPrefix: 'ethp',
@@ -267,10 +267,10 @@
       await contract.methods.setProperties(token.tokenId, properties).send({from: caller});
 
       const values = await token.getProperties(properties.map(p => p.key));
-      expect(values).to.be.deep.equal(properties.map(p => { return {key: p.key, value: p.value.toString()}; }));
+      expect(values).to.be.deep.equal(properties.map(p => ({key: p.key, value: p.value.toString()})));
 
       expect(await contract.methods.properties(token.tokenId, []).call()).to.be.like(properties
-        .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); }));
+        .map(p => helper.ethProperty.property(p.key, p.value.toString())));
 
       expect(await contract.methods.properties(token.tokenId, [properties[0].key]).call())
         .to.be.like([helper.ethProperty.property(properties[0].key, properties[0].value.toString())]);
modifiedtests/src/fungible.test.tsdiffbeforeafterboth
--- a/tests/src/fungible.test.ts
+++ b/tests/src/fungible.test.ts
@@ -46,7 +46,7 @@
 
   itSub('RPC method tokenOnewrs for fungible collection and token', async ({helper}) => {
     const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};
-    const facelessCrowd = (await helper.arrange.createAccounts(Array(7).fill(0n), donor)).map(keyring => {return {Substrate: keyring.address};});
+    const facelessCrowd = (await helper.arrange.createAccounts(Array(7).fill(0n), donor)).map(keyring => ({Substrate: keyring.address}));
 
     const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
 
modifiedtests/src/getPropertiesRpc.test.tsdiffbeforeafterboth
--- a/tests/src/getPropertiesRpc.test.ts
+++ b/tests/src/getPropertiesRpc.test.ts
@@ -48,17 +48,13 @@
 describe('query properties RPC', () => {
   let alice: IKeyringPair;
 
-  const mintCollection = async (helper: UniqueHelper) => {
-    return await helper.nft.mintCollection(alice, {
-      tokenPrefix: 'prps',
-      properties: collectionProps,
-      tokenPropertyPermissions: tokenPropPermissions,
-    });
-  };
+  const mintCollection = async (helper: UniqueHelper) => await helper.nft.mintCollection(alice, {
+    tokenPrefix: 'prps',
+    properties: collectionProps,
+    tokenPropertyPermissions: tokenPropPermissions,
+  });
 
-  const mintToken = async (collection: UniqueNFTCollection) => {
-    return await collection.mintToken(alice, {Substrate: alice.address}, tokenProps);
-  };
+  const mintToken = async (collection: UniqueNFTCollection) => await collection.mintToken(alice, {Substrate: alice.address}, tokenProps);
 
 
   before(async () => {
modifiedtests/src/nesting/tokenProperties.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/tokenProperties.test.ts
+++ b/tests/src/nesting/tokenProperties.test.ts
@@ -44,7 +44,7 @@
   async function mintCollectionWithAllPermissionsAndToken(helper: UniqueHelper, mode: 'NFT' | 'RFT'): Promise<[UniqueNFToken | UniqueRFToken, bigint]> {
     const collection = await (mode == 'NFT' ? helper.nft : helper.rft).mintCollection(alice, {
       tokenPropertyPermissions: permissions.flatMap(({permission, signers}, i) =>
-        signers.map(signer => {return {key: `${i+1}_${signer.address}`, permission};})),
+        signers.map(signer => ({key: `${i+1}_${signer.address}`, permission}))),
     });
     return mode == 'NFT' ? [await collection.mintToken(alice), 1n] : [await collection.mintToken(alice, 100n as any), 100n];
   }
@@ -201,7 +201,7 @@
     const collectionA = await helper.nft.mintCollection(alice, {permissions: {nesting: {tokenOwner: true}}});
     const collectionB = await helper.nft.mintCollection(alice, {
       tokenPropertyPermissions: permissions.flatMap(({permission, signers}, i) =>
-        signers.map(signer => {return {key: `${i+1}_${signer.address}`, permission};})),
+        signers.map(signer => ({key: `${i+1}_${signer.address}`, permission}))),
     });
     const targetToken = await collectionA.mintToken(alice);
     const nestedToken = await collectionB.mintToken(alice, targetToken.nestingAccount());
@@ -239,7 +239,7 @@
     const collectionA = await helper.nft.mintCollection(alice, {permissions: {nesting: {tokenOwner: true}}});
     const collectionB = await helper.nft.mintCollection(alice, {
       tokenPropertyPermissions: permissions.flatMap(({permission, signers}, i) =>
-        signers.map(signer => {return {key: `${i+1}_${signer.address}`, permission};})),
+        signers.map(signer => ({key: `${i+1}_${signer.address}`, permission}))),
     });
     const targetToken = await collectionA.mintToken(alice);
     const nestedToken = await collectionB.mintToken(alice, targetToken.nestingAccount());
@@ -284,7 +284,7 @@
     const collectionA = await helper.nft.mintCollection(alice, {permissions: {nesting: {tokenOwner: true}}});
     const collectionB = await helper.nft.mintCollection(alice, {
       tokenPropertyPermissions: permissions.flatMap(({permission, signers}, i) =>
-        signers.map(signer => {return {key: `${i+1}_${signer.address}`, permission};})),
+        signers.map(signer => ({key: `${i+1}_${signer.address}`, permission}))),
     });
     const targetToken = await collectionA.mintToken(alice);
     const nestedToken = await collectionB.mintToken(alice, targetToken.nestingAccount());
@@ -477,7 +477,7 @@
 
   async function mintCollectionWithAllPermissionsAndToken(helper: UniqueHelper, mode: 'NFT' | 'RFT'): Promise<[UniqueNFToken | UniqueRFToken, bigint]> {
     const collection = await (mode == 'NFT' ? helper.nft : helper.rft).mintCollection(alice, {
-      tokenPropertyPermissions: constitution.map(({permission}, i) => {return {key: `${i+1}`, permission};}),
+      tokenPropertyPermissions: constitution.map(({permission}, i) => ({key: `${i+1}`, permission})),
     });
     return mode == 'NFT' ? [await collection.mintToken(alice), 1n] : [await collection.mintToken(alice, 100n as any), 100n];
   }
modifiedtests/src/refungible.test.tsdiffbeforeafterboth
--- a/tests/src/refungible.test.ts
+++ b/tests/src/refungible.test.ts
@@ -64,7 +64,7 @@
 
   itSub('RPC method tokenOwners for refungible collection and token', async ({helper}) => {
     const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};
-    const facelessCrowd = (await helper.arrange.createAccounts(Array(7).fill(0n), donor)).map(keyring => {return {Substrate: keyring.address};});
+    const facelessCrowd = (await helper.arrange.createAccounts(Array(7).fill(0n), donor)).map(keyring => ({Substrate: keyring.address}));
 
     const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
 
modifiedtests/src/rpc.test.tsdiffbeforeafterboth
--- a/tests/src/rpc.test.ts
+++ b/tests/src/rpc.test.ts
@@ -40,7 +40,7 @@
     // Set-up a few token owners of all stripes
     const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};
     const facelessCrowd = (await helper.arrange.createAccounts([0n, 0n, 0n, 0n, 0n, 0n, 0n], donor))
-      .map(i => {return {Substrate: i.address};});
+      .map(i => ({Substrate: i.address}));
 
     const collection = await helper.ft.mintCollection(alice, {name: 'RPC-2', tokenPrefix: 'RPC'});
     // mint some maximum (u128) amounts of tokens possible
modifiedtests/src/sub/appPromotion/appPromotion.test.tsdiffbeforeafterboth
--- a/tests/src/sub/appPromotion/appPromotion.test.ts
+++ b/tests/src/sub/appPromotion/appPromotion.test.ts
@@ -357,11 +357,9 @@
         const stakers = await getAccounts(3);
 
         await Promise.all(stakers.map(staker => helper.staking.stake(staker, 100n * nominal)));
-        await Promise.all(stakers.map(staker => {
-          return testCase.method === 'unstakeAll'
-            ? helper.staking.unstakeAll(staker)
-            : helper.staking.unstakePartial(staker, 100n * nominal);
-        }));
+        await Promise.all(stakers.map(staker => testCase.method === 'unstakeAll'
+          ? helper.staking.unstakeAll(staker)
+          : helper.staking.unstakePartial(staker, 100n * nominal)));
 
         await Promise.all(stakers.map(async (staker) => {
           expect(await helper.staking.getPendingUnstake({Substrate: staker.address})).to.be.equal(100n * nominal);
@@ -375,11 +373,9 @@
         const stakers = await getAccounts(10);
 
         await Promise.all(stakers.map(staker => helper.staking.stake(staker, 100n * nominal)));
-        const unstakingResults = await Promise.allSettled(stakers.map((staker, i) => {
-          return i % 2 === 0
-            ? helper.staking.unstakeAll(staker)
-            : helper.staking.unstakePartial(staker, 100n * nominal);
-        }));
+        const unstakingResults = await Promise.allSettled(stakers.map((staker, i) => i % 2 === 0
+          ? helper.staking.unstakeAll(staker)
+          : helper.staking.unstakePartial(staker, 100n * nominal)));
 
         const successfulUnstakes = unstakingResults.filter(result => result.status === 'fulfilled');
         expect(successfulUnstakes).to.have.length(3);
modifiedtests/src/util/index.tsdiffbeforeafterboth
--- a/tests/src/util/index.ts
+++ b/tests/src/util/index.ts
@@ -19,13 +19,9 @@
 chai.use(chaiSubset);
 export const expect = chai.expect;
 
-const getTestHash = (filename: string) => {
-  return crypto.createHash('md5').update(filename).digest('hex');
-};
+const getTestHash = (filename: string) => crypto.createHash('md5').update(filename).digest('hex');
 
-export const getTestSeed = (filename: string) => {
-  return `//Alice+${getTestHash(filename)}`;
-};
+export const getTestSeed = (filename: string) => `//Alice+${getTestHash(filename)}`;
 
 async function usingPlaygroundsGeneral<T extends ChainHelperBase>(helperType: new(logger: ILogger) => T, url: string, code: (helper: T, privateKey: (seed: string | {filename?: string, url?: string, ignoreFundsPresence?: boolean}) => Promise<IKeyringPair>) => Promise<void>) {
   const silentConsole = new SilentConsole();
@@ -65,49 +61,27 @@
   }
 }
 
-export const usingPlaygrounds = (code: (helper: DevUniqueHelper, privateKey: (seed: string | {filename?: string, url?: string, ignoreFundsPresence?: boolean}) => Promise<IKeyringPair>) => Promise<void>, url: string = config.substrateUrl) => {
-  return usingPlaygroundsGeneral<DevUniqueHelper>(DevUniqueHelper, url, code);
-};
+export const usingPlaygrounds = (code: (helper: DevUniqueHelper, privateKey: (seed: string | {filename?: string, url?: string, ignoreFundsPresence?: boolean}) => Promise<IKeyringPair>) => Promise<void>, url: string = config.substrateUrl) => usingPlaygroundsGeneral<DevUniqueHelper>(DevUniqueHelper, url, code);
 
-export const usingWestmintPlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevWestmintHelper>(DevWestmintHelper, url, code);
-};
+export const usingWestmintPlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevWestmintHelper>(DevWestmintHelper, url, code);
 
-export const usingStateminePlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevStatemineHelper>(DevWestmintHelper, url, code);
-};
+export const usingStateminePlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevStatemineHelper>(DevWestmintHelper, url, code);
 
-export const usingStatemintPlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevStatemintHelper>(DevWestmintHelper, url, code);
-};
+export const usingStatemintPlaygrounds = (url: string, code: (helper: DevWestmintHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevStatemintHelper>(DevWestmintHelper, url, code);
 
-export const usingRelayPlaygrounds = (url: string, code: (helper: DevRelayHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevRelayHelper>(DevRelayHelper, url, code);
-};
+export const usingRelayPlaygrounds = (url: string, code: (helper: DevRelayHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevRelayHelper>(DevRelayHelper, url, code);
 
-export const usingAcalaPlaygrounds = (url: string, code: (helper: DevAcalaHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevAcalaHelper>(DevAcalaHelper, url, code);
-};
+export const usingAcalaPlaygrounds = (url: string, code: (helper: DevAcalaHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevAcalaHelper>(DevAcalaHelper, url, code);
 
-export const usingKaruraPlaygrounds = (url: string, code: (helper: DevKaruraHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevKaruraHelper>(DevAcalaHelper, url, code);
-};
+export const usingKaruraPlaygrounds = (url: string, code: (helper: DevKaruraHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevKaruraHelper>(DevAcalaHelper, url, code);
 
-export const usingMoonbeamPlaygrounds = (url: string, code: (helper: DevMoonbeamHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevMoonbeamHelper>(DevMoonbeamHelper, url, code);
-};
+export const usingMoonbeamPlaygrounds = (url: string, code: (helper: DevMoonbeamHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevMoonbeamHelper>(DevMoonbeamHelper, url, code);
 
-export const usingMoonriverPlaygrounds = (url: string, code: (helper: DevMoonbeamHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevMoonriverHelper>(DevMoonriverHelper, url, code);
-};
+export const usingMoonriverPlaygrounds = (url: string, code: (helper: DevMoonbeamHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevMoonriverHelper>(DevMoonriverHelper, url, code);
 
-export const usingAstarPlaygrounds = (url: string, code: (helper: DevAstarHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevAstarHelper>(DevAstarHelper, url, code);
-};
+export const usingAstarPlaygrounds = (url: string, code: (helper: DevAstarHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevAstarHelper>(DevAstarHelper, url, code);
 
-export const usingShidenPlaygrounds = (url: string, code: (helper: DevShidenHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => {
-  return usingPlaygroundsGeneral<DevShidenHelper>(DevShidenHelper, url, code);
-};
+export const usingShidenPlaygrounds = (url: string, code: (helper: DevShidenHelper, privateKey: (seed: string) => Promise<IKeyringPair>) => Promise<void>) => usingPlaygroundsGeneral<DevShidenHelper>(DevShidenHelper, url, code);
 
 export const MINIMUM_DONOR_FUND = 100_000n;
 export const DONOR_FUNDING = 2_000_000n;
modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
--- a/tests/src/util/playgrounds/unique.dev.ts
+++ b/tests/src/util/playgrounds/unique.dev.ts
@@ -771,9 +771,7 @@
     // <<< Referendum voting <<<
 
     // Wait the proposal to pass
-    await this.helper.wait.expectEvent(3, Event.Democracy.Passed, event => {
-      return event.referendumIndex() == referendumIndex;
-    });
+    await this.helper.wait.expectEvent(3, Event.Democracy.Passed, event => event.referendumIndex() == referendumIndex);
 
     await this.helper.wait.newBlocks(1);
 
@@ -924,7 +922,7 @@
   event<T extends IEventHelper>(
     maxBlocksToWait: number,
     eventHelperType: new () => T,
-    filter: (_: T) => boolean = () => { return true; },
+    filter: (_: T) => boolean = () => true,
   ) {
     // eslint-disable-next-line no-async-promise-executor
     const promise = new Promise<T | null>(async (resolve) => {
@@ -970,7 +968,7 @@
   async expectEvent<T extends IEventHelper>(
     maxBlocksToWait: number,
     eventHelperType: new () => T,
-    filter: (e: T) => boolean = () => { return true; },
+    filter: (e: T) => boolean = () => true,
   ) {
     const e = await this.event(maxBlocksToWait, eventHelperType, filter);
     if (e == null) {
@@ -1077,9 +1075,7 @@
   async startCapture() {
     this.stopCapture();
     this.unsubscribe = (await this.helper.getApi().query.system.events((eventRecords: FrameSystemEventRecord[]) => {
-      const newEvents = eventRecords.filter(r => {
-        return r.event.section == this.eventSection && r.event.method == this.eventMethod;
-      });
+      const newEvents = eventRecords.filter(r => r.event.section == this.eventSection && r.event.method == this.eventMethod);
 
       this.events.push(...newEvents);
     })) as any;
@@ -1105,12 +1101,10 @@
 
   async payoutStakers(signer: IKeyringPair, stakersToPayout: number):  Promise<{staker: string, stake: bigint, payout: bigint}[]> {
     const payoutResult = await this.helper.executeExtrinsic(signer, 'api.tx.appPromotion.payoutStakers', [stakersToPayout], true);
-    return payoutResult.result.events.filter(e => e.event.method === 'StakingRecalculation').map(e => {
-      return {
-        staker: e.event.data[0].toString(),
-        stake: e.event.data[1].toBigInt(),
-        payout: e.event.data[2].toBigInt(),
-      };
-    });
+    return payoutResult.result.events.filter(e => e.event.method === 'StakingRecalculation').map(e => ({
+      staker: e.event.data[0].toString(),
+      stake: e.event.data[1].toBigInt(),
+      payout: e.event.data[2].toBigInt(),
+    }));
   }
 }
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -2395,7 +2395,7 @@
     return total.toBigInt();
   }
 
-  async getLocked(address: TSubstrateAccount): Promise<[{ id: string, amount: bigint, reason: string }]> {
+  async getLocked(address: TSubstrateAccount): Promise<{ id: string, amount: bigint, reason: string }[]> {
     const locks = (await this.helper.callRpc('api.query.balances.locks', [address])).toHuman();
     return locks.map((lock: any) => ({id: lock.id, amount: BigInt(lock.amount.replace(/,/g, '')), reasons: lock.reasons}));
   }
@@ -2581,14 +2581,12 @@
    */
   async getVestingSchedules(address: TSubstrateAccount): Promise<{ start: bigint, period: bigint, periodCount: bigint, perPeriod: bigint }[]> {
     const schedule = (await this.helper.callRpc('api.query.vesting.vestingSchedules', [address])).toJSON();
-    return schedule.map((schedule: any) => {
-      return {
-        start: BigInt(schedule.start),
-        period: BigInt(schedule.period),
-        periodCount: BigInt(schedule.periodCount),
-        perPeriod: BigInt(schedule.perPeriod),
-      };
-    });
+    return schedule.map((schedule: any) => ({
+      start: BigInt(schedule.start),
+      period: BigInt(schedule.period),
+      periodCount: BigInt(schedule.periodCount),
+      perPeriod: BigInt(schedule.perPeriod),
+    }));
   }
 
   /**
@@ -2804,12 +2802,10 @@
    */
   async getTotalStakedPerBlock(address: ICrossAccountId): Promise<IStakingInfo[]> {
     const rawTotalStakerdPerBlock = await this.helper.callRpc('api.rpc.appPromotion.totalStakedPerBlock', [address]);
-    return rawTotalStakerdPerBlock.map(([block, amount]: any[]) => {
-      return {
-        block: block.toBigInt(),
-        amount: amount.toBigInt(),
-      };
-    });
+    return rawTotalStakerdPerBlock.map(([block, amount]: any[]) => ({
+      block: block.toBigInt(),
+      amount: amount.toBigInt(),
+    }));
   }
 
   /**
@@ -2828,12 +2824,10 @@
    */
   async getPendingUnstakePerBlock(address: ICrossAccountId): Promise<IStakingInfo[]> {
     const rawUnstakedPerBlock = await this.helper.callRpc('api.rpc.appPromotion.pendingUnstakePerBlock', [address]);
-    const result = rawUnstakedPerBlock.map(([block, amount]: any[]) => {
-      return {
-        block: block.toBigInt(),
-        amount: amount.toBigInt(),
-      };
-    });
+    const result = rawUnstakedPerBlock.map(([block, amount]: any[]) => ({
+      block: block.toBigInt(),
+      amount: amount.toBigInt(),
+    }));
     return result;
   }
 }
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -682,10 +682,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -765,10 +763,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -780,10 +776,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -858,10 +852,8 @@
   });
 
   const expectFailedToTransact = async (helper: DevUniqueHelper, messageSent: any) => {
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == messageSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == messageSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
   };
 
   itSub('Quartz rejects KAR tokens from Karura', async ({helper}) => {
@@ -1172,10 +1164,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -1263,10 +1253,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1282,10 +1270,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1544,10 +1530,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -1627,10 +1611,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1642,10 +1624,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -684,10 +684,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -767,10 +765,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -782,10 +778,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -860,10 +854,8 @@
   });
 
   const expectFailedToTransact = async (helper: DevUniqueHelper, messageSent: any) => {
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == messageSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == messageSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
   };
 
   itSub('Unique rejects ACA tokens from Acala', async ({helper}) => {
@@ -1175,10 +1167,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -1266,10 +1256,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1285,10 +1273,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1546,10 +1532,8 @@
       maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramSent.messageHash()
-        && event.outcome().isFailedToTransactAsset;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramSent.messageHash()
+        && event.outcome().isFailedToTransactAsset);
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(targetAccountBalance).to.be.equal(0n);
@@ -1629,10 +1613,8 @@
       maliciousXcmProgramFullIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramFullIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
@@ -1644,10 +1626,8 @@
       maliciousXcmProgramHereIdSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
     });
 
-    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
-      return event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
-        && event.outcome().isUntrustedReserveLocation;
-    });
+    await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash() == maliciousXcmProgramHereIdSent.messageHash()
+        && event.outcome().isUntrustedReserveLocation);
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);