git.delta.rocks / unique-network / refs/commits / 49890775239a

difftreelog

test changed the privateKeyWrapper parameter from optional to mandatory

h3lpkey2022-06-03parent: #b1d3841.patch.diff
in: master

63 files changed

modifiedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/addCollectionAdmin.test.ts
+++ b/tests/src/addCollectionAdmin.test.ts
@@ -27,8 +27,8 @@
   it('Add collection admin.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.equal(alice.address);
@@ -44,9 +44,9 @@
   it('Add admin using added collection admin.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//CHARLIE');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//CHARLIE');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.equal(alice.address);
@@ -70,8 +70,8 @@
   it("Not owner can't add collection admin.", async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const nonOwner = privateKeyWrapper!('//Bob_stash');
+      const alice = privateKeyWrapper('//Alice');
+      const nonOwner = privateKeyWrapper('//Bob_stash');
 
       const changeAdminTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(alice.address));
       await expect(submitTransactionExpectFailAsync(nonOwner, changeAdminTx)).to.be.rejected;
@@ -87,8 +87,8 @@
     await usingApi(async (api, privateKeyWrapper) => {
       // tslint:disable-next-line: no-bitwise
       const collectionId = (1 << 32) - 1;
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const changeOwnerTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));
       await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
@@ -101,8 +101,8 @@
   it("Can't add an admin to a destroyed collection.", async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       await destroyCollectionExpectSuccess(collectionId);
       const changeOwnerTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));
       await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
@@ -114,15 +114,15 @@
 
   it('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
     await usingApi(async (api: ApiPromise, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const accounts = [
-        privateKeyWrapper!('//AdminTest/1').address,
-        privateKeyWrapper!('//AdminTest/2').address,
-        privateKeyWrapper!('//AdminTest/3').address,
-        privateKeyWrapper!('//AdminTest/4').address,
-        privateKeyWrapper!('//AdminTest/5').address,
-        privateKeyWrapper!('//AdminTest/6').address,
-        privateKeyWrapper!('//AdminTest/7').address,
+        privateKeyWrapper('//AdminTest/1').address,
+        privateKeyWrapper('//AdminTest/2').address,
+        privateKeyWrapper('//AdminTest/3').address,
+        privateKeyWrapper('//AdminTest/4').address,
+        privateKeyWrapper('//AdminTest/5').address,
+        privateKeyWrapper('//AdminTest/6').address,
+        privateKeyWrapper('//AdminTest/7').address,
       ];
       const collectionId = await createCollectionExpectSuccess();
 
modifiedtests/src/addToAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/addToAllowList.test.ts
+++ b/tests/src/addToAllowList.test.ts
@@ -42,8 +42,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -67,7 +67,7 @@
     await usingApi(async (api, privateKeyWrapper) => {
       // tslint:disable-next-line: no-bitwise
       const collectionId = await getCreatedCollectionCount(api) + 1;
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
 
       const tx = api.tx.unique.addToAllowList(collectionId, normalizeAccountId(bob.address));
       await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
@@ -76,8 +76,8 @@
 
   it('Allow list an address in the collection that was destroyed', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // tslint:disable-next-line: no-bitwise
       const collectionId = await createCollectionExpectSuccess();
       await destroyCollectionExpectSuccess(collectionId);
@@ -88,8 +88,8 @@
 
   it('Allow list an address in the collection that does not have allow list access enabled', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const ferdie = privateKeyWrapper!('//Ferdie');
+      const alice = privateKeyWrapper('//Alice');
+      const ferdie = privateKeyWrapper('//Ferdie');
       const collectionId = await createCollectionExpectSuccess();
       await enableAllowListExpectSuccess(alice, collectionId);
       await enablePublicMintingExpectSuccess(alice, collectionId);
@@ -104,9 +104,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/addToContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/addToContractAllowList.test.ts
+++ b/tests/src/addToContractAllowList.test.ts
@@ -31,7 +31,7 @@
 
   it('Add an address to a contract allow list', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const [contract, deployer] = await deployFlipper(api);
 
       const allowListedBefore = (await api.query.unique.contractAllowList(contract.address, bob.address)).toJSON();
@@ -47,7 +47,7 @@
 
   it('Adding same address to allow list repeatedly should not produce errors', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const [contract, deployer] = await deployFlipper(api);
 
       const allowListedBefore = (await api.query.unique.contractAllowList(contract.address, bob.address)).toJSON();
@@ -70,9 +70,9 @@
 
   it('Add an address to a allow list of a non-contract', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Bob');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlieGuineaPig = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Bob');
+      const bob = privateKeyWrapper('//Bob');
+      const charlieGuineaPig = privateKeyWrapper('//Charlie');
 
       const allowListedBefore = (await api.query.unique.contractAllowList(charlieGuineaPig.address, bob.address)).toJSON();
       const addTx = api.tx.unique.addToContractAllowList(charlieGuineaPig.address, bob.address);
@@ -86,7 +86,7 @@
 
   it('Add to a contract allow list using a non-owner address', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const [contract] = await deployFlipper(api);
 
       const allowListedBefore = (await api.query.unique.contractAllowList(contract.address, bob.address)).toJSON();
modifiedtests/src/allowLists.test.tsdiffbeforeafterboth
--- a/tests/src/allowLists.test.ts
+++ b/tests/src/allowLists.test.ts
@@ -50,9 +50,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/approve.test.tsdiffbeforeafterboth
--- a/tests/src/approve.test.ts
+++ b/tests/src/approve.test.ts
@@ -43,9 +43,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });
 
@@ -99,9 +99,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });  
 
@@ -131,9 +131,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });  
 
@@ -166,9 +166,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });  
 
@@ -205,10 +205,10 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
-      dave =  privateKeyWrapper!('//Dave');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
+      dave =  privateKeyWrapper('//Dave');
     });
   });  
 
@@ -228,9 +228,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });
 
@@ -267,9 +267,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });
 
@@ -300,10 +300,10 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
-      dave =  privateKeyWrapper!('//Dave');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
+      dave =  privateKeyWrapper('//Dave');
     });
   });  
 
@@ -340,10 +340,10 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
-      dave =  privateKeyWrapper!('//Dave');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
+      dave =  privateKeyWrapper('//Dave');
     });
   });  
 
@@ -391,9 +391,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });
 
@@ -413,9 +413,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice =  privateKeyWrapper!('//Alice');
-      bob =  privateKeyWrapper!('//Bob');
-      charlie =  privateKeyWrapper!('//Charlie');
+      alice =  privateKeyWrapper('//Alice');
+      bob =  privateKeyWrapper('//Bob');
+      charlie =  privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
--- a/tests/src/change-collection-owner.test.ts
+++ b/tests/src/change-collection-owner.test.ts
@@ -42,8 +42,8 @@
   it('Changing owner changes owner address', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collection =await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
@@ -61,8 +61,8 @@
   it('Changing the owner of the collection is not allowed for the former owner', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
@@ -81,9 +81,9 @@
   it('New collectionOwner has access to sponsorship management operations in the collection', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
@@ -125,9 +125,9 @@
   it('New collectionOwner has access to changeCollectionOwner', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
@@ -152,8 +152,8 @@
   it('Not owner can\'t change owner.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const changeOwnerTx = api.tx.unique.changeCollectionOwner(collectionId, bob.address);
       await expect(submitTransactionExpectFailAsync(bob, changeOwnerTx)).to.be.rejected;
@@ -169,8 +169,8 @@
   it('Collection admin can\'t change owner.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
 
@@ -188,8 +188,8 @@
   it('Can\'t change owner of a non-existing collection.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = (1<<32) - 1;
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const changeOwnerTx = api.tx.unique.changeCollectionOwner(collectionId, bob.address);
       await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
@@ -202,9 +202,9 @@
   it('Former collectionOwner not allowed to sponsorship management operations in the collection', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/burnItemEvent.test.ts
+++ b/tests/src/check-event/burnItemEvent.test.ts
@@ -32,7 +32,7 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
   it('Check event from burnItem(): ', async () => {
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createCollectionEvent.test.ts
+++ b/tests/src/check-event/createCollectionEvent.test.ts
@@ -32,7 +32,7 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
   it('Check event from createCollection(): ', async () => {
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createItemEvent.test.ts
+++ b/tests/src/check-event/createItemEvent.test.ts
@@ -32,7 +32,7 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
   it('Check event from createItem(): ', async () => {
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createMultipleItemsEvent.test.ts
+++ b/tests/src/check-event/createMultipleItemsEvent.test.ts
@@ -32,7 +32,7 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
   it('Check event from createMultipleItems(): ', async () => {
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/destroyCollectionEvent.test.ts
+++ b/tests/src/check-event/destroyCollectionEvent.test.ts
@@ -31,7 +31,7 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
   it('Check event from destroyCollection(): ', async () => {
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferEvent.test.ts
+++ b/tests/src/check-event/transferEvent.test.ts
@@ -33,8 +33,8 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
   it('Check event from transfer(): ', async () => {
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferFromEvent.test.ts
+++ b/tests/src/check-event/transferFromEvent.test.ts
@@ -33,8 +33,8 @@
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
   it('Check event from transferFrom(): ', async () => {
modifiedtests/src/contracts.test.tsdiffbeforeafterboth
--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -19,7 +19,6 @@
 import usingApi, {submitTransactionAsync} from './substrate/substrate-api';
 import fs from 'fs';
 import {Abi, ContractPromise as Contract} from '@polkadot/api-contract';
-import privateKey from './substrate/privateKey';
 import {
   deployFlipper,
   getFlipValue,
@@ -54,7 +53,7 @@
       const [contract, deployer] = await deployFlipper(api);
       const initialGetResponse = await getFlipValue(contract, deployer);
 
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const flip = contract.tx.flip(value, gasLimit);
       await submitTransactionAsync(bob, flip);
 
@@ -77,8 +76,8 @@
 describe.skip('Chain extensions', () => {
   it('Transfer CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       // Prep work
       const collectionId = await createCollectionExpectSuccess();
@@ -101,8 +100,8 @@
 
   it('Mint CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
@@ -128,8 +127,8 @@
 
   it('Bulk mint CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
@@ -169,9 +168,9 @@
 
   it('Approve CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
@@ -188,9 +187,9 @@
 
   it('TransferFrom CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
@@ -209,8 +208,8 @@
 
   it('ToggleAllowList CE', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -58,8 +58,8 @@
 
   it('Create new collection with extra fields', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       const tx = api.tx.unique.createCollectionEx({
         mode: {Fungible: 8},
         permissions: {
@@ -101,7 +101,7 @@
   });
   it('fails when bad limits are set', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const tx = api.tx.unique.createCollectionEx({mode: 'NFT', limits: {tokenLimit: 0}});
       await expect(executeTransaction(api, alice, tx)).to.be.rejectedWith(/^common.CollectionTokenLimitExceeded$/);
     });
modifiedtests/src/createMultipleItems.test.tsdiffbeforeafterboth
--- a/tests/src/createMultipleItems.test.ts
+++ b/tests/src/createMultipleItems.test.ts
@@ -45,7 +45,7 @@
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
 
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       await submitTransactionAsync(
         alice, 
         api.tx.unique.setPropertyPermissions(collectionId, [{key: 'data', permission: {tokenOwner: true}}]),
@@ -76,7 +76,7 @@
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const args = [
         {Fungible: {value: 1}},
         {Fungible: {value: 2}},
@@ -96,7 +96,7 @@
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const args = [
         {ReFungible: {pieces: 1}},
         {ReFungible: {pieces: 2}},
@@ -116,7 +116,7 @@
 
   it('Can mint amount of items equals to collection limits', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
 
       const collectionId = await createCollectionExpectSuccess();
       await setCollectionLimitsExpectSuccess(alice, collectionId, {
@@ -138,7 +138,7 @@
       const collectionId = await createCollectionWithPropsExpectSuccess({propPerm: [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]});
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const args = [
         {NFT: {properties: [{key: 'k', value: 'v1'}]}},
         {NFT: {properties: [{key: 'k', value: 'v2'}]}},
@@ -164,8 +164,8 @@
       const collectionId = await createCollectionWithPropsExpectSuccess({propPerm: [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]});
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
       const args = [
         {NFT: {properties: [{key: 'k', value: 'v1'}]}},
@@ -192,7 +192,7 @@
       const collectionId = await createCollectionWithPropsExpectSuccess({propPerm: [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]});
       const itemsListIndexBefore = await getLastTokenId(api, collectionId);
       expect(itemsListIndexBefore).to.be.equal(0);
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const args = [
         {NFT: {properties: [{key: 'k', value: 'v1'}]}},
         {NFT: {properties: [{key: 'k', value: 'v2'}]}},
@@ -220,8 +220,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -302,8 +302,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -364,7 +364,7 @@
       const collectionId = await createCollectionWithPropsExpectSuccess({
         propPerm: [{key: 'key', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}],
       });
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const args = [
         {NFT: {properties: [{key: 'key', value: 'A'.repeat(32769)}]}},
         {NFT: {properties: [{key: 'key', value: 'B'.repeat(32769)}]}},
modifiedtests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth
--- a/tests/src/createMultipleItemsEx.test.ts
+++ b/tests/src/createMultipleItemsEx.test.ts
@@ -22,9 +22,9 @@
   it('can initialize multiple NFT with different owners', async () => {
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -47,9 +47,9 @@
   it('createMultipleItemsEx with property Admin', async () => {
     const collection = await createCollectionWithPropsExpectSuccess({mode: {type: 'NFT'}, propPerm: [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -75,9 +75,9 @@
   it('createMultipleItemsEx with property AdminConst', async () => {
     const collection = await createCollectionWithPropsExpectSuccess({mode: {type: 'NFT'}, propPerm: [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -103,9 +103,9 @@
   it('createMultipleItemsEx with property itemOwnerOrAdmin', async () => {
     const collection = await createCollectionWithPropsExpectSuccess({mode: {type: 'NFT'}, propPerm: [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: true}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -132,9 +132,9 @@
     const collection = await createCollectionWithPropsExpectSuccess({properties: [{key: 'key1', value: 'v'}],
       propPerm:   [{key: 'key1', permission: {mutable: true, collectionAdmin: false, tokenOwner: false}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       await addCollectionAdminExpectSuccess(alice, collection, bob.address);
       const data = [
         {
@@ -161,8 +161,8 @@
     const collection = await createCollectionWithPropsExpectSuccess({properties: [{key: 'key1', value: 'v'}],
       propPerm:   [{key: 'key1', permission: {mutable: false, collectionAdmin: false, tokenOwner: false}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       await addCollectionAdminExpectSuccess(alice, collection, bob.address);
       const data = [
         {
@@ -188,9 +188,9 @@
   it('Adding property without access rights', async () => {
     const collection = await createCollectionWithPropsExpectSuccess({properties: [{key: 'key1', value: 'v'}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       await addCollectionAdminExpectSuccess(alice, collection, bob.address);
       const data = [
         {
@@ -221,7 +221,7 @@
 
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       await expect(executeTransaction(api, alice, api.tx.unique.setPropertyPermissions(collection, propPerms))).to.be.rejectedWith(/common\.PropertyLimitReached/);
     });
   });
@@ -229,9 +229,9 @@
   it('Trying to add bigger property than allowed', async () => {
     const collection = await createCollectionWithPropsExpectSuccess({propPerm: [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       await addCollectionAdminExpectSuccess(alice, collection, bob.address);
       const data = [
         {
@@ -253,9 +253,9 @@
   it('can initialize multiple NFT with different owners', async () => {
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -278,9 +278,9 @@
   it('can initialize multiple NFT with different owners', async () => {
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const data = [
         {
           owner: {substrate: alice.address},
@@ -304,8 +304,8 @@
     const collection = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
     
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // Polkadot requires map, and yet requires keys to be JSON encoded
       const users = new Map();
       users.set(JSON.stringify({substrate: alice.address}), 1);
modifiedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth
--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -65,8 +65,8 @@
 describe('integration test: Fees must be credited to Treasury:', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -77,7 +77,7 @@
 
       const totalBefore = (await api.query.balances.totalIssuance()).toBigInt();
 
-      const alicePrivateKey = privateKeyWrapper!('//Alice');
+      const alicePrivateKey = privateKeyWrapper('//Alice');
       const amount = 1n;
       const transfer = api.tx.balances.transfer(bobsPublicKey, amount);
 
@@ -95,7 +95,7 @@
       await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
-      const alicePrivateKey = privateKeyWrapper!('//Alice');
+      const alicePrivateKey = privateKeyWrapper('//Alice');
       const treasuryBalanceBefore: bigint = (await api.query.system.account(TREASURY)).data.free.toBigInt();
       const aliceBalanceBefore: bigint = (await api.query.system.account(alicesPublicKey)).data.free.toBigInt();
 
@@ -118,7 +118,7 @@
       //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
-      const bobPrivateKey = privateKeyWrapper!('//Bob');
+      const bobPrivateKey = privateKeyWrapper('//Bob');
       const treasuryBalanceBefore = (await api.query.system.account(TREASURY)).data.free.toBigInt();
       const bobBalanceBefore = (await api.query.system.account(bobsPublicKey)).data.free.toBigInt();
 
modifiedtests/src/destroyCollection.test.tsdiffbeforeafterboth
--- a/tests/src/destroyCollection.test.ts
+++ b/tests/src/destroyCollection.test.ts
@@ -50,8 +50,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/enableContractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/enableContractSponsoring.test.ts
+++ b/tests/src/enableContractSponsoring.test.ts
@@ -79,7 +79,7 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
 
modifiedtests/src/enableDisableTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/enableDisableTransfer.test.ts
+++ b/tests/src/enableDisableTransfer.test.ts
@@ -31,8 +31,8 @@
 describe('Enable/Disable Transfers', () => {
   it('User can transfer token with enabled transfer flag', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
@@ -46,8 +46,8 @@
 
   it('User can\'n transfer token with disabled transfer flag', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
@@ -63,7 +63,7 @@
 describe('Negative Enable/Disable Transfers', () => {
   it('Non-owner cannot change transfer flag', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
 
modifiedtests/src/eth/base.test.tsdiffbeforeafterboth
--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -53,7 +53,7 @@
     const caller = await createEthAccountWithBalance(api, web3);
     const receiver = createEthAccount(web3);
 
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -6,7 +6,7 @@
 
 describe('EVM collection properties', () => {
   itWeb3('Can be set', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
 
@@ -21,7 +21,7 @@
     expect(value).to.equal('testValue');
   });
   itWeb3('Can be deleted', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
 
@@ -38,7 +38,7 @@
     expect(result.length).to.equal(0);
   });
   itWeb3('Can be read', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = createEthAccount(web3);
     const collection = await createCollectionExpectSuccess({mode: {type:'NFT'}});
 
modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -5,7 +5,7 @@
 
 describe('evm collection sponsoring', () => {
   itWeb3('sponsors mint transactions', async ({web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const collection = await createCollectionExpectSuccess();
     await setCollectionSponsorExpectSuccess(collection, alice.address);
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -63,7 +63,7 @@
   });
 
   itWeb3('In generous mode, non-allowlisted user transaction will be sponsored', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = await createEthAccountWithBalance(api, web3);
@@ -91,7 +91,7 @@
   });
 
   itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should decrease (allowlisted)', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = createEthAccount(web3);
@@ -121,7 +121,7 @@
   });
 
   itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should not decrease (non-allowlisted)', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = createEthAccount(web3);
@@ -149,7 +149,7 @@
   });
 
   itWeb3('Sponsoring is set, an address that has UNQ can send a transaction and it works. User balance should not change', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = await createEthAccountWithBalance(api, web3);
@@ -178,7 +178,7 @@
   });
 
   itWeb3('Sponsoring is limited, with setContractRateLimit. The limitation is working if transactions are sent more often, the sender pays the commission.', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = await createEthAccountWithBalance(api, web3);
@@ -301,8 +301,8 @@
 
   //TODO: CORE-302 add eth methods
   itWeb3.skip('Check that transaction via EVM spend money from substrate address', async ({api, web3, privateKeyWrapper}) => {
-    const owner = privateKeyWrapper!('//Alice');
-    const user = privateKeyWrapper!(`//User/${Date.now()}`);
+    const owner = privateKeyWrapper('//Alice');
+    const user = privateKeyWrapper(`//User/${Date.now()}`);
     const userEth = subToEth(user.address);
     const collectionId = await createCollectionExpectSuccess();
     await addCollectionAdminExpectSuccess(owner, collectionId, {Ethereum: userEth});
modifiedtests/src/eth/crossTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/eth/crossTransfer.test.ts
+++ b/tests/src/eth/crossTransfer.test.ts
@@ -32,9 +32,9 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
-    const bob = privateKeyWrapper!('//Bob');
-    const charlie = privateKeyWrapper!('//Charlie');
+    const alice = privateKeyWrapper('//Alice');
+    const bob = privateKeyWrapper('//Bob');
+    const charlie = privateKeyWrapper('//Charlie');
     await createFungibleItemExpectSuccess(alice, collection, {Value: 200n}, {Substrate: alice.address});
     await transferExpectSuccess(collection, 0, alice, {Ethereum: subToEth(charlie.address)} , 200, 'Fungible');
     await transferFromExpectSuccess(collection, 0, alice, {Ethereum: subToEth(charlie.address)}, charlie, 50, 'Fungible');
@@ -46,8 +46,8 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
-    const bob = privateKeyWrapper!('//Bob');
+    const alice = privateKeyWrapper('//Alice');
+    const bob = privateKeyWrapper('//Bob');
     const bobProxy = await createEthAccountWithBalance(api, web3);
     const aliceProxy = await createEthAccountWithBalance(api, web3);
 
@@ -68,9 +68,9 @@
       name: 'token name',
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
-    const bob = privateKeyWrapper!('//Bob');
-    const charlie = privateKeyWrapper!('//Charlie');
+    const alice = privateKeyWrapper('//Alice');
+    const bob = privateKeyWrapper('//Bob');
+    const charlie = privateKeyWrapper('//Charlie');
     const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});
     await transferExpectSuccess(collection, tokenId, alice, {Ethereum: subToEth(charlie.address)}, 1, 'NFT');
     await transferFromExpectSuccess(collection, tokenId, alice, {Ethereum: subToEth(charlie.address)}, charlie, 1, 'NFT');
@@ -82,9 +82,9 @@
       name: 'token name',
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
-    const bob = privateKeyWrapper!('//Bob');
-    const charlie = privateKeyWrapper!('//Charlie');
+    const alice = privateKeyWrapper('//Alice');
+    const bob = privateKeyWrapper('//Bob');
+    const charlie = privateKeyWrapper('//Charlie');
     const bobProxy = await createEthAccountWithBalance(api, web3);
     const aliceProxy = await createEthAccountWithBalance(api, web3);
     const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});
modifiedtests/src/eth/fungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/fungible.test.ts
+++ b/tests/src/eth/fungible.test.ts
@@ -25,7 +25,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const caller = await createEthAccountWithBalance(api, web3);
 
@@ -43,7 +43,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const caller = await createEthAccountWithBalance(api, web3);
 
@@ -63,7 +63,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
 
@@ -102,7 +102,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = createEthAccount(web3);
     await transferBalanceToEth(api, alice, owner);
@@ -160,7 +160,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = createEthAccount(web3);
     await transferBalanceToEth(api, alice, owner);
@@ -206,7 +206,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const spender = createEthAccount(web3);
@@ -224,7 +224,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const spender = await createEthAccountWithBalance(api, web3);
@@ -244,7 +244,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const receiver = createEthAccount(web3);
@@ -264,7 +264,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const receiver = createEthAccount(web3);
 
@@ -294,8 +294,8 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
-    const bob = privateKeyWrapper!('//Bob');
+    const alice = privateKeyWrapper('//Alice');
+    const bob = privateKeyWrapper('//Bob');
 
     const receiver = createEthAccount(web3);
 
@@ -335,7 +335,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const receiver = createEthAccount(web3);
 
modifiedtests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth
--- a/tests/src/eth/marketplace/marketplace.test.ts
+++ b/tests/src/eth/marketplace/marketplace.test.ts
@@ -38,7 +38,7 @@
 
 describe('Matcher contract usage', () => {
   itWeb3('With UNQ', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const matcherOwner = await createEthAccountWithBalance(api, web3);
     const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {
       from: matcherOwner,
@@ -60,7 +60,7 @@
     await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});
     await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));
 
-    const seller = privateKeyWrapper!(`//Seller/${Date.now()}`);
+    const seller = privateKeyWrapper(`//Seller/${Date.now()}`);
     await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});
 
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);
@@ -99,7 +99,7 @@
 
 
   itWeb3('With escrow', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const matcherOwner = await createEthAccountWithBalance(api, web3);
     const escrow = await createEthAccountWithBalance(api, web3);
     const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {
@@ -123,7 +123,7 @@
     await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});
     await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));
 
-    const seller = privateKeyWrapper!(`//Seller/${Date.now()}`);
+    const seller = privateKeyWrapper(`//Seller/${Date.now()}`);
     await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});
 
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);
@@ -170,7 +170,7 @@
 
 
   itWeb3('Sell tokens from substrate user via EVM contract', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const matcherOwner = await createEthAccountWithBalance(api, web3);
     const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {
       from: matcherOwner,
@@ -183,7 +183,7 @@
     await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1});
     const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner});
 
-    const seller = privateKeyWrapper!(`//Seller/${Date.now()}`);
+    const seller = privateKeyWrapper(`//Seller/${Date.now()}`);
     await transferBalanceTo(api, alice, seller.address);
     
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);
modifiedtests/src/eth/migration.test.tsdiffbeforeafterboth
--- a/tests/src/eth/migration.test.ts
+++ b/tests/src/eth/migration.test.ts
@@ -53,7 +53,7 @@
       ['0xedc95719e9a3b28dd8e80877cb5880a9be7de1a13fc8b05e7999683b6b567643', '0x0000000000000000000000000000000000000000000000000000000000000004'],
     ];
 
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
 
     await submitTransactionAsync(alice, api.tx.sudo.sudo(api.tx.evmMigration.begin(ADDRESS) as any));
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
before · tests/src/eth/nonFungible.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 {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE} from '../util/helpers';18import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, evmCollection, evmCollectionHelpers, GAS_ARGS, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth} from './util/helpers';19import nonFungibleAbi from './nonFungibleAbi.json';20import {expect} from 'chai';21import {submitTransactionAsync} from '../substrate/substrate-api';2223describe('NFT: Information getting', () => {24  itWeb3('totalSupply', async ({api, web3, privateKeyWrapper}) => {25    const collection = await createCollectionExpectSuccess({26      mode: {type: 'NFT'},27    });28    const alice = privateKeyWrapper!('//Alice');29    const caller = await createEthAccountWithBalance(api, web3);3031    await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});3233    const address = collectionIdToAddress(collection);34    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});35    const totalSupply = await contract.methods.totalSupply().call();3637    expect(totalSupply).to.equal('1');38  });3940  itWeb3('balanceOf', async ({api, web3, privateKeyWrapper}) => {41    const collection = await createCollectionExpectSuccess({42      mode: {type: 'NFT'},43    });44    const alice = privateKeyWrapper!('//Alice');4546    const caller = await createEthAccountWithBalance(api, web3);47    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum:caller});48    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});49    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});5051    const address = collectionIdToAddress(collection);52    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});53    const balance = await contract.methods.balanceOf(caller).call();5455    expect(balance).to.equal('3');56  });5758  itWeb3('ownerOf', async ({api, web3, privateKeyWrapper}) => {59    const collection = await createCollectionExpectSuccess({60      mode: {type: 'NFT'},61    });62    const alice = privateKeyWrapper!('//Alice');6364    const caller = await createEthAccountWithBalance(api, web3);65    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});6667    const address = collectionIdToAddress(collection);68    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});69    const owner = await contract.methods.ownerOf(tokenId).call();7071    expect(owner).to.equal(caller);72  });73});7475describe('NFT: Plain calls', () => {76  itWeb3('Can perform mint()', async ({web3, api}) => {77    const owner = await createEthAccountWithBalance(api, web3);78    const helper = evmCollectionHelpers(web3, owner);79    let result = await helper.methods.createNonfungibleCollection('Mint collection', '6', '6').send();80    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);81    const receiver = createEthAccount(web3);82    const contract = evmCollection(web3, owner, collectionIdAddress);83    const nextTokenId = await contract.methods.nextTokenId().call();8485    expect(nextTokenId).to.be.equal('1');86    result = await contract.methods.mintWithTokenURI(87      receiver,88      nextTokenId,89      'Test URI',90    ).send();9192    const events = normalizeEvents(result.events);93    const address = collectionIdToAddress(collectionId);9495    expect(events).to.be.deep.equal([96      {97        address,98        event: 'Transfer',99        args: {100          from: '0x0000000000000000000000000000000000000000',101          to: receiver,102          tokenId: nextTokenId,103        },104      },105    ]);106107    expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');108109    // TODO: this wont work right now, need release 919000 first110    // await helper.methods.setOffchainSchema(collectionIdAddress, 'https://offchain-service.local/token-info/{id}').send();111    // const tokenUri = await contract.methods.tokenURI(nextTokenId).call();112    // expect(tokenUri).to.be.equal(`https://offchain-service.local/token-info/${nextTokenId}`);113  });114115  //TODO: CORE-302 add eth methods116  itWeb3.skip('Can perform mintBulk()', async ({web3, api, privateKeyWrapper}) => {117    const collection = await createCollectionExpectSuccess({118      mode: {type: 'NFT'},119    });120    const alice = privateKeyWrapper!('//Alice');121122    const caller = await createEthAccountWithBalance(api, web3);123    const changeAdminTx = api.tx.unique.addCollectionAdmin(collection, {Ethereum: caller});124    await submitTransactionAsync(alice, changeAdminTx);125    const receiver = createEthAccount(web3);126127    const address = collectionIdToAddress(collection);128    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});129130    {131      const nextTokenId = await contract.methods.nextTokenId().call();132      expect(nextTokenId).to.be.equal('1');133      const result = await contract.methods.mintBulkWithTokenURI(134        receiver,135        [136          [nextTokenId, 'Test URI 0'],137          [+nextTokenId + 1, 'Test URI 1'],138          [+nextTokenId + 2, 'Test URI 2'],139        ],140      ).send({from: caller});141      const events = normalizeEvents(result.events);142143      expect(events).to.be.deep.equal([144        {145          address,146          event: 'Transfer',147          args: {148            from: '0x0000000000000000000000000000000000000000',149            to: receiver,150            tokenId: nextTokenId,151          },152        },153        {154          address,155          event: 'Transfer',156          args: {157            from: '0x0000000000000000000000000000000000000000',158            to: receiver,159            tokenId: String(+nextTokenId + 1),160          },161        },162        {163          address,164          event: 'Transfer',165          args: {166            from: '0x0000000000000000000000000000000000000000',167            to: receiver,168            tokenId: String(+nextTokenId + 2),169          },170        },171      ]);172173      expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI 0');174      expect(await contract.methods.tokenURI(+nextTokenId + 1).call()).to.be.equal('Test URI 1');175      expect(await contract.methods.tokenURI(+nextTokenId + 2).call()).to.be.equal('Test URI 2');176    }177  });178179  itWeb3('Can perform burn()', async ({web3, api, privateKeyWrapper}) => {180    const collection = await createCollectionExpectSuccess({181      mode: {type: 'NFT'},182    });183    const alice = privateKeyWrapper!('//Alice');184185    const owner = await createEthAccountWithBalance(api, web3);186187    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});188189    const address = collectionIdToAddress(collection);190    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});191192    {193      const result = await contract.methods.burn(tokenId).send({from: owner});194      const events = normalizeEvents(result.events);195196      expect(events).to.be.deep.equal([197        {198          address,199          event: 'Transfer',200          args: {201            from: owner,202            to: '0x0000000000000000000000000000000000000000',203            tokenId: tokenId.toString(),204          },205        },206      ]);207    }208  });209210  itWeb3('Can perform approve()', async ({web3, api, privateKeyWrapper}) => {211    const collection = await createCollectionExpectSuccess({212      mode: {type: 'NFT'},213    });214    const alice = privateKeyWrapper!('//Alice');215216    const owner = createEthAccount(web3);217    await transferBalanceToEth(api, alice, owner);218219    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});220221    const spender = createEthAccount(web3);222223    const address = collectionIdToAddress(collection);224    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);225226    {227      const result = await contract.methods.approve(spender, tokenId).send({from: owner, ...GAS_ARGS});228      const events = normalizeEvents(result.events);229230      expect(events).to.be.deep.equal([231        {232          address,233          event: 'Approval',234          args: {235            owner,236            approved: spender,237            tokenId: tokenId.toString(),238          },239        },240      ]);241    }242  });243244  itWeb3('Can perform transferFrom()', async ({web3, api, privateKeyWrapper}) => {245    const collection = await createCollectionExpectSuccess({246      mode: {type: 'NFT'},247    });248    const alice = privateKeyWrapper!('//Alice');249250    const owner = createEthAccount(web3);251    await transferBalanceToEth(api, alice, owner);252253    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});254255    const spender = createEthAccount(web3);256    await transferBalanceToEth(api, alice, spender);257258    const receiver = createEthAccount(web3);259260    const address = collectionIdToAddress(collection);261    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});262263    await contract.methods.approve(spender, tokenId).send({from: owner});264265    {266      const result = await contract.methods.transferFrom(owner, receiver, tokenId).send({from: spender});267      const events = normalizeEvents(result.events);268      expect(events).to.be.deep.equal([269        {270          address,271          event: 'Transfer',272          args: {273            from: owner,274            to: receiver,275            tokenId: tokenId.toString(),276          },277        },278      ]);279    }280281    {282      const balance = await contract.methods.balanceOf(receiver).call();283      expect(+balance).to.equal(1);284    }285286    {287      const balance = await contract.methods.balanceOf(owner).call();288      expect(+balance).to.equal(0);289    }290  });291292  itWeb3('Can perform transfer()', async ({web3, api, privateKeyWrapper}) => {293    const collection = await createCollectionExpectSuccess({294      mode: {type: 'NFT'},295    });296    const alice = privateKeyWrapper!('//Alice');297298    const owner = createEthAccount(web3);299    await transferBalanceToEth(api, alice, owner);300301    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});302303    const receiver = createEthAccount(web3);304    await transferBalanceToEth(api, alice, receiver);305306    const address = collectionIdToAddress(collection);307    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});308309    {310      const result = await contract.methods.transfer(receiver, tokenId).send({from: owner});311      const events = normalizeEvents(result.events);312      expect(events).to.be.deep.equal([313        {314          address,315          event: 'Transfer',316          args: {317            from: owner,318            to: receiver,319            tokenId: tokenId.toString(),320          },321        },322      ]);323    }324325    {326      const balance = await contract.methods.balanceOf(owner).call();327      expect(+balance).to.equal(0);328    }329330    {331      const balance = await contract.methods.balanceOf(receiver).call();332      expect(+balance).to.equal(1);333    }334  });335});336337describe('NFT: Fees', () => {338  itWeb3('approve() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {339    const collection = await createCollectionExpectSuccess({340      mode: {type: 'NFT'},341    });342    const alice = privateKeyWrapper!('//Alice');343344    const owner = await createEthAccountWithBalance(api, web3);345    const spender = createEthAccount(web3);346347    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});348349    const address = collectionIdToAddress(collection);350    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});351352    const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, tokenId).send({from: owner}));353    expect(cost < BigInt(0.2 * Number(UNIQUE)));354  });355356  itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {357    const collection = await createCollectionExpectSuccess({358      mode: {type: 'NFT'},359    });360    const alice = privateKeyWrapper!('//Alice');361362    const owner = await createEthAccountWithBalance(api, web3);363    const spender = await createEthAccountWithBalance(api, web3);364365    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});366367    const address = collectionIdToAddress(collection);368    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});369370    await contract.methods.approve(spender, tokenId).send({from: owner});371372    const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, tokenId).send({from: spender}));373    expect(cost < BigInt(0.2 * Number(UNIQUE)));374  });375376  itWeb3('transfer() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {377    const collection = await createCollectionExpectSuccess({378      mode: {type: 'NFT'},379    });380    const alice = privateKeyWrapper!('//Alice');381382    const owner = await createEthAccountWithBalance(api, web3);383    const receiver = createEthAccount(web3);384385    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});386387    const address = collectionIdToAddress(collection);388    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});389390    const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, tokenId).send({from: owner}));391    expect(cost < BigInt(0.2 * Number(UNIQUE)));392  });393});394395describe('NFT: Substrate calls', () => {396  itWeb3('Events emitted for mint()', async ({web3, privateKeyWrapper}) => {397    const collection = await createCollectionExpectSuccess({398      mode: {type: 'NFT'},399    });400    const alice = privateKeyWrapper!('//Alice');401402    const address = collectionIdToAddress(collection);403    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);404405    let tokenId: number;406    const events = await recordEvents(contract, async () => {407      tokenId = await createItemExpectSuccess(alice, collection, 'NFT');408    });409410    expect(events).to.be.deep.equal([411      {412        address,413        event: 'Transfer',414        args: {415          from: '0x0000000000000000000000000000000000000000',416          to: subToEth(alice.address),417          tokenId: tokenId!.toString(),418        },419      },420    ]);421  });422423  itWeb3('Events emitted for burn()', async ({web3, privateKeyWrapper}) => {424    const collection = await createCollectionExpectSuccess({425      mode: {type: 'NFT'},426    });427    const alice = privateKeyWrapper!('//Alice');428429    const address = collectionIdToAddress(collection);430    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);431432    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');433    const events = await recordEvents(contract, async () => {434      await burnItemExpectSuccess(alice, collection, tokenId);435    });436437    expect(events).to.be.deep.equal([438      {439        address,440        event: 'Transfer',441        args: {442          from: subToEth(alice.address),443          to: '0x0000000000000000000000000000000000000000',444          tokenId: tokenId.toString(),445        },446      },447    ]);448  });449450  itWeb3('Events emitted for approve()', async ({web3, privateKeyWrapper}) => {451    const collection = await createCollectionExpectSuccess({452      mode: {type: 'NFT'},453    });454    const alice = privateKeyWrapper!('//Alice');455456    const receiver = createEthAccount(web3);457458    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');459460    const address = collectionIdToAddress(collection);461    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);462463    const events = await recordEvents(contract, async () => {464      await approveExpectSuccess(collection, tokenId, alice, {Ethereum: receiver}, 1);465    });466467    expect(events).to.be.deep.equal([468      {469        address,470        event: 'Approval',471        args: {472          owner: subToEth(alice.address),473          approved: receiver,474          tokenId: tokenId.toString(),475        },476      },477    ]);478  });479480  itWeb3('Events emitted for transferFrom()', async ({web3, privateKeyWrapper}) => {481    const collection = await createCollectionExpectSuccess({482      mode: {type: 'NFT'},483    });484    const alice = privateKeyWrapper!('//Alice');485    const bob = privateKeyWrapper!('//Bob');486487    const receiver = createEthAccount(web3);488489    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');490    await approveExpectSuccess(collection, tokenId, alice, bob.address, 1);491492    const address = collectionIdToAddress(collection);493    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);494495    const events = await recordEvents(contract, async () => {496      await transferFromExpectSuccess(collection, tokenId, bob, alice, {Ethereum: receiver}, 1, 'NFT');497    });498499    expect(events).to.be.deep.equal([500      {501        address,502        event: 'Transfer',503        args: {504          from: subToEth(alice.address),505          to: receiver,506          tokenId: tokenId.toString(),507        },508      },509    ]);510  });511512  itWeb3('Events emitted for transfer()', async ({web3, privateKeyWrapper}) => {513    const collection = await createCollectionExpectSuccess({514      mode: {type: 'NFT'},515    });516    const alice = privateKeyWrapper!('//Alice');517518    const receiver = createEthAccount(web3);519520    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');521522    const address = collectionIdToAddress(collection);523    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);524525    const events = await recordEvents(contract, async () => {526      await transferExpectSuccess(collection, tokenId, alice, {Ethereum: receiver}, 1, 'NFT');527    });528529    expect(events).to.be.deep.equal([530      {531        address,532        event: 'Transfer',533        args: {534          from: subToEth(alice.address),535          to: receiver,536          tokenId: tokenId.toString(),537        },538      },539    ]);540  });541});542543describe('Common metadata', () => {544  itWeb3('Returns collection name', async ({api, web3}) => {545    const collection = await createCollectionExpectSuccess({546      name: 'token name',547      mode: {type: 'NFT'},548    });549    const caller = await createEthAccountWithBalance(api, web3);550551    const address = collectionIdToAddress(collection);552    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});553    const name = await contract.methods.name().call();554555    expect(name).to.equal('token name');556  });557558  itWeb3('Returns symbol name', async ({api, web3}) => {559    const collection = await createCollectionExpectSuccess({560      tokenPrefix: 'TOK',561      mode: {type: 'NFT'},562    });563    const caller = await createEthAccountWithBalance(api, web3);564565    const address = collectionIdToAddress(collection);566    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});567    const symbol = await contract.methods.symbol().call();568569    expect(symbol).to.equal('TOK');570  });571});
after · tests/src/eth/nonFungible.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 {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE} from '../util/helpers';18import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, evmCollection, evmCollectionHelpers, GAS_ARGS, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth} from './util/helpers';19import nonFungibleAbi from './nonFungibleAbi.json';20import {expect} from 'chai';21import {submitTransactionAsync} from '../substrate/substrate-api';2223describe('NFT: Information getting', () => {24  itWeb3('totalSupply', async ({api, web3, privateKeyWrapper}) => {25    const collection = await createCollectionExpectSuccess({26      mode: {type: 'NFT'},27    });28    const alice = privateKeyWrapper('//Alice');29    const caller = await createEthAccountWithBalance(api, web3);3031    await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});3233    const address = collectionIdToAddress(collection);34    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});35    const totalSupply = await contract.methods.totalSupply().call();3637    expect(totalSupply).to.equal('1');38  });3940  itWeb3('balanceOf', async ({api, web3, privateKeyWrapper}) => {41    const collection = await createCollectionExpectSuccess({42      mode: {type: 'NFT'},43    });44    const alice = privateKeyWrapper('//Alice');4546    const caller = await createEthAccountWithBalance(api, web3);47    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum:caller});48    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});49    await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});5051    const address = collectionIdToAddress(collection);52    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});53    const balance = await contract.methods.balanceOf(caller).call();5455    expect(balance).to.equal('3');56  });5758  itWeb3('ownerOf', async ({api, web3, privateKeyWrapper}) => {59    const collection = await createCollectionExpectSuccess({60      mode: {type: 'NFT'},61    });62    const alice = privateKeyWrapper('//Alice');6364    const caller = await createEthAccountWithBalance(api, web3);65    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});6667    const address = collectionIdToAddress(collection);68    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});69    const owner = await contract.methods.ownerOf(tokenId).call();7071    expect(owner).to.equal(caller);72  });73});7475describe('NFT: Plain calls', () => {76  itWeb3('Can perform mint()', async ({web3, api}) => {77    const owner = await createEthAccountWithBalance(api, web3);78    const helper = evmCollectionHelpers(web3, owner);79    let result = await helper.methods.createNonfungibleCollection('Mint collection', '6', '6').send();80    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);81    const receiver = createEthAccount(web3);82    const contract = evmCollection(web3, owner, collectionIdAddress);83    const nextTokenId = await contract.methods.nextTokenId().call();8485    expect(nextTokenId).to.be.equal('1');86    result = await contract.methods.mintWithTokenURI(87      receiver,88      nextTokenId,89      'Test URI',90    ).send();9192    const events = normalizeEvents(result.events);93    const address = collectionIdToAddress(collectionId);9495    expect(events).to.be.deep.equal([96      {97        address,98        event: 'Transfer',99        args: {100          from: '0x0000000000000000000000000000000000000000',101          to: receiver,102          tokenId: nextTokenId,103        },104      },105    ]);106107    expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');108109    // TODO: this wont work right now, need release 919000 first110    // await helper.methods.setOffchainSchema(collectionIdAddress, 'https://offchain-service.local/token-info/{id}').send();111    // const tokenUri = await contract.methods.tokenURI(nextTokenId).call();112    // expect(tokenUri).to.be.equal(`https://offchain-service.local/token-info/${nextTokenId}`);113  });114115  //TODO: CORE-302 add eth methods116  itWeb3.skip('Can perform mintBulk()', async ({web3, api, privateKeyWrapper}) => {117    const collection = await createCollectionExpectSuccess({118      mode: {type: 'NFT'},119    });120    const alice = privateKeyWrapper('//Alice');121122    const caller = await createEthAccountWithBalance(api, web3);123    const changeAdminTx = api.tx.unique.addCollectionAdmin(collection, {Ethereum: caller});124    await submitTransactionAsync(alice, changeAdminTx);125    const receiver = createEthAccount(web3);126127    const address = collectionIdToAddress(collection);128    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});129130    {131      const nextTokenId = await contract.methods.nextTokenId().call();132      expect(nextTokenId).to.be.equal('1');133      const result = await contract.methods.mintBulkWithTokenURI(134        receiver,135        [136          [nextTokenId, 'Test URI 0'],137          [+nextTokenId + 1, 'Test URI 1'],138          [+nextTokenId + 2, 'Test URI 2'],139        ],140      ).send({from: caller});141      const events = normalizeEvents(result.events);142143      expect(events).to.be.deep.equal([144        {145          address,146          event: 'Transfer',147          args: {148            from: '0x0000000000000000000000000000000000000000',149            to: receiver,150            tokenId: nextTokenId,151          },152        },153        {154          address,155          event: 'Transfer',156          args: {157            from: '0x0000000000000000000000000000000000000000',158            to: receiver,159            tokenId: String(+nextTokenId + 1),160          },161        },162        {163          address,164          event: 'Transfer',165          args: {166            from: '0x0000000000000000000000000000000000000000',167            to: receiver,168            tokenId: String(+nextTokenId + 2),169          },170        },171      ]);172173      expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI 0');174      expect(await contract.methods.tokenURI(+nextTokenId + 1).call()).to.be.equal('Test URI 1');175      expect(await contract.methods.tokenURI(+nextTokenId + 2).call()).to.be.equal('Test URI 2');176    }177  });178179  itWeb3('Can perform burn()', async ({web3, api, privateKeyWrapper}) => {180    const collection = await createCollectionExpectSuccess({181      mode: {type: 'NFT'},182    });183    const alice = privateKeyWrapper('//Alice');184185    const owner = await createEthAccountWithBalance(api, web3);186187    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});188189    const address = collectionIdToAddress(collection);190    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});191192    {193      const result = await contract.methods.burn(tokenId).send({from: owner});194      const events = normalizeEvents(result.events);195196      expect(events).to.be.deep.equal([197        {198          address,199          event: 'Transfer',200          args: {201            from: owner,202            to: '0x0000000000000000000000000000000000000000',203            tokenId: tokenId.toString(),204          },205        },206      ]);207    }208  });209210  itWeb3('Can perform approve()', async ({web3, api, privateKeyWrapper}) => {211    const collection = await createCollectionExpectSuccess({212      mode: {type: 'NFT'},213    });214    const alice = privateKeyWrapper('//Alice');215216    const owner = createEthAccount(web3);217    await transferBalanceToEth(api, alice, owner);218219    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});220221    const spender = createEthAccount(web3);222223    const address = collectionIdToAddress(collection);224    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);225226    {227      const result = await contract.methods.approve(spender, tokenId).send({from: owner, ...GAS_ARGS});228      const events = normalizeEvents(result.events);229230      expect(events).to.be.deep.equal([231        {232          address,233          event: 'Approval',234          args: {235            owner,236            approved: spender,237            tokenId: tokenId.toString(),238          },239        },240      ]);241    }242  });243244  itWeb3('Can perform transferFrom()', async ({web3, api, privateKeyWrapper}) => {245    const collection = await createCollectionExpectSuccess({246      mode: {type: 'NFT'},247    });248    const alice = privateKeyWrapper('//Alice');249250    const owner = createEthAccount(web3);251    await transferBalanceToEth(api, alice, owner);252253    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});254255    const spender = createEthAccount(web3);256    await transferBalanceToEth(api, alice, spender);257258    const receiver = createEthAccount(web3);259260    const address = collectionIdToAddress(collection);261    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});262263    await contract.methods.approve(spender, tokenId).send({from: owner});264265    {266      const result = await contract.methods.transferFrom(owner, receiver, tokenId).send({from: spender});267      const events = normalizeEvents(result.events);268      expect(events).to.be.deep.equal([269        {270          address,271          event: 'Transfer',272          args: {273            from: owner,274            to: receiver,275            tokenId: tokenId.toString(),276          },277        },278      ]);279    }280281    {282      const balance = await contract.methods.balanceOf(receiver).call();283      expect(+balance).to.equal(1);284    }285286    {287      const balance = await contract.methods.balanceOf(owner).call();288      expect(+balance).to.equal(0);289    }290  });291292  itWeb3('Can perform transfer()', async ({web3, api, privateKeyWrapper}) => {293    const collection = await createCollectionExpectSuccess({294      mode: {type: 'NFT'},295    });296    const alice = privateKeyWrapper('//Alice');297298    const owner = createEthAccount(web3);299    await transferBalanceToEth(api, alice, owner);300301    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});302303    const receiver = createEthAccount(web3);304    await transferBalanceToEth(api, alice, receiver);305306    const address = collectionIdToAddress(collection);307    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});308309    {310      const result = await contract.methods.transfer(receiver, tokenId).send({from: owner});311      const events = normalizeEvents(result.events);312      expect(events).to.be.deep.equal([313        {314          address,315          event: 'Transfer',316          args: {317            from: owner,318            to: receiver,319            tokenId: tokenId.toString(),320          },321        },322      ]);323    }324325    {326      const balance = await contract.methods.balanceOf(owner).call();327      expect(+balance).to.equal(0);328    }329330    {331      const balance = await contract.methods.balanceOf(receiver).call();332      expect(+balance).to.equal(1);333    }334  });335});336337describe('NFT: Fees', () => {338  itWeb3('approve() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {339    const collection = await createCollectionExpectSuccess({340      mode: {type: 'NFT'},341    });342    const alice = privateKeyWrapper('//Alice');343344    const owner = await createEthAccountWithBalance(api, web3);345    const spender = createEthAccount(web3);346347    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});348349    const address = collectionIdToAddress(collection);350    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});351352    const cost = await recordEthFee(api, owner, () => contract.methods.approve(spender, tokenId).send({from: owner}));353    expect(cost < BigInt(0.2 * Number(UNIQUE)));354  });355356  itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {357    const collection = await createCollectionExpectSuccess({358      mode: {type: 'NFT'},359    });360    const alice = privateKeyWrapper('//Alice');361362    const owner = await createEthAccountWithBalance(api, web3);363    const spender = await createEthAccountWithBalance(api, web3);364365    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});366367    const address = collectionIdToAddress(collection);368    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});369370    await contract.methods.approve(spender, tokenId).send({from: owner});371372    const cost = await recordEthFee(api, spender, () => contract.methods.transferFrom(owner, spender, tokenId).send({from: spender}));373    expect(cost < BigInt(0.2 * Number(UNIQUE)));374  });375376  itWeb3('transfer() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {377    const collection = await createCollectionExpectSuccess({378      mode: {type: 'NFT'},379    });380    const alice = privateKeyWrapper('//Alice');381382    const owner = await createEthAccountWithBalance(api, web3);383    const receiver = createEthAccount(web3);384385    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});386387    const address = collectionIdToAddress(collection);388    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});389390    const cost = await recordEthFee(api, owner, () => contract.methods.transfer(receiver, tokenId).send({from: owner}));391    expect(cost < BigInt(0.2 * Number(UNIQUE)));392  });393});394395describe('NFT: Substrate calls', () => {396  itWeb3('Events emitted for mint()', async ({web3, privateKeyWrapper}) => {397    const collection = await createCollectionExpectSuccess({398      mode: {type: 'NFT'},399    });400    const alice = privateKeyWrapper('//Alice');401402    const address = collectionIdToAddress(collection);403    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);404405    let tokenId: number;406    const events = await recordEvents(contract, async () => {407      tokenId = await createItemExpectSuccess(alice, collection, 'NFT');408    });409410    expect(events).to.be.deep.equal([411      {412        address,413        event: 'Transfer',414        args: {415          from: '0x0000000000000000000000000000000000000000',416          to: subToEth(alice.address),417          tokenId: tokenId!.toString(),418        },419      },420    ]);421  });422423  itWeb3('Events emitted for burn()', async ({web3, privateKeyWrapper}) => {424    const collection = await createCollectionExpectSuccess({425      mode: {type: 'NFT'},426    });427    const alice = privateKeyWrapper('//Alice');428429    const address = collectionIdToAddress(collection);430    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);431432    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');433    const events = await recordEvents(contract, async () => {434      await burnItemExpectSuccess(alice, collection, tokenId);435    });436437    expect(events).to.be.deep.equal([438      {439        address,440        event: 'Transfer',441        args: {442          from: subToEth(alice.address),443          to: '0x0000000000000000000000000000000000000000',444          tokenId: tokenId.toString(),445        },446      },447    ]);448  });449450  itWeb3('Events emitted for approve()', async ({web3, privateKeyWrapper}) => {451    const collection = await createCollectionExpectSuccess({452      mode: {type: 'NFT'},453    });454    const alice = privateKeyWrapper('//Alice');455456    const receiver = createEthAccount(web3);457458    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');459460    const address = collectionIdToAddress(collection);461    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);462463    const events = await recordEvents(contract, async () => {464      await approveExpectSuccess(collection, tokenId, alice, {Ethereum: receiver}, 1);465    });466467    expect(events).to.be.deep.equal([468      {469        address,470        event: 'Approval',471        args: {472          owner: subToEth(alice.address),473          approved: receiver,474          tokenId: tokenId.toString(),475        },476      },477    ]);478  });479480  itWeb3('Events emitted for transferFrom()', async ({web3, privateKeyWrapper}) => {481    const collection = await createCollectionExpectSuccess({482      mode: {type: 'NFT'},483    });484    const alice = privateKeyWrapper('//Alice');485    const bob = privateKeyWrapper('//Bob');486487    const receiver = createEthAccount(web3);488489    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');490    await approveExpectSuccess(collection, tokenId, alice, bob.address, 1);491492    const address = collectionIdToAddress(collection);493    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);494495    const events = await recordEvents(contract, async () => {496      await transferFromExpectSuccess(collection, tokenId, bob, alice, {Ethereum: receiver}, 1, 'NFT');497    });498499    expect(events).to.be.deep.equal([500      {501        address,502        event: 'Transfer',503        args: {504          from: subToEth(alice.address),505          to: receiver,506          tokenId: tokenId.toString(),507        },508      },509    ]);510  });511512  itWeb3('Events emitted for transfer()', async ({web3, privateKeyWrapper}) => {513    const collection = await createCollectionExpectSuccess({514      mode: {type: 'NFT'},515    });516    const alice = privateKeyWrapper('//Alice');517518    const receiver = createEthAccount(web3);519520    const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');521522    const address = collectionIdToAddress(collection);523    const contract = new web3.eth.Contract(nonFungibleAbi as any, address);524525    const events = await recordEvents(contract, async () => {526      await transferExpectSuccess(collection, tokenId, alice, {Ethereum: receiver}, 1, 'NFT');527    });528529    expect(events).to.be.deep.equal([530      {531        address,532        event: 'Transfer',533        args: {534          from: subToEth(alice.address),535          to: receiver,536          tokenId: tokenId.toString(),537        },538      },539    ]);540  });541});542543describe('Common metadata', () => {544  itWeb3('Returns collection name', async ({api, web3}) => {545    const collection = await createCollectionExpectSuccess({546      name: 'token name',547      mode: {type: 'NFT'},548    });549    const caller = await createEthAccountWithBalance(api, web3);550551    const address = collectionIdToAddress(collection);552    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});553    const name = await contract.methods.name().call();554555    expect(name).to.equal('token name');556  });557558  itWeb3('Returns symbol name', async ({api, web3}) => {559    const collection = await createCollectionExpectSuccess({560      tokenPrefix: 'TOK',561      mode: {type: 'NFT'},562    });563    const caller = await createEthAccountWithBalance(api, web3);564565    const address = collectionIdToAddress(collection);566    const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});567    const symbol = await contract.methods.symbol().call();568569    expect(symbol).to.equal('TOK');570  });571});
modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
--- a/tests/src/eth/payable.test.ts
+++ b/tests/src/eth/payable.test.ts
@@ -34,7 +34,7 @@
   itWeb3('Evm contract can receive wei from substrate account', async ({api, web3, privateKeyWrapper}) => {
     const deployer = await createEthAccountWithBalance(api, web3);
     const contract = await deployCollector(web3, deployer);
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     // Transaction fee/value will be payed from subToEth(sender) evm balance,
     // which is backed by evmToAddress(subToEth(sender)) substrate balance
@@ -64,7 +64,7 @@
   itWeb3('Wei sent directly to backing storage of evm contract balance is unaccounted', async({api, web3, privateKeyWrapper}) => {
     const deployer = await createEthAccountWithBalance(api, web3);
     const contract = await deployCollector(web3, deployer);
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     await transferBalanceExpectSuccess(api, alice, evmToAddress(contract.options.address), '10000');
 
@@ -77,11 +77,11 @@
 
     const deployer = await createEthAccountWithBalance(api, web3);
     const contract = await deployCollector(web3, deployer);
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     await web3.eth.sendTransaction({from: deployer, to: contract.options.address, value: CONTRACT_BALANCE.toString(), ...GAS_ARGS});
 
-    const receiver = privateKeyWrapper!(`//Receiver${Date.now()}`);
+    const receiver = privateKeyWrapper(`//Receiver${Date.now()}`);
 
     // First receive balance on eth balance of bob
     {
modifiedtests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/fungibleProxy.test.ts
+++ b/tests/src/eth/proxy/fungibleProxy.test.ts
@@ -39,7 +39,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
 
     await createFungibleItemExpectSuccess(alice, collection, {Value: 200n}, {Substrate: alice.address});
@@ -56,7 +56,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
 
     await createFungibleItemExpectSuccess(alice, collection, {Value: 200n}, {Ethereum: caller});
@@ -75,7 +75,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const spender = createEthAccount(web3);
 
@@ -111,7 +111,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const owner = await createEthAccountWithBalance(api, web3);
 
@@ -166,7 +166,7 @@
       name: 'token name',
       mode: {type: 'Fungible', decimalPoints: 0},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const receiver = await createEthAccountWithBalance(api, web3);
 
modifiedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -39,7 +39,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
 
     await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});
@@ -55,7 +55,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const caller = await createEthAccountWithBalance(api, web3);
     await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});
@@ -73,7 +73,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const caller = await createEthAccountWithBalance(api, web3);
     const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: caller});
@@ -92,7 +92,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const receiver = createEthAccount(web3);
 
@@ -133,7 +133,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const caller = await createEthAccountWithBalance(api, web3);
     const receiver = createEthAccount(web3);
@@ -196,7 +196,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
 
     const address = collectionIdToAddress(collection);
@@ -228,7 +228,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const spender = createEthAccount(web3);
 
@@ -258,7 +258,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const owner = await createEthAccountWithBalance(api, web3);
 
@@ -302,7 +302,7 @@
     const collection = await createCollectionExpectSuccess({
       mode: {type: 'NFT'},
     });
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const receiver = createEthAccount(web3);
 
modifiedtests/src/eth/sponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/sponsoring.test.ts
+++ b/tests/src/eth/sponsoring.test.ts
@@ -19,7 +19,7 @@
 
 describe('EVM sponsoring', () => {
   itWeb3('Fee is deducted from contract if sponsoring is enabled', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = createEthAccount(web3);
@@ -50,7 +50,7 @@
     expect(await web3.eth.getBalance(flipper.options.address)).to.be.not.equals(originalFlipperBalance);
   });
   itWeb3('...but this doesn\'t applies to payable value', async ({api, web3, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
     const caller = await createEthAccountWithBalance(api, web3);
modifiedtests/src/eth/tokenProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/tokenProperties.test.ts
+++ b/tests/src/eth/tokenProperties.test.ts
@@ -6,7 +6,7 @@
 
 describe('EVM token properties', () => {
   itWeb3('Can be reconfigured', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
@@ -24,7 +24,7 @@
     }
   });
   itWeb3('Can be set', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     const token = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -47,7 +47,7 @@
     expect(value).to.equal('testValue');
   });
   itWeb3('Can be deleted', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = await createEthAccountWithBalance(api, web3);
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
     const token = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -72,7 +72,7 @@
     expect(result.length).to.equal(0);
   });
   itWeb3('Can be read', async({web3, api, privateKeyWrapper}) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const caller = createEthAccount(web3);
     const collection = await createCollectionExpectSuccess({mode: {type:'NFT'}});
     const token = await createItemExpectSuccess(alice, collection, 'NFT');
modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -127,7 +127,7 @@
   expect(result.success).to.be.true;
 }
 
-export async function itWeb3(name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper?: (account: string) => IKeyringPair }) => any, opts: { only?: boolean, skip?: boolean } = {}) {
+export async function itWeb3(name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any, opts: { only?: boolean, skip?: boolean } = {}) {
   let i: any = it;
   if (opts.only) i = i.only;
   else if (opts.skip) i = i.skip;
@@ -139,8 +139,8 @@
     });
   });
 }
-itWeb3.only = (name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper?: (account: string) => IKeyringPair }) => any) => itWeb3(name, cb, {only: true});
-itWeb3.skip = (name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper?: (account: string) => IKeyringPair }) => any) => itWeb3(name, cb, {skip: true});
+itWeb3.only = (name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itWeb3(name, cb, {only: true});
+itWeb3.skip = (name: string, cb: (apis: { web3: Web3, api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itWeb3(name, cb, {skip: true});
 
 export async function generateSubstrateEthPair(web3: Web3) {
   const account = web3.eth.accounts.create();
modifiedtests/src/inflation.test.tsdiffbeforeafterboth
--- a/tests/src/inflation.test.ts
+++ b/tests/src/inflation.test.ts
@@ -27,11 +27,11 @@
 
       // Make sure non-sudo can't start inflation
       const tx = api.tx.inflation.startInflation(1);
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;
 
       // Start inflation on relay block 1 (Alice is sudo)
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const sudoTx = api.tx.sudo.sudo(tx as any);
       await submitTransactionAsync(alice, sudoTx);
 
modifiedtests/src/limits.test.tsdiffbeforeafterboth
--- a/tests/src/limits.test.ts
+++ b/tests/src/limits.test.ts
@@ -35,7 +35,7 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
 
@@ -69,7 +69,7 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
 
@@ -103,9 +103,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -166,9 +166,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -233,9 +233,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -296,9 +296,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -337,9 +337,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -369,9 +369,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/mintModes.test.tsdiffbeforeafterboth
--- a/tests/src/mintModes.test.ts
+++ b/tests/src/mintModes.test.ts
@@ -33,8 +33,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -112,8 +112,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/nesting/graphs.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/graphs.test.ts
+++ b/tests/src/nesting/graphs.test.ts
@@ -34,7 +34,7 @@
 describe('Graphs', () => {
   it('Ouroboros can\'t be created in a complex graph', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const collection = await buildComplexObjectGraph(api, alice);
 
       // to self
modifiedtests/src/nesting/migration-check.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/migration-check.test.ts
+++ b/tests/src/nesting/migration-check.test.ts
@@ -13,7 +13,7 @@
 
   before(async() => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
 
modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/nest.test.ts
+++ b/tests/src/nesting/nest.test.ts
@@ -23,8 +23,8 @@
 describe('Integration Test: Nesting', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -226,8 +226,8 @@
 describe('Negative Test: Nesting', async() => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/nesting/properties.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/properties.test.ts
+++ b/tests/src/nesting/properties.test.ts
@@ -16,8 +16,8 @@
 describe('Composite Properties Test', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -63,8 +63,8 @@
 describe('Integration Test: Collection Properties', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -158,8 +158,8 @@
 describe('Negative Integration Test: Collection Properties', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
   
@@ -290,8 +290,8 @@
 describe('Integration Test: Access Rights to Token Properties', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
   
@@ -356,8 +356,8 @@
 describe('Negative Integration Test: Access Rights to Token Properties', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -474,9 +474,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
 
       permissions = [
         {permission: {mutable: true, collectionAdmin: true}, signers: [alice, bob]},
@@ -639,10 +639,10 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
-      const dave = privateKeyWrapper!('//Dave');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
+      const dave = privateKeyWrapper('//Dave');
 
       constitution = [
         {permission: {mutable: true, collectionAdmin: true}, signers: [alice, bob], sinner: charlie},
modifiedtests/src/nesting/rules-smoke.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/rules-smoke.test.ts
+++ b/tests/src/nesting/rules-smoke.test.ts
@@ -9,8 +9,8 @@
   let nestTarget!: CrossAccountId;
   before(async() => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       const events = await executeTransaction(api, alice, api.tx.unique.createCollectionEx({
         mode: 'NFT',
         permissions: {
modifiedtests/src/nesting/unnest.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/unnest.test.ts
+++ b/tests/src/nesting/unnest.test.ts
@@ -19,8 +19,8 @@
 describe('Integration Test: Unnesting', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -110,8 +110,8 @@
 describe('Negative Test: Unnesting', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/nextSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/nextSponsoring.test.ts
+++ b/tests/src/nextSponsoring.test.ts
@@ -40,8 +40,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/overflow.test.tsdiffbeforeafterboth
--- a/tests/src/overflow.test.ts
+++ b/tests/src/overflow.test.ts
@@ -30,9 +30,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/removeCollectionAdmin.test.ts
+++ b/tests/src/removeCollectionAdmin.test.ts
@@ -26,8 +26,8 @@
   it('Remove collection admin.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.deep.eq(alice.address);
       // first - add collection admin Bob
@@ -49,9 +49,9 @@
   it('Remove collection admin by admin.', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
       const collection = await queryCollectionExpectSuccess(api, collectionId);
       expect(collection.owner.toString()).to.be.eq(alice.address);
       // first - add collection admin Bob
@@ -75,7 +75,7 @@
 
   it('Remove admin from collection that has no admins', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
+      const alice = privateKeyWrapper('//Alice');
       const collectionId = await createCollectionExpectSuccess();
 
       const adminListBeforeAddAdmin = await getAdminList(api, collectionId);
@@ -92,8 +92,8 @@
     await usingApi(async (api, privateKeyWrapper) => {
       // tslint:disable-next-line: no-bitwise
       const collectionId = (1 << 32) - 1;
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       const changeOwnerTx = api.tx.unique.removeCollectionAdmin(collectionId, normalizeAccountId(bob.address));
       await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
@@ -107,8 +107,8 @@
     await usingApi(async (api, privateKeyWrapper) => {
       // tslint:disable-next-line: no-bitwise
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
 
       await destroyCollectionExpectSuccess(collectionId);
 
@@ -123,9 +123,9 @@
   it('Regular user Can\'t remove collection admin', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
       const collectionId = await createCollectionExpectSuccess();
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       const addAdminTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));
       await submitTransactionAsync(alice, addAdminTx);
modifiedtests/src/removeFromAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromAllowList.test.ts
+++ b/tests/src/removeFromAllowList.test.ts
@@ -41,8 +41,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -75,8 +75,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -107,9 +107,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
modifiedtests/src/removeFromContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromContractAllowList.test.ts
+++ b/tests/src/removeFromContractAllowList.test.ts
@@ -25,7 +25,7 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      bob = privateKeyWrapper!('//Bob');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -70,8 +70,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/rpc.load.tsdiffbeforeafterboth
--- a/tests/src/rpc.load.ts
+++ b/tests/src/rpc.load.ts
@@ -126,7 +126,7 @@
       const [contract, deployer] = await deployLoadTester(api);
 
       // Fill smart contract up with data
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const tx = contract.tx.bloat(value, gasLimit, 200);
       await submitTransactionAsync(bob, tx);
 
modifiedtests/src/scheduler.test.tsdiffbeforeafterboth
--- a/tests/src/scheduler.test.ts
+++ b/tests/src/scheduler.test.ts
@@ -30,8 +30,8 @@
 describe.skip('Integration Test scheduler base transaction', () => {
   it('User can transfer owned token with delay (scheduler)', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
modifiedtests/src/setChainLimits.test.tsdiffbeforeafterboth
--- a/tests/src/setChainLimits.test.ts
+++ b/tests/src/setChainLimits.test.ts
@@ -31,9 +31,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      dave = privateKeyWrapper!('//Dave');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      dave = privateKeyWrapper('//Dave');
       limits = {
         collectionNumbersLimit : 1,
         accountTokenOwnershipLimit: 1,
modifiedtests/src/setContractSponsoringRateLimit.test.tsdiffbeforeafterboth
--- a/tests/src/setContractSponsoringRateLimit.test.ts
+++ b/tests/src/setContractSponsoringRateLimit.test.ts
@@ -57,7 +57,7 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
   });
 
modifiedtests/src/setMintPermission.test.tsdiffbeforeafterboth
--- a/tests/src/setMintPermission.test.ts
+++ b/tests/src/setMintPermission.test.ts
@@ -35,8 +35,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -75,8 +75,8 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
modifiedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth
--- a/tests/src/setPublicAccessMode.test.ts
+++ b/tests/src/setPublicAccessMode.test.ts
@@ -41,8 +41,8 @@
 describe('Integration Test setPublicAccessMode(): ', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -108,8 +108,8 @@
 describe('Negative Integration Test ext. collection admin setPublicAccessMode(): ', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
   it('setPublicAccessMode by collection admin', async () => {
modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -59,7 +59,7 @@
   };
 }
 
-export default async function usingApi<T = void>(action: (api: ApiPromise, privateKeyWrapper?: (account: string) => IKeyringPair) => Promise<T>, settings: ApiOptions | undefined = undefined): Promise<T> {
+export default async function usingApi<T = void>(action: (api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair) => Promise<T>, settings: ApiOptions | undefined = undefined): Promise<T> {
   settings = settings || defaultApiOptions();
   const api: ApiPromise = new ApiPromise(settings);
   let result: T = null as unknown as T;
modifiedtests/src/toggleContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/toggleContractAllowList.test.ts
+++ b/tests/src/toggleContractAllowList.test.ts
@@ -50,7 +50,7 @@
 
   it('Only allowlisted account can call contract', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
 
       const [contract, deployer] = await deployFlipper(api);
 
@@ -135,8 +135,8 @@
 
   it('Enable allow list for a non-contract', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bobGuineaPig = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bobGuineaPig = privateKeyWrapper('//Bob');
 
       const enabledBefore = (await api.query.unique.contractAllowListEnabled(bobGuineaPig.address)).toJSON();
       const enableAllowListTx = api.tx.unique.toggleContractAllowList(bobGuineaPig.address, true);
@@ -150,7 +150,7 @@
 
   it('Enable allow list using a non-owner address', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const bob = privateKeyWrapper!('//Bob');
+      const bob = privateKeyWrapper('//Bob');
       const [contract] = await deployFlipper(api);
 
       const enabledBefore = (await api.query.unique.contractAllowListEnabled(contract.address)).toJSON();
modifiedtests/src/transfer.nload.tsdiffbeforeafterboth
--- a/tests/src/transfer.nload.ts
+++ b/tests/src/transfer.nload.ts
@@ -95,10 +95,10 @@
   const waiting: Promise<void>[] = [];
   console.log(`Starting ${os.cpus().length} workers`);
   usingApi(async (api, privateKeyWrapper) => {
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     for (const id in os.cpus()) {
       const WORKER_NAME = `//LoadWorker${id}_${Date.now()}`;
-      const workerAccount = privateKeyWrapper!(WORKER_NAME);
+      const workerAccount = privateKeyWrapper(WORKER_NAME);
       const tx = api.tx.balances.transfer(workerAccount.address, 400n * 10n ** 23n);
       await submitTransactionAsync(alice, tx);
 
@@ -119,7 +119,7 @@
 } else {
   increaseCounter('startedWorkers', 1);
   usingApi(async (api, privateKeyWrapper) => {
-    await distributeBalance(privateKeyWrapper!(process.env.WORKER_NAME as string), api, 400n * 10n ** 22n, 10);
+    await distributeBalance(privateKeyWrapper(process.env.WORKER_NAME as string), api, 400n * 10n ** 22n, 10);
   });
   const interval = setInterval(() => {
     flushCounterToMaster();
modifiedtests/src/transfer.test.tsdiffbeforeafterboth
--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -51,7 +51,7 @@
     await usingApi(async (api, privateKeyWrapper) => {
       const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
 
-      const alicePrivateKey = privateKeyWrapper!('//Alice');
+      const alicePrivateKey = privateKeyWrapper('//Alice');
 
       const transfer = api.tx.balances.transfer(bobsPublicKey, 1n);
       const events = await submitTransactionAsync(alicePrivateKey, transfer);
@@ -87,8 +87,8 @@
 
   it('User can transfer owned token', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
@@ -114,8 +114,8 @@
 
   it('Collection admin can transfer owned token', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
@@ -145,9 +145,9 @@
 describe('Negative Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
   it('Transfer with not existed collection_id', async () => {
@@ -258,8 +258,8 @@
 describe('Zero value transfer(From)', () => {
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
     });
   });
 
@@ -316,7 +316,7 @@
 describe('Transfers to self (potentially over substrate-evm boundary)', () => {
   itWeb3('Transfers to self. In case of same frontend', async ({api, privateKeyWrapper}) => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const aliceProxy = subToEth(alice.address);
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});
     await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, 10, 'Fungible');
@@ -328,7 +328,7 @@
 
   itWeb3('Transfers to self. In case of substrate-evm boundary', async ({api, privateKeyWrapper}) => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const aliceProxy = subToEth(alice.address);
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});
     const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);
@@ -340,7 +340,7 @@
 
   itWeb3('Transfers to self. In case of inside substrate-evm', async ({api, privateKeyWrapper}) => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});
     const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);
     await transferExpectSuccess(collectionId, tokenId, alice, alice , 10, 'Fungible');
@@ -351,7 +351,7 @@
 
   itWeb3('Transfers to self. In case of inside substrate-evm when not enought "Fungibles"', async ({api, privateKeyWrapper}) => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
-    const alice = privateKeyWrapper!('//Alice');
+    const alice = privateKeyWrapper('//Alice');
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});
     const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);
     await transferExpectFailure(collectionId, tokenId, alice, alice , 11);
modifiedtests/src/transferFrom.test.tsdiffbeforeafterboth
--- a/tests/src/transferFrom.test.ts
+++ b/tests/src/transferFrom.test.ts
@@ -43,9 +43,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -83,9 +83,9 @@
 
   it('Should reduce allowance if value is big', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const alice = privateKeyWrapper!('//Alice');
-      const bob = privateKeyWrapper!('//Bob');
-      const charlie = privateKeyWrapper!('//Charlie');
+      const alice = privateKeyWrapper('//Alice');
+      const bob = privateKeyWrapper('//Bob');
+      const charlie = privateKeyWrapper('//Charlie');
 
       // fungible
       const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
@@ -112,9 +112,9 @@
 
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
-      bob = privateKeyWrapper!('//Bob');
-      charlie = privateKeyWrapper!('//Charlie');
+      alice = privateKeyWrapper('//Alice');
+      bob = privateKeyWrapper('//Bob');
+      charlie = privateKeyWrapper('//Charlie');
     });
   });
 
@@ -216,7 +216,7 @@
 
   it('execute transferFrom from account that is not owner of collection', async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      const dave = privateKeyWrapper!('//Dave');
+      const dave = privateKeyWrapper('//Dave');
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -329,7 +329,7 @@
     const collectionCountBefore = await getCreatedCollectionCount(api);
 
     // Run the CreateCollection transaction
-    const alicePrivateKey = privateKeyWrapper!('//Alice');
+    const alicePrivateKey = privateKeyWrapper('//Alice');
 
     let modeprm = {};
     if (mode.type === 'NFT') {
@@ -382,7 +382,7 @@
     const collectionCountBefore = await getCreatedCollectionCount(api);
 
     // Run the CreateCollection transaction
-    const alicePrivateKey = privateKeyWrapper!('//Alice');
+    const alicePrivateKey = privateKeyWrapper('//Alice');
 
     let modeprm = {};
     if (mode.type === 'NFT') {
@@ -430,7 +430,7 @@
     const collectionCountBefore = await getCreatedCollectionCount(api);
 
     // Run the CreateCollection transaction
-    const alicePrivateKey = privateKeyWrapper!('//Alice');
+    const alicePrivateKey = privateKeyWrapper('//Alice');
 
     let modeprm = {};
     if (mode.type === 'NFT') {
@@ -469,7 +469,7 @@
     const collectionCountBefore = await getCreatedCollectionCount(api);
 
     // Run the CreateCollection transaction
-    const alicePrivateKey = privateKeyWrapper!('//Alice');
+    const alicePrivateKey = privateKeyWrapper('//Alice');
     const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
     await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
 
@@ -520,7 +520,7 @@
 export async function destroyCollectionExpectFailure(collectionId: number, senderSeed = '//Alice') {
   await usingApi(async (api, privateKeyWrapper) => {
     // Run the DestroyCollection transaction
-    const alicePrivateKey = privateKeyWrapper!(senderSeed);
+    const alicePrivateKey = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.destroyCollection(collectionId);
     await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
   });
@@ -529,7 +529,7 @@
 export async function destroyCollectionExpectSuccess(collectionId: number, senderSeed = '//Alice') {
   await usingApi(async (api, privateKeyWrapper) => {
     // Run the DestroyCollection transaction
-    const alicePrivateKey = privateKeyWrapper!(senderSeed);
+    const alicePrivateKey = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.destroyCollection(collectionId);
     const events = await submitTransactionAsync(alicePrivateKey, tx);
     const result = getDestroyResult(events);
@@ -574,7 +574,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const senderPrivateKey = privateKeyWrapper!(sender);
+    const senderPrivateKey = privateKeyWrapper(sender);
     const tx = api.tx.unique.setCollectionSponsor(collectionId, sponsor);
     const events = await submitTransactionAsync(senderPrivateKey, tx);
     const result = getGenericResult(events);
@@ -594,7 +594,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const alicePrivateKey = privateKeyWrapper!(sender);
+    const alicePrivateKey = privateKeyWrapper(sender);
     const tx = api.tx.unique.removeCollectionSponsor(collectionId);
     const events = await submitTransactionAsync(alicePrivateKey, tx);
     const result = getGenericResult(events);
@@ -612,7 +612,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const alicePrivateKey = privateKeyWrapper!(senderSeed);
+    const alicePrivateKey = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.removeCollectionSponsor(collectionId);
     await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
   });
@@ -622,7 +622,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const alicePrivateKey = privateKeyWrapper!(senderSeed);
+    const alicePrivateKey = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.setCollectionSponsor(collectionId, sponsor);
     await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
   });
@@ -632,7 +632,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const sender = privateKeyWrapper!(senderSeed);
+    const sender = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.confirmSponsorship(collectionId);
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
@@ -653,7 +653,7 @@
   await usingApi(async (api, privateKeyWrapper) => {
 
     // Run the transaction
-    const sender = privateKeyWrapper!(senderSeed);
+    const sender = privateKeyWrapper(senderSeed);
     const tx = api.tx.unique.confirmSponsorship(collectionId);
     await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
   });
modifiedtests/src/xcmTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/xcmTransfer.test.ts
+++ b/tests/src/xcmTransfer.test.ts
@@ -38,7 +38,7 @@
   
   before(async () => {
     await usingApi(async (api, privateKeyWrapper) => {
-      alice = privateKeyWrapper!('//Alice');
+      alice = privateKeyWrapper('//Alice');
     });
 
     const karuraApiOptions: ApiOptions = {