difftreelog
Merge pull request #576 from UniqueNetwork/tests/intermediate-refactor
in: master
33 files changed
tests/package.jsondiffbeforeafterboth71 "testRemoveFromContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractAllowList.test.ts",71 "testRemoveFromContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractAllowList.test.ts",72 "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",72 "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",73 "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",73 "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",74 "testNextSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/nextSponsoring.test.ts",74 "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",75 "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",75 "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",76 "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",76 "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.test.ts",77 "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.test.ts",97 "dependencies": {98 "dependencies": {98 "@polkadot/api": "9.2.2",99 "@polkadot/api": "9.2.2",99 "@polkadot/api-contract": "9.2.2",100 "@polkadot/api-contract": "9.2.2",100 "@polkadot/util-crypto": "10.1.1",101 "@polkadot/util-crypto": "10.1.7",101 "bignumber.js": "^9.0.2",102 "bignumber.js": "^9.0.2",102 "chai-as-promised": "^7.1.1",103 "chai-as-promised": "^7.1.1",103 "chai-like": "^1.1.1",104 "chai-like": "^1.1.1",tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import chai from 'chai';19import chaiAsPromised from 'chai-as-promised';20import {usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;2425let donor: IKeyringPair;2627before(async () => {28 await usingPlaygrounds(async (_, privateKeyWrapper) => {29 donor = privateKeyWrapper('//Alice');30 });31});321933describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {20describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {21 let donor: IKeyringPair;2223 before(async () => {24 await usingPlaygrounds(async (_, privateKeyWrapper) => {25 donor = privateKeyWrapper('//Alice');26 });27 });2834 it('Add collection admin.', async () => {29 itSub('Add collection admin.', async ({helper}) => {35 await usingPlaygrounds(async (helper) => {36 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);30 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);37 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});31 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});383239 const collection = await helper.collection.getData(collectionId);33 const collection = await helper.collection.getData(collectionId);40 expect(collection!.normalizedOwner!).to.be.equal(alice.address);34 expect(collection!.normalizedOwner!).to.be.equal(helper.address.normalizeSubstrate(alice.address));413542 await helper.nft.addAdmin(alice, collectionId, {Substrate: bob.address});36 await helper.nft.addAdmin(alice, collectionId, {Substrate: bob.address});433744 const adminListAfterAddAdmin = await helper.collection.getAdmins(collectionId);38 const adminListAfterAddAdmin = await helper.collection.getAdmins(collectionId);45 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});39 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});46 });47 });40 });48});41});494250describe('Negative Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {43describe('Negative Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {44 let donor: IKeyringPair;4546 before(async () => {47 await usingPlaygrounds(async (_, privateKeyWrapper) => {48 donor = privateKeyWrapper('//Alice');49 });50 });5151 it("Not owner can't add collection admin.", async () => {52 itSub("Not owner can't add collection admin.", async ({helper}) => {52 await usingPlaygrounds(async (helper) => {53 const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);53 const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);54 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});54 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});555556 const collection = await helper.collection.getData(collectionId);56 const collection = await helper.collection.getData(collectionId);57 expect(collection?.normalizedOwner).to.be.equal(alice.address);57 expect(collection?.normalizedOwner).to.be.equal(helper.address.normalizeSubstrate(alice.address));585859 const changeAdminTxBob = async () => helper.collection.addAdmin(bob, collectionId, {Substrate: bob.address});59 const changeAdminTxBob = async () => helper.collection.addAdmin(bob, collectionId, {Substrate: bob.address});60 const changeAdminTxCharlie = async () => helper.collection.addAdmin(bob, collectionId, {Substrate: charlie.address});60 const changeAdminTxCharlie = async () => helper.collection.addAdmin(bob, collectionId, {Substrate: charlie.address});61 await expect(changeAdminTxCharlie()).to.be.rejected;61 await expect(changeAdminTxCharlie()).to.be.rejectedWith(/common\.NoPermission/);62 await expect(changeAdminTxBob()).to.be.rejected;62 await expect(changeAdminTxBob()).to.be.rejectedWith(/common\.NoPermission/);636364 const adminListAfterAddAdmin = await helper.collection.getAdmins(collectionId);64 const adminListAfterAddAdmin = await helper.collection.getAdmins(collectionId);65 expect(adminListAfterAddAdmin).to.be.not.deep.contains({Substrate: charlie.address});65 expect(adminListAfterAddAdmin).to.be.not.deep.contains({Substrate: charlie.address});66 expect(adminListAfterAddAdmin).to.be.not.deep.contains({Substrate: bob.address});66 expect(adminListAfterAddAdmin).to.be.not.deep.contains({Substrate: bob.address});67 });68 });67 });696870 it("Admin can't add collection admin.", async () => {69 itSub("Admin can't add collection admin.", async ({helper}) => {71 await usingPlaygrounds(async (helper) => {72 const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);70 const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);73 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});71 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});747278 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});76 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});797780 const changeAdminTxCharlie = async () => collection.addAdmin(bob, {Substrate: charlie.address});78 const changeAdminTxCharlie = async () => collection.addAdmin(bob, {Substrate: charlie.address});81 await expect(changeAdminTxCharlie()).to.be.rejected;79 await expect(changeAdminTxCharlie()).to.be.rejectedWith(/common\.NoPermission/);828083 const adminListAfterAddNewAdmin = await collection.getAdmins();81 const adminListAfterAddNewAdmin = await collection.getAdmins();84 expect(adminListAfterAddNewAdmin).to.be.deep.contains({Substrate: bob.address});82 expect(adminListAfterAddNewAdmin).to.be.deep.contains({Substrate: bob.address});85 expect(adminListAfterAddNewAdmin).to.be.not.deep.contains({Substrate: charlie.address});83 expect(adminListAfterAddNewAdmin).to.be.not.deep.contains({Substrate: charlie.address});86 });87 });84 });888589 it("Can't add collection admin of not existing collection.", async () => {86 itSub("Can't add collection admin of not existing collection.", async ({helper}) => {90 await usingPlaygrounds(async (helper) => {91 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);87 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);92 // tslint:disable-next-line: no-bitwise93 const collectionId = (1 << 32) - 1;88 const collectionId = (1 << 32) - 1;948995 const addAdminTx = async () => helper.collection.addAdmin(alice, collectionId, {Substrate: bob.address});90 const addAdminTx = async () => helper.collection.addAdmin(alice, collectionId, {Substrate: bob.address});96 await expect(addAdminTx()).to.be.rejected;91 await expect(addAdminTx()).to.be.rejectedWith(/common\.CollectionNotFound/);979298 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)93 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)99 await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});94 await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});100 });101 });95 });10296103 it("Can't add an admin to a destroyed collection.", async () => {97 itSub("Can't add an admin to a destroyed collection.", async ({helper}) => {104 await usingPlaygrounds(async (helper) => {105 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);98 const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);106 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});99 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});107100108 await collection.burn(alice);101 await collection.burn(alice);109 const addAdminTx = async () => collection.addAdmin(alice, {Substrate: bob.address});102 const addAdminTx = async () => collection.addAdmin(alice, {Substrate: bob.address});110 await expect(addAdminTx()).to.be.rejected;103 await expect(addAdminTx()).to.be.rejectedWith(/common\.CollectionNotFound/);111104112 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)105 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)113 await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});106 await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});114 });115 });107 });116108117 it('Add an admin to a collection that has reached the maximum number of admins limit', async () => {109 itSub('Add an admin to a collection that has reached the maximum number of admins limit', async ({helper}) => {118 await usingPlaygrounds(async (helper) => {119 const [alice, ...accounts] = await helper.arrange.createAccounts([10n, 0n, 0n, 0n, 0n, 0n, 0n, 0n], donor);110 const [alice, ...accounts] = await helper.arrange.createAccounts([10n, 0n, 0n, 0n, 0n, 0n, 0n, 0n], donor);120 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});111 const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});121112129 }120 }130121131 const addExtraAdminTx = async () => collection.addAdmin(alice, {Substrate: accounts[chainAdminLimit].address});122 const addExtraAdminTx = async () => collection.addAdmin(alice, {Substrate: accounts[chainAdminLimit].address});132 await expect(addExtraAdminTx()).to.be.rejected;123 await expect(addExtraAdminTx()).to.be.rejectedWith(/common\.CollectionAdminCountExceeded/);133 });134 });124 });135});125});136126tests/src/eth/contractSponsoring.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/nesting/nest.test.tsdiffbeforeafterboth20 let donor: IKeyringPair;20 let donor: IKeyringPair;212122 before(async function() {22 before(async function() {23 await usingEthPlaygrounds(async (helper, privateKey) => {23 await usingEthPlaygrounds(async (_, privateKey) => {24 donor = privateKey('//Alice');24 donor = privateKey('//Alice');25 });25 });26 });26 });tests/src/eth/payable.test.tsdiffbeforeafterboth22 let donor: IKeyringPair;22 let donor: IKeyringPair;232324 before(async function() {24 before(async function() {25 await usingEthPlaygrounds(async (helper, privateKey) => {25 await usingEthPlaygrounds(async (_, privateKey) => {26 donor = privateKey('//Alice');26 donor = privateKey('//Alice');27 });27 });28 });28 });tests/src/eth/util/playgrounds/unique.dev.d.tsdiffbeforeafterbothno changes
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0334/* eslint-disable function-call-argument-newline */4/* eslint-disable function-call-argument-newline */5// eslint-disable-next-line @typescript-eslint/triple-slash-reference6/// <reference path="unique.dev.d.ts" />576import {readFile} from 'fs/promises';8import {readFile} from 'fs/promises';79tests/src/fungible.test.tsdiffbeforeafterboth17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {U128_MAX} from './util/helpers';18import {U128_MAX} from './util/helpers';1920import {usingPlaygrounds} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';212022import chai from 'chai';21// todo:playgrounds get rid of globals23import chaiAsPromised from 'chai-as-promised';24chai.use(chaiAsPromised);25const expect = chai.expect;2627let alice: IKeyringPair;22let alice: IKeyringPair;28let bob: IKeyringPair;23let bob: IKeyringPair;35 });30 });36 });31 });373238 it('Create fungible collection and token', async () => {33 itSub('Create fungible collection and token', async ({helper}) => {39 await usingPlaygrounds(async helper => {40 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'trest'});34 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'trest'});41 const defaultTokenId = await collection.getLastTokenId();35 const defaultTokenId = await collection.getLastTokenId();42 expect(defaultTokenId).to.be.equal(0);36 expect(defaultTokenId).to.be.equal(0);433744 await collection.mint(alice, {Substrate: alice.address}, U128_MAX);38 await collection.mint(alice, U128_MAX);45 const aliceBalance = await collection.getBalance({Substrate: alice.address});39 const aliceBalance = await collection.getBalance({Substrate: alice.address});46 const itemCountAfter = await collection.getLastTokenId();40 const itemCountAfter = await collection.getLastTokenId();474148 expect(itemCountAfter).to.be.equal(defaultTokenId);42 expect(itemCountAfter).to.be.equal(defaultTokenId);49 expect(aliceBalance).to.be.equal(U128_MAX);43 expect(aliceBalance).to.be.equal(U128_MAX);50 });51 });44 });52 45 53 it('RPC method tokenOnewrs for fungible collection and token', async () => {46 itSub('RPC method tokenOnewrs for fungible collection and token', async ({helper, privateKey}) => {54 await usingPlaygrounds(async (helper, privateKey) => {55 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};47 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};56 const facelessCrowd = Array(7).fill(0).map((_, i) => ({Substrate: privateKey(`//Alice+${i}`).address}));48 const facelessCrowd = Array(7).fill(0).map((_, i) => ({Substrate: privateKey(`//Alice+${i}`).address}));574958 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});50 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});595160 await collection.mint(alice, {Substrate: alice.address}, U128_MAX);52 await collection.mint(alice, U128_MAX);615362 await collection.transfer(alice, {Substrate: bob.address}, 1000n);54 await collection.transfer(alice, {Substrate: bob.address}, 1000n);63 await collection.transfer(alice, ethAcc, 900n);55 await collection.transfer(alice, ethAcc, 900n);75 const eleven = privateKey('//ALice+11');67 const eleven = privateKey('//ALice+11');76 expect(await collection.transfer(alice, {Substrate: eleven.address}, 10n)).to.be.true;68 expect(await collection.transfer(alice, {Substrate: eleven.address}, 10n)).to.be.true;77 expect((await collection.getTop10Owners()).length).to.be.equal(10);69 expect((await collection.getTop10Owners()).length).to.be.equal(10);78 });79 });70 });80 71 81 it('Transfer token', async () => {72 itSub('Transfer token', async ({helper}) => {82 await usingPlaygrounds(async helper => {83 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};73 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};84 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});74 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});85 await collection.mint(alice, {Substrate: alice.address}, 500n);75 await collection.mint(alice, 500n);867687 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(500n);77 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(500n);88 expect(await collection.transfer(alice, {Substrate: bob.address}, 60n)).to.be.true;78 expect(await collection.transfer(alice, {Substrate: bob.address}, 60n)).to.be.true;93 expect(await collection.getBalance(ethAcc)).to.be.equal(140n);83 expect(await collection.getBalance(ethAcc)).to.be.equal(140n);948495 await expect(collection.transfer(alice, {Substrate: bob.address}, 350n)).to.eventually.be.rejected;85 await expect(collection.transfer(alice, {Substrate: bob.address}, 350n)).to.eventually.be.rejected;96 });97 });86 });988799 it('Tokens multiple creation', async () => {88 itSub('Tokens multiple creation', async ({helper}) => {100 await usingPlaygrounds(async helper => {101 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});89 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});10290103 await collection.mintWithOneOwner(alice, {Substrate: alice.address}, [91 await collection.mintWithOneOwner(alice, [104 {value: 500n},92 {value: 500n},105 {value: 400n},93 {value: 400n},106 {value: 300n},94 {value: 300n},107 ]);95 ]);10896109 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1200n);97 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1200n);110 });111 });98 });11299113 it('Burn some tokens ', async () => {100 itSub('Burn some tokens ', async ({helper}) => {114 await usingPlaygrounds(async helper => {115 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});101 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});116 await collection.mint(alice, {Substrate: alice.address}, 500n);102 await collection.mint(alice, 500n);117103118 expect(await collection.isTokenExists(0)).to.be.true;104 expect(await collection.isTokenExists(0)).to.be.true;119 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(500n);105 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(500n);120 expect(await collection.burnTokens(alice, 499n)).to.be.true;106 expect(await collection.burnTokens(alice, 499n)).to.be.true;121 expect(await collection.isTokenExists(0)).to.be.true;107 expect(await collection.isTokenExists(0)).to.be.true;122 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1n);108 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1n);123 });124 });109 });125 110 126 it('Burn all tokens ', async () => {111 itSub('Burn all tokens ', async ({helper}) => {127 await usingPlaygrounds(async helper => {128 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});112 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});129 await collection.mint(alice, {Substrate: alice.address}, 500n);113 await collection.mint(alice, 500n);130114131 expect(await collection.isTokenExists(0)).to.be.true;115 expect(await collection.isTokenExists(0)).to.be.true;132 expect(await collection.burnTokens(alice, 500n)).to.be.true;116 expect(await collection.burnTokens(alice, 500n)).to.be.true;133 expect(await collection.isTokenExists(0)).to.be.true;117 expect(await collection.isTokenExists(0)).to.be.true;134118135 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(0n);119 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(0n);136 expect(await collection.getTotalPieces()).to.be.equal(0n);120 expect(await collection.getTotalPieces()).to.be.equal(0n);137 });138 });121 });139122140 it('Set allowance for token', async () => {123 itSub('Set allowance for token', async ({helper}) => {141 await usingPlaygrounds(async helper => {142 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});124 const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});143 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};125 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};144 await collection.mint(alice, {Substrate: alice.address}, 100n);126 await collection.mint(alice, 100n);145127146 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(100n);128 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(100n);147 129 160 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(30n);142 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(30n);161 expect(await collection.transferFrom(bob, {Substrate: alice.address}, ethAcc, 10n)).to.be.true;143 expect(await collection.transferFrom(bob, {Substrate: alice.address}, ethAcc, 10n)).to.be.true;162 expect(await collection.getBalance(ethAcc)).to.be.equal(10n);144 expect(await collection.getBalance(ethAcc)).to.be.equal(10n);163 });164 });145 });165});146});166147tests/src/limits.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import usingApi from './substrate/substrate-api';18import {expect, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util/playgrounds';19import {20 createCollectionExpectSuccess,21 destroyCollectionExpectSuccess,22 setCollectionLimitsExpectSuccess,23 setCollectionSponsorExpectSuccess,24 confirmSponsorshipExpectSuccess,25 createItemExpectSuccess,26 createItemExpectFailure,27 transferExpectSuccess,28 getFreeBalance,29 waitNewBlocks, burnItemExpectSuccess,30 requirePallets,31 Pallets,32} from './util/helpers';33import {expect} from 'chai';341935describe('Number of tokens per address (NFT)', () => {20describe('Number of tokens per address (NFT)', () => {36 let alice: IKeyringPair;21 let alice: IKeyringPair;372238 before(async () => {23 before(async () => {39 await usingApi(async (api, privateKeyWrapper) => {24 await usingPlaygrounds(async (helper, privateKey) => {40 alice = privateKeyWrapper('//Alice');25 const donor = privateKey('//Alice');26 [alice] = await helper.arrange.createAccounts([10n], donor);41 });27 });42 });28 });432944 it.skip('Collection limits allow greater number than chain limits, chain limits are enforced', async () => {30 itSub.skip('Collection limits allow greater number than chain limits, chain limits are enforced', async ({helper}) => {4546 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});31 const collection = await helper.nft.mintCollection(alice, {});47 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 20});32 await collection.setLimits(alice, {accountTokenOwnershipLimit: 20});33 48 for(let i = 0; i < 10; i++){34 for(let i = 0; i < 10; i++){49 await createItemExpectSuccess(alice, collectionId, 'NFT');35 await expect(collection.mintToken(alice)).to.be.not.rejected;50 }36 }51 await createItemExpectFailure(alice, collectionId, 'NFT');37 await expect(collection.mintToken(alice)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);52 for(let i = 1; i < 11; i++) {38 for(let i = 1; i < 11; i++) {53 await burnItemExpectSuccess(alice, collectionId, i);39 await expect(collection.burnToken(alice, i)).to.be.not.rejected;54 }40 }55 await destroyCollectionExpectSuccess(collectionId);41 await collection.burn(alice);56 });42 });43 44 itSub('Collection limits allow lower number than chain limits, collection limits are enforced', async ({helper}) => {45 const collection = await helper.nft.mintCollection(alice, {});46 await collection.setLimits(alice, {accountTokenOwnershipLimit: 1});574758 it('Collection limits allow lower number than chain limits, collection limits are enforced', async () => {48 await collection.mintToken(alice);5960 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});61 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 1});49 await expect(collection.mintToken(alice)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);62 await createItemExpectSuccess(alice, collectionId, 'NFT');63 await createItemExpectFailure(alice, collectionId, 'NFT');50 64 await burnItemExpectSuccess(alice, collectionId, 1);51 await collection.burnToken(alice, 1);65 await destroyCollectionExpectSuccess(collectionId);52 await expect(collection.burn(alice)).to.be.not.rejected;66 });53 });67});54});685569describe('Number of tokens per address (ReFungible)', () => {56describe('Number of tokens per address (ReFungible)', () => {70 let alice: IKeyringPair;57 let alice: IKeyringPair;715872 before(async function() {59 before(async function() {73 await requirePallets(this, [Pallets.ReFungible]);60 await usingPlaygrounds(async (helper, privateKey) => {61 requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);746275 await usingApi(async (api, privateKeyWrapper) => {63 const donor = privateKey('//Alice');76 alice = privateKeyWrapper('//Alice');64 [alice] = await helper.arrange.createAccounts([10n], donor);77 });65 });78 });66 });796780 it.skip('Collection limits allow greater number than chain limits, chain limits are enforced', async () => {68 itSub.skip('Collection limits allow greater number than chain limits, chain limits are enforced', async ({helper}) => {81 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});69 const collection = await helper.rft.mintCollection(alice, {});82 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 20});70 await collection.setLimits(alice, {accountTokenOwnershipLimit: 20});71 83 for(let i = 0; i < 10; i++){72 for(let i = 0; i < 10; i++){84 await createItemExpectSuccess(alice, collectionId, 'ReFungible');73 await expect(collection.mintToken(alice, 10n)).to.be.not.rejected;85 }74 }86 await createItemExpectFailure(alice, collectionId, 'ReFungible');75 await expect(collection.mintToken(alice, 10n)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);87 for(let i = 1; i < 11; i++) {76 for(let i = 1; i < 11; i++) {88 await burnItemExpectSuccess(alice, collectionId, i, 100);77 await expect(collection.burnToken(alice, i, 10n)).to.be.not.rejected;89 }78 }90 await destroyCollectionExpectSuccess(collectionId);79 await collection.burn(alice);91 });80 });928193 it('Collection limits allow lower number than chain limits, collection limits are enforced', async () => {82 itSub('Collection limits allow lower number than chain limits, collection limits are enforced', async ({helper}) => {94 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});83 const collection = await helper.rft.mintCollection(alice, {});95 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 1});84 await collection.setLimits(alice, {accountTokenOwnershipLimit: 1});8596 await createItemExpectSuccess(alice, collectionId, 'ReFungible');86 await collection.mintToken(alice);97 await createItemExpectFailure(alice, collectionId, 'ReFungible');87 await expect(collection.mintToken(alice)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);98 await burnItemExpectSuccess(alice, collectionId, 1, 100);88 89 await collection.burnToken(alice, 1);99 await destroyCollectionExpectSuccess(collectionId);90 await expect(collection.burn(alice)).to.be.not.rejected;100 });91 });101});92});1029394// todo:playgrounds skipped ~ postponed103describe.skip('Sponsor timeout (NFT) (only for special chain limits test)', () => {95describe.skip('Sponsor timeout (NFT) (only for special chain limits test)', () => {104 let alice: IKeyringPair;96 /*let alice: IKeyringPair;105 let bob: IKeyringPair;97 let bob: IKeyringPair;106 let charlie: IKeyringPair;98 let charlie: IKeyringPair;10799113 });105 });114 });106 });115107116 it.skip('Collection limits have greater timeout value than chain limits, collection limits are enforced', async () => {108 itSub.skip('Collection limits have greater timeout value than chain limits, collection limits are enforced', async ({helper}) => {117 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});109 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});118 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});110 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});119 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');111 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');137 await destroyCollectionExpectSuccess(collectionId);129 await destroyCollectionExpectSuccess(collectionId);138 });130 });139131140 it('Collection limits have lower timeout value than chain limits, chain limits are enforced', async () => {132 itSub('Collection limits have lower timeout value than chain limits, chain limits are enforced', async ({helper}) => {141133142 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});134 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});143 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});135 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});176 });168 });177 });169 });178170179 it('Collection limits have greater timeout value than chain limits, collection limits are enforced', async () => {171 itSub('Collection limits have greater timeout value than chain limits, collection limits are enforced', async ({helper}) => {180 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});172 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});181 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});173 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});182 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible');174 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible');202 await destroyCollectionExpectSuccess(collectionId);194 await destroyCollectionExpectSuccess(collectionId);203 });195 });204196205 it('Collection limits have lower timeout value than chain limits, chain limits are enforced', async () => {197 itSub('Collection limits have lower timeout value than chain limits, chain limits are enforced', async ({helper}) => {206198207 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});199 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});208 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});200 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});243 });235 });244 });236 });245237246 it('Collection limits have greater timeout value than chain limits, collection limits are enforced', async () => {238 itSub('Collection limits have greater timeout value than chain limits, collection limits are enforced', async ({helper}) => {247 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});239 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});248 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});240 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 7});249 const tokenId = await createItemExpectSuccess(alice, collectionId, 'ReFungible');241 const tokenId = await createItemExpectSuccess(alice, collectionId, 'ReFungible');267 await destroyCollectionExpectSuccess(collectionId);259 await destroyCollectionExpectSuccess(collectionId);268 });260 });269261270 it('Collection limits have lower timeout value than chain limits, chain limits are enforced', async () => {262 itSub('Collection limits have lower timeout value than chain limits, chain limits are enforced', async ({helper}) => {271263272 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});264 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});273 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});265 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 1});290 expect(aliceBalanceAfterSponsoredTransaction < aliceBalanceBefore).to.be.true;282 expect(aliceBalanceAfterSponsoredTransaction < aliceBalanceBefore).to.be.true;291 //expect(aliceBalanceAfterSponsoredTransaction).to.be.lessThan(aliceBalanceBefore);283 //expect(aliceBalanceAfterSponsoredTransaction).to.be.lessThan(aliceBalanceBefore);292 await destroyCollectionExpectSuccess(collectionId);284 await destroyCollectionExpectSuccess(collectionId);293 });285 });*/294});286});295287296describe('Collection zero limits (NFT)', () => {288describe('Collection zero limits (NFT)', () => {299 let charlie: IKeyringPair;291 let charlie: IKeyringPair;300292301 before(async () => {293 before(async () => {302 await usingApi(async (api, privateKeyWrapper) => {294 await usingPlaygrounds(async (helper, privateKey) => {303 alice = privateKeyWrapper('//Alice');295 const donor = privateKey('//Alice');304 bob = privateKeyWrapper('//Bob');296 [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);305 charlie = privateKeyWrapper('//Charlie');306 });297 });307 });298 });308299309 it.skip('Limits have 0 in tokens per address field, the chain limits are applied', async () => {300 itSub.skip('Limits have 0 in tokens per address field, the chain limits are applied', async ({helper}) => {310 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});301 const collection = await helper.nft.mintCollection(alice, {});311 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 0});302 await collection.setLimits(alice, {accountTokenOwnershipLimit: 0});303312 for(let i = 0; i < 10; i++){304 for(let i = 0; i < 10; i++){313 await createItemExpectSuccess(alice, collectionId, 'NFT');305 await collection.mintToken(alice);314 }306 }315 await createItemExpectFailure(alice, collectionId, 'NFT');307 await expect(collection.mintToken(alice)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);316 });308 });317309318 it('Limits have 0 in sponsor timeout, no limits are applied', async () => {310 itSub('Limits have 0 in sponsor timeout, no limits are applied', async ({helper}) => {311 const collection = await helper.nft.mintCollection(alice, {});312 await collection.setLimits(alice, {sponsorTransferTimeout: 0});313 const token = await collection.mintToken(alice);319314320 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});315 await collection.setSponsor(alice, alice.address);321 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 0});322 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');323 await setCollectionSponsorExpectSuccess(collectionId, alice.address);316 await collection.confirmSponsorship(alice);324 await confirmSponsorshipExpectSuccess(collectionId, '//Alice');317 325 await transferExpectSuccess(collectionId, tokenId, alice, bob);318 await token.transfer(alice, {Substrate: bob.address});326 const aliceBalanceBefore = await getFreeBalance(alice);319 const aliceBalanceBefore = await helper.balance.getSubstrate(alice.address);327320328 // check setting SponsorTimeout = 0, success with next block321 // check setting SponsorTimeout = 0, success with next block329 await waitNewBlocks(1);322 await helper.wait.newBlocks(1);330 await transferExpectSuccess(collectionId, tokenId, bob, charlie);323 await token.transfer(bob, {Substrate: charlie.address});331 const aliceBalanceAfterSponsoredTransaction1 = await getFreeBalance(alice);324 const aliceBalanceAfterSponsoredTransaction1 = await helper.balance.getSubstrate(alice.address);332 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;325 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;333 //expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);334 });326 });335});327});336328340 let charlie: IKeyringPair;332 let charlie: IKeyringPair;341333342 before(async () => {334 before(async () => {343 await usingApi(async (api, privateKeyWrapper) => {335 await usingPlaygrounds(async (helper, privateKey) => {344 alice = privateKeyWrapper('//Alice');336 const donor = privateKey('//Alice');345 bob = privateKeyWrapper('//Bob');337 [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);346 charlie = privateKeyWrapper('//Charlie');347 });338 });348 });339 });349340350 it('Limits have 0 in sponsor timeout, no limits are applied', async () => {341 itSub('Limits have 0 in sponsor timeout, no limits are applied', async ({helper}) => {351 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});342 const collection = await helper.ft.mintCollection(alice, {});352 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 0});343 await collection.setLimits(alice, {sponsorTransferTimeout: 0});353 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible');344 await collection.mint(alice, 3n);354 await setCollectionSponsorExpectSuccess(collectionId, alice.address);355 await confirmSponsorshipExpectSuccess(collectionId, '//Alice');356 await transferExpectSuccess(collectionId, tokenId, alice, bob, 10, 'Fungible');357 const aliceBalanceBefore = await getFreeBalance(alice);358 await transferExpectSuccess(collectionId, tokenId, bob, charlie, 2, 'Fungible');359345346 await collection.setSponsor(alice, alice.address);347 await collection.confirmSponsorship(alice);348 349 await collection.transfer(alice, {Substrate: bob.address}, 2n);350 const aliceBalanceBefore = await helper.balance.getSubstrate(alice.address);351360 // check setting SponsorTimeout = 0, success with next block352 // check setting SponsorTimeout = 0, success with next block361 await waitNewBlocks(1);353 await helper.wait.newBlocks(1);362 await transferExpectSuccess(collectionId, tokenId, bob, charlie, 2, 'Fungible');354 await collection.transfer(bob, {Substrate: charlie.address});363 const aliceBalanceAfterSponsoredTransaction1 = await getFreeBalance(alice);355 const aliceBalanceAfterSponsoredTransaction1 = await helper.balance.getSubstrate(alice.address);364 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;356 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;365 //expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);366 });357 });367});358});368359372 let charlie: IKeyringPair;363 let charlie: IKeyringPair;373364374 before(async function() {365 before(async function() {375 await requirePallets(this, [Pallets.ReFungible]);366 await usingPlaygrounds(async (helper, privateKey) => {367 requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);376368377 await usingApi(async (api, privateKeyWrapper) => {369 const donor = privateKey('//Alice');378 alice = privateKeyWrapper('//Alice');379 bob = privateKeyWrapper('//Bob');370 [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);380 charlie = privateKeyWrapper('//Charlie');381 });371 });382 });372 });383373384 it.skip('Limits have 0 in tokens per address field, the chain limits are applied', async () => {374 itSub.skip('Limits have 0 in tokens per address field, the chain limits are applied', async ({helper}) => {385 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});375 const collection = await helper.rft.mintCollection(alice, {});386 await setCollectionLimitsExpectSuccess(alice, collectionId, {accountTokenOwnershipLimit: 0});376 await collection.setLimits(alice, {accountTokenOwnershipLimit: 0});387 for(let i = 0; i < 10; i++){377 for(let i = 0; i < 10; i++){388 await createItemExpectSuccess(alice, collectionId, 'ReFungible');378 await collection.mintToken(alice);389 }379 }390 await createItemExpectFailure(alice, collectionId, 'ReFungible');380 await expect(collection.mintToken(alice)).to.be.rejectedWith(/common\.AccountTokenLimitExceeded/);391 });381 });392382393 it('Limits have 0 in sponsor timeout, no limits are applied', async () => {383 itSub('Limits have 0 in sponsor timeout, no limits are applied', async ({helper}) => {384 const collection = await helper.rft.mintCollection(alice, {});385 await collection.setLimits(alice, {sponsorTransferTimeout: 0});386 const token = await collection.mintToken(alice, 3n);394387395 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});388 await collection.setSponsor(alice, alice.address);396 await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorTransferTimeout: 0});397 const tokenId = await createItemExpectSuccess(alice, collectionId, 'ReFungible');398 await setCollectionSponsorExpectSuccess(collectionId, alice.address);389 await collection.confirmSponsorship(alice);399 await confirmSponsorshipExpectSuccess(collectionId, '//Alice');390 400 await transferExpectSuccess(collectionId, tokenId, alice, bob, 100, 'ReFungible');391 await token.transfer(alice, {Substrate: bob.address}, 2n);401 await transferExpectSuccess(collectionId, tokenId, bob, charlie, 20, 'ReFungible');402 const aliceBalanceBefore = await getFreeBalance(alice);392 const aliceBalanceBefore = await helper.balance.getSubstrate(alice.address);403393404 // check setting SponsorTimeout = 0, success with next block394 // check setting SponsorTimeout = 0, success with next block405 await waitNewBlocks(1);395 await helper.wait.newBlocks(1);406 await transferExpectSuccess(collectionId, tokenId, bob, charlie, 20, 'ReFungible');396 await token.transfer(bob, {Substrate: charlie.address});407 const aliceBalanceAfterSponsoredTransaction1 = await getFreeBalance(alice);397 const aliceBalanceAfterSponsoredTransaction1 = await helper.balance.getSubstrate(alice.address);408 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;398 expect(aliceBalanceAfterSponsoredTransaction1 < aliceBalanceBefore).to.be.true;409 //expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);410 });399 });411 412 it('Effective collection limits', async () => {413 await usingApi(async (api) => {414 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});400});415 await setCollectionLimitsExpectSuccess(alice, collectionId, {ownerCanTransfer: true});416 417 { // Check that limits is undefined418 const collection = await api.rpc.unique.collectionById(collectionId);419 expect(collection.isSome).to.be.true;420 const limits = collection.unwrap().limits;421 expect(limits).to.be.any;422 423 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.null;424 expect(limits.sponsoredDataSize.toHuman()).to.be.null;425 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.null;426 expect(limits.tokenLimit.toHuman()).to.be.null;427 expect(limits.sponsorTransferTimeout.toHuman()).to.be.null;428 expect(limits.sponsorApproveTimeout.toHuman()).to.be.null;429 expect(limits.ownerCanTransfer.toHuman()).to.be.true;430 expect(limits.ownerCanDestroy.toHuman()).to.be.null;431 expect(limits.transfersEnabled.toHuman()).to.be.null;432 }433 434 { // Check that limits is undefined for non-existent collection435 const limits = await api.rpc.unique.effectiveCollectionLimits(11111);436 expect(limits.toHuman()).to.be.null;437 }438 439 { // Check that default values defined for collection limits440 const limitsOpt = await api.rpc.unique.effectiveCollectionLimits(collectionId);441 expect(limitsOpt.isNone).to.be.false;442 const limits = limitsOpt.unwrap();443 444 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.eq('100,000');445 expect(limits.sponsoredDataSize.toHuman()).to.be.eq('2,048');446 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.eq('SponsoringDisabled');447 expect(limits.tokenLimit.toHuman()).to.be.eq('4,294,967,295');448 expect(limits.sponsorTransferTimeout.toHuman()).to.be.eq('5');449 expect(limits.sponsorApproveTimeout.toHuman()).to.be.eq('5');450 expect(limits.ownerCanTransfer.toHuman()).to.be.true;451 expect(limits.ownerCanDestroy.toHuman()).to.be.true;452 expect(limits.transfersEnabled.toHuman()).to.be.true;453 }454401455 { //Check the values for collection limits402describe('Effective collection limits (NFT)', () => {456 await setCollectionLimitsExpectSuccess(alice, collectionId, {457 accountTokenOwnershipLimit: 99_999,403 let alice: IKeyringPair;458 sponsoredDataSize: 1024,459 tokenLimit: 123,460 transfersEnabled: false,461 });462404463 const limitsOpt = await api.rpc.unique.effectiveCollectionLimits(collectionId);405 before(async () => {464 expect(limitsOpt.isNone).to.be.false;465 const limits = limitsOpt.unwrap();466 406 await usingPlaygrounds(async (helper, privateKey) => {467 expect(limits.accountTokenOwnershipLimit.toHuman()).to.be.eq('99,999');468 expect(limits.sponsoredDataSize.toHuman()).to.be.eq('1,024');469 expect(limits.sponsoredDataRateLimit.toHuman()).to.be.eq('SponsoringDisabled');470 expect(limits.tokenLimit.toHuman()).to.be.eq('123');471 expect(limits.sponsorTransferTimeout.toHuman()).to.be.eq('5');407 const donor = privateKey('//Alice');472 expect(limits.sponsorApproveTimeout.toHuman()).to.be.eq('5');473 expect(limits.ownerCanTransfer.toHuman()).to.be.true;408 [alice] = await helper.arrange.createAccounts([10n], donor);474 expect(limits.ownerCanDestroy.toHuman()).to.be.true;475 expect(limits.transfersEnabled.toHuman()).to.be.false;476 }477 });409 });478 });410 });411 479});412 itSub('Effective collection limits', async ({helper}) => {413 const collection = await helper.nft.mintCollection(alice, {});414 await collection.setLimits(alice, {ownerCanTransfer: true}); 415 416 { 417 // Check that limits are undefined418 const collectionInfo = await collection.getData();419 const limits = collectionInfo?.raw.limits;420 expect(limits).to.be.any;421 422 expect(limits.accountTokenOwnershipLimit).to.be.null;423 expect(limits.sponsoredDataSize).to.be.null;424 expect(limits.sponsoredDataRateLimit).to.be.null;425 expect(limits.tokenLimit).to.be.null;426 expect(limits.sponsorTransferTimeout).to.be.null;427 expect(limits.sponsorApproveTimeout).to.be.null;428 expect(limits.ownerCanTransfer).to.be.true;429 expect(limits.ownerCanDestroy).to.be.null;430 expect(limits.transfersEnabled).to.be.null;431 }480432433 { // Check that limits is undefined for non-existent collection434 const limits = await helper.collection.getEffectiveLimits(999999);435 expect(limits).to.be.null;436 }481437438 { // Check that default values defined for collection limits439 const limits = await collection.getEffectiveLimits();440441 expect(limits.accountTokenOwnershipLimit).to.be.eq(100000);442 expect(limits.sponsoredDataSize).to.be.eq(2048);443 expect(limits.sponsoredDataRateLimit).to.be.deep.eq({sponsoringDisabled: null});444 expect(limits.tokenLimit).to.be.eq(4294967295);445 expect(limits.sponsorTransferTimeout).to.be.eq(5);446 expect(limits.sponsorApproveTimeout).to.be.eq(5);447 expect(limits.ownerCanTransfer).to.be.true;448 expect(limits.ownerCanDestroy).to.be.true;449 expect(limits.transfersEnabled).to.be.true;450 }451452 { 453 // Check the values for collection limits454 await collection.setLimits(alice, {455 accountTokenOwnershipLimit: 99_999,456 sponsoredDataSize: 1024,457 tokenLimit: 123,458 transfersEnabled: false,459 });460461 const limits = await collection.getEffectiveLimits();462463 expect(limits.accountTokenOwnershipLimit).to.be.eq(99999);464 expect(limits.sponsoredDataSize).to.be.eq(1024);465 expect(limits.sponsoredDataRateLimit).to.be.deep.eq({sponsoringDisabled: null});466 expect(limits.tokenLimit).to.be.eq(123);467 expect(limits.sponsorTransferTimeout).to.be.eq(5);468 expect(limits.sponsorApproveTimeout).to.be.eq(5);469 expect(limits.ownerCanTransfer).to.be.true;470 expect(limits.ownerCanDestroy).to.be.true;471 expect(limits.transfersEnabled).to.be.false;472 }473 });474});482475tests/src/nextSponsoring.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {ApiPromise} from '@polkadot/api';18import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';19import chai from 'chai';20import chaiAsPromised from 'chai-as-promised';21import {default as usingApi} from './substrate/substrate-api';22import {18import {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';23 createCollectionExpectSuccess,1924 setCollectionSponsorExpectSuccess,25 confirmSponsorshipExpectSuccess,26 createItemExpectSuccess,27 transferExpectSuccess,28 normalizeAccountId,29 getNextSponsored,30 requirePallets,31 Pallets,32} from './util/helpers';3334chai.use(chaiAsPromised);35const expect = chai.expect;20const SPONSORING_TIMEOUT = 5;3637382141 let bob: IKeyringPair;24 let bob: IKeyringPair;422543 before(async () => {26 before(async () => {44 await usingApi(async (api, privateKeyWrapper) => {27 await usingPlaygrounds(async (helper, privateKey) => {45 alice = privateKeyWrapper('//Alice');28 const donor = privateKey('//Alice');46 bob = privateKeyWrapper('//Bob');29 [alice, bob] = await helper.arrange.createAccounts([20n, 10n], donor);47 });30 });48 });31 });493250 it('NFT', async () => {33 itSub('NFT', async ({helper}) => {51 await usingApi(async (api: ApiPromise) => {5253 // Not existing collection 34 // Non-existing collection54 expect(await getNextSponsored(api, 0, normalizeAccountId(alice), 0)).to.be.equal(-1);35 expect(await helper.collection.getTokenNextSponsored(0, 0, {Substrate: alice.address})).to.be.null;553656 const collectionId = await createCollectionExpectSuccess();37 const collection = await helper.nft.mintCollection(alice, {});57 const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);38 const token = await collection.mintToken(alice);583959 // Check with Disabled sponsoring state40 // Check with Disabled sponsoring state60 expect(await getNextSponsored(api, collectionId, normalizeAccountId(alice), itemId)).to.be.equal(-1);41 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.null;42 43 // Check with Unconfirmed sponsoring state61 await setCollectionSponsorExpectSuccess(collectionId, bob.address);44 await collection.setSponsor(alice, bob.address);6263 // Check with Unconfirmed sponsoring state64 expect(await getNextSponsored(api, collectionId, normalizeAccountId(alice), itemId)).to.be.equal(-1);45 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.null;4647 // Check with Confirmed sponsoring state65 await confirmSponsorshipExpectSuccess(collectionId, '//Bob');48 await collection.confirmSponsorship(bob);6667 // Check with Confirmed sponsoring state68 expect(await getNextSponsored(api, collectionId, normalizeAccountId(alice), itemId)).to.be.equal(0);49 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.equal(0);695070 // After transfer51 // Check after transfer71 await transferExpectSuccess(collectionId, itemId, alice, bob, 1);52 await token.transfer(alice, {Substrate: bob.address});72 expect(await getNextSponsored(api, collectionId, normalizeAccountId(alice), itemId)).to.be.lessThanOrEqual(5);53 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);735474 // Not existing token 55 // Non-existing token 75 expect(await getNextSponsored(api, collectionId, normalizeAccountId(alice), itemId+1)).to.be.equal(-1);56 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;76 });77 });57 });785879 it('Fungible', async () => {59 itSub('Fungible', async ({helper}) => {80 await usingApi(async (api: ApiPromise) => {8182 const createMode = 'Fungible';60 const collection = await helper.ft.mintCollection(alice, {});83 const funCollectionId = await createCollectionExpectSuccess({mode: {type: createMode, decimalPoints: 0}});61 await collection.mint(alice, 10n);6263 // Check with Disabled sponsoring state84 await createItemExpectSuccess(alice, funCollectionId, createMode);64 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;6585 await setCollectionSponsorExpectSuccess(funCollectionId, bob.address);66 await collection.setSponsor(alice, bob.address);86 await confirmSponsorshipExpectSuccess(funCollectionId, '//Bob');67 await collection.confirmSponsorship(bob);68 69 // Check with Confirmed sponsoring state87 expect(await getNextSponsored(api, funCollectionId, normalizeAccountId(alice), 0)).to.be.equal(0);70 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.equal(0);887172 // Check after transfer89 await transferExpectSuccess(funCollectionId, 0, alice, bob, 10, 'Fungible');73 await collection.transfer(alice, {Substrate: bob.address});90 expect(await getNextSponsored(api, funCollectionId, normalizeAccountId(alice), 0)).to.be.lessThanOrEqual(5);74 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);91 });92 });75 });937694 it('ReFungible', async function() {77 itSub.ifWithPallets('ReFungible', [Pallets.ReFungible], async ({helper}) => {95 await requirePallets(this, [Pallets.ReFungible]);9697 await usingApi(async (api: ApiPromise) => {9899 const createMode = 'ReFungible';78 const collection = await helper.rft.mintCollection(alice, {});100 const refunCollectionId = await createCollectionExpectSuccess({mode: {type: createMode}});79 const token = await collection.mintToken(alice, 10n);8081 // Check with Disabled sponsoring state101 const refunItemId = await createItemExpectSuccess(alice, refunCollectionId, createMode);82 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.null;83102 await setCollectionSponsorExpectSuccess(refunCollectionId, bob.address);84 await collection.setSponsor(alice, bob.address);103 await confirmSponsorshipExpectSuccess(refunCollectionId, '//Bob');85 await collection.confirmSponsorship(bob);8687 // Check with Confirmed sponsoring state104 expect(await getNextSponsored(api, refunCollectionId, normalizeAccountId(alice), refunItemId)).to.be.equal(0);88 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.equal(0);1058990 // Check after transfer106 await transferExpectSuccess(refunCollectionId, refunItemId, alice, bob, 10, 'ReFungible');91 await token.transfer(alice, {Substrate: bob.address});107 expect(await getNextSponsored(api, refunCollectionId, normalizeAccountId(alice), refunItemId)).to.be.lessThanOrEqual(5);92 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);10893109 // Not existing token 94 // Non-existing token 110 expect(await getNextSponsored(api, refunCollectionId, normalizeAccountId(alice), refunItemId+1)).to.be.equal(-1);95 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;111 });96 });112 });113});97});11498tests/src/overflow.test.tsdiffbeforeafterboth23chai.use(chaiAsPromised);23chai.use(chaiAsPromised);24const expect = chai.expect;24const expect = chai.expect;252526// todo:playgrounds skipped ~ postponed26describe.skip('Integration Test fungible overflows', () => {27describe.skip('Integration Test fungible overflows', () => {27 let alice: IKeyringPair;28 let alice: IKeyringPair;28 let bob: IKeyringPair;29 let bob: IKeyringPair;tests/src/pallet-presence.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {ApiPromise} from '@polkadot/api';18import {expect} from 'chai';17import {itSub, usingPlaygrounds, expect} from './util/playgrounds';19import usingApi from './substrate/substrate-api';2021function getModuleNames(api: ApiPromise): string[] {22 return api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase());23}241825// Pallets that must always be present19// Pallets that must always be present26const requiredPallets = [20const requiredPallets = [625663describe('Pallet presence', () => {57describe('Pallet presence', () => {64 before(async () => {58 before(async () => {65 await usingApi(async api => {59 await usingPlaygrounds(async helper => {66 const chain = await api.rpc.system.chain();60 const chain = await helper.api!.rpc.system.chain();676168 const refungible = 'refungible';62 const refungible = 'refungible';69 const scheduler = 'scheduler';63 const scheduler = 'scheduler';80 });74 });81 });75 });827683 it('Required pallets are present', async () => {77 itSub('Required pallets are present', async ({helper}) => {84 await usingApi(async api => {85 for (let i=0; i<requiredPallets.length; i++) {86 expect(getModuleNames(api)).to.include(requiredPallets[i]);78 expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets]);87 }88 });89 });79 });8090 it('Governance and consensus pallets are present', async () => {81 itSub('Governance and consensus pallets are present', async ({helper}) => {91 await usingApi(async api => {92 for (let i=0; i<consensusPallets.length; i++) {93 expect(getModuleNames(api)).to.include(consensusPallets[i]);82 expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets]);94 }95 });96 });83 });8497 it('No extra pallets are included', async () => {85 itSub('No extra pallets are included', async ({helper}) => {98 await usingApi(async api => {99 expect(getModuleNames(api).sort()).to.be.deep.equal([...requiredPallets, ...consensusPallets].sort());86 expect(helper.fetchAllPalletNames().sort()).to.be.deep.equal([...requiredPallets, ...consensusPallets].sort());100 });101 });87 });102});88});10389tests/src/refungible.test.tsdiffbeforeafterboth161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';1819import {usingPlaygrounds} from './util/playgrounds';20import {18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util/playgrounds';21 getModuleNames,22 Pallets,23 requirePallets,24} from './util/helpers';2526import chai from 'chai';27import chaiAsPromised from 'chai-as-promised';28chai.use(chaiAsPromised);29const expect = chai.expect;301931let alice: IKeyringPair;20let alice: IKeyringPair;32let bob: IKeyringPair;21let bob: IKeyringPair;33const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;22const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;342335describe('integration test: Refungible functionality:', async () => {24describe('integration test: Refungible functionality:', async () => {36 before(async function() {25 before(async function() {37 await requirePallets(this, [Pallets.ReFungible]);3839 await usingPlaygrounds(async (helper, privateKey) => {26 await usingPlaygrounds(async (helper, privateKey) => {27 requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);2840 alice = privateKey('//Alice');29 alice = privateKey('//Alice');41 bob = privateKey('//Bob');30 bob = privateKey('//Bob');42 if (!getModuleNames(helper.api!).includes(Pallets.ReFungible)) this.skip();43 });31 });44 });32 });45 33 46 it('Create refungible collection and token', async () => {34 itSub('Create refungible collection and token', async ({helper}) => {47 await usingPlaygrounds(async helper => {48 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});35 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});493650 const itemCountBefore = await collection.getLastTokenId();37 const itemCountBefore = await collection.getLastTokenId();51 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);38 const token = await collection.mintToken(alice, 100n);52 39 53 const itemCountAfter = await collection.getLastTokenId();40 const itemCountAfter = await collection.getLastTokenId();54 41 55 // What to expect42 // What to expect56 expect(token?.tokenId).to.be.gte(itemCountBefore);43 expect(token?.tokenId).to.be.gte(itemCountBefore);57 expect(itemCountAfter).to.be.equal(itemCountBefore + 1);44 expect(itemCountAfter).to.be.equal(itemCountBefore + 1);58 expect(itemCountAfter.toString()).to.be.equal(token?.tokenId.toString());45 expect(itemCountAfter.toString()).to.be.equal(token?.tokenId.toString());59 });60 });46 });61 47 62 it('Checking RPC methods when interacting with maximum allowed values (MAX_REFUNGIBLE_PIECES)', async () => {48 itSub('Checking RPC methods when interacting with maximum allowed values (MAX_REFUNGIBLE_PIECES)', async ({helper}) => {63 await usingPlaygrounds(async helper => {64 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});49 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});65 50 66 const token = await collection.mintToken(alice, {Substrate: alice.address}, MAX_REFUNGIBLE_PIECES);51 const token = await collection.mintToken(alice, MAX_REFUNGIBLE_PIECES);67 52 68 expect(await collection.getTokenBalance(token.tokenId, {Substrate: alice.address})).to.be.equal(MAX_REFUNGIBLE_PIECES);53 expect(await collection.getTokenBalance(token.tokenId, {Substrate: alice.address})).to.be.equal(MAX_REFUNGIBLE_PIECES);69 54 70 await collection.transferToken(alice, token.tokenId, {Substrate: bob.address}, MAX_REFUNGIBLE_PIECES);55 await collection.transferToken(alice, token.tokenId, {Substrate: bob.address}, MAX_REFUNGIBLE_PIECES);71 expect(await collection.getTokenBalance(token.tokenId, {Substrate: bob.address})).to.be.equal(MAX_REFUNGIBLE_PIECES);56 expect(await collection.getTokenBalance(token.tokenId, {Substrate: bob.address})).to.be.equal(MAX_REFUNGIBLE_PIECES);72 expect(await token.getTotalPieces()).to.be.equal(MAX_REFUNGIBLE_PIECES);57 expect(await token.getTotalPieces()).to.be.equal(MAX_REFUNGIBLE_PIECES);73 58 74 await expect(collection.mintToken(alice, {Substrate: alice.address}, MAX_REFUNGIBLE_PIECES + 1n)).to.eventually.be.rejected;59 await expect(collection.mintToken(alice, MAX_REFUNGIBLE_PIECES + 1n))75 });60 .to.eventually.be.rejectedWith(/refungible\.WrongRefungiblePieces/);76 });61 });77 62 78 it('RPC method tokenOnewrs for refungible collection and token', async () => {63 itSub('RPC method tokenOnewrs for refungible collection and token', async ({helper, privateKey}) => {79 await usingPlaygrounds(async (helper, privateKey) => {80 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};64 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};81 const facelessCrowd = Array(7).fill(0).map((_, i) => ({Substrate: privateKey(`//Alice+${i}`).address}));65 const facelessCrowd = Array(7).fill(0).map((_, i) => ({Substrate: privateKey(`//Alice+${i}`).address}));826683 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});67 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});846885 const token = await collection.mintToken(alice, {Substrate: alice.address}, 10_000n);69 const token = await collection.mintToken(alice, 10_000n);867087 await token.transfer(alice, {Substrate: bob.address}, 1000n);71 await token.transfer(alice, {Substrate: bob.address}, 1000n);88 await token.transfer(alice, ethAcc, 900n);72 await token.transfer(alice, ethAcc, 900n);100 const eleven = privateKey('//ALice+11');84 const eleven = privateKey('//ALice+11');101 expect(await token.transfer(alice, {Substrate: eleven.address}, 10n)).to.be.true;85 expect(await token.transfer(alice, {Substrate: eleven.address}, 10n)).to.be.true;102 expect((await token.getTop10Owners()).length).to.be.equal(10);86 expect((await token.getTop10Owners()).length).to.be.equal(10);103 });104 });87 });105 88 106 it('Transfer token pieces', async () => {89 itSub('Transfer token pieces', async ({helper}) => {107 await usingPlaygrounds(async helper => {108 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});90 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});109 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);91 const token = await collection.mintToken(alice, 100n);11092111 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);93 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);112 expect(await token.transfer(alice, {Substrate: bob.address}, 60n)).to.be.true;94 expect(await token.transfer(alice, {Substrate: bob.address}, 60n)).to.be.true;113 95 114 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(40n);96 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(40n);115 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(60n);97 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(60n);116 98 117 await expect(token.transfer(alice, {Substrate: bob.address}, 41n)).to.eventually.be.rejected;99 await expect(token.transfer(alice, {Substrate: bob.address}, 41n))118 });100 .to.eventually.be.rejectedWith(/common\.TokenValueTooLow/);119 });101 });120102121 it('Create multiple tokens', async () => {103 itSub('Create multiple tokens', async ({helper}) => {122 await usingPlaygrounds(async helper => {123 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});104 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});124 // TODO: fix mintMultipleTokens105 // TODO: fix mintMultipleTokens125 // await collection.mintMultipleTokens(alice, [106 // await collection.mintMultipleTokens(alice, [135 const lastTokenId = await collection.getLastTokenId();116 const lastTokenId = await collection.getLastTokenId();136 expect(lastTokenId).to.be.equal(3);117 expect(lastTokenId).to.be.equal(3);137 expect(await collection.getTokenBalance(lastTokenId, {Substrate: alice.address})).to.be.equal(100n);118 expect(await collection.getTokenBalance(lastTokenId, {Substrate: alice.address})).to.be.equal(100n);138 });139 });119 });140120141 it('Burn some pieces', async () => {121 itSub('Burn some pieces', async ({helper}) => {142 await usingPlaygrounds(async helper => {143 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});122 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});144 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);123 const token = await collection.mintToken(alice, 100n);145 expect(await collection.isTokenExists(token.tokenId)).to.be.true;124 expect(await collection.isTokenExists(token.tokenId)).to.be.true;146 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);125 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);147 expect((await token.burn(alice, 99n)).success).to.be.true;126 expect((await token.burn(alice, 99n)).success).to.be.true;148 expect(await collection.isTokenExists(token.tokenId)).to.be.true;127 expect(await collection.isTokenExists(token.tokenId)).to.be.true;149 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(1n);128 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(1n);150 });151 });129 });152130153 it('Burn all pieces', async () => {131 itSub('Burn all pieces', async ({helper}) => {154 await usingPlaygrounds(async helper => { 155 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});132 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});156 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);133 const token = await collection.mintToken(alice, 100n);157 134 158 expect(await collection.isTokenExists(token.tokenId)).to.be.true;135 expect(await collection.isTokenExists(token.tokenId)).to.be.true;159 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);136 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);160137161 expect((await token.burn(alice, 100n)).success).to.be.true;138 expect((await token.burn(alice, 100n)).success).to.be.true;162 expect(await collection.isTokenExists(token.tokenId)).to.be.false;139 expect(await collection.isTokenExists(token.tokenId)).to.be.false;163 });164 });140 });165141166 it('Burn some pieces for multiple users', async () => {142 itSub('Burn some pieces for multiple users', async ({helper}) => {167 await usingPlaygrounds(async helper => {168 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});143 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});169 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);144 const token = await collection.mintToken(alice, 100n);170145171 expect(await collection.isTokenExists(token.tokenId)).to.be.true;146 expect(await collection.isTokenExists(token.tokenId)).to.be.true;172 147 189 expect((await token.burn(bob, 1n)).success).to.be.true;164 expect((await token.burn(bob, 1n)).success).to.be.true;190165191 expect(await collection.isTokenExists(token.tokenId)).to.be.false;166 expect(await collection.isTokenExists(token.tokenId)).to.be.false;192 });193 });167 });194168195 it('Set allowance for token', async () => {169 itSub('Set allowance for token', async ({helper}) => {196 await usingPlaygrounds(async helper => {197 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});170 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});198 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);171 const token = await collection.mintToken(alice, 100n);199 172 200 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);173 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(100n);201174206 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(80n);179 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(80n);207 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(20n);180 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(20n);208 expect(await token.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(40n);181 expect(await token.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(40n);209 });210 });182 });211183212 it('Repartition', async () => {184 itSub('Repartition', async ({helper}) => {213 await usingPlaygrounds(async helper => {214 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});185 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});215 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);186 const token = await collection.mintToken(alice, 100n);216187217 expect(await token.repartition(alice, 200n)).to.be.true;188 expect(await token.repartition(alice, 200n)).to.be.true;218 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(200n);189 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(200n);222 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(90n);193 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(90n);223 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(110n);194 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(110n);224 195 225 await expect(token.repartition(alice, 80n)).to.eventually.be.rejected;196 await expect(token.repartition(alice, 80n))226 197 .to.eventually.be.rejectedWith(/refungible\.RepartitionWhileNotOwningAllPieces/);198 227 expect(await token.transfer(alice, {Substrate: bob.address}, 90n)).to.be.true;199 expect(await token.transfer(alice, {Substrate: bob.address}, 90n)).to.be.true;228 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(0n);200 expect(await token.getBalance({Substrate: alice.address})).to.be.equal(0n);229 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(200n);201 expect(await token.getBalance({Substrate: bob.address})).to.be.equal(200n);230202231 expect(await token.repartition(bob, 150n)).to.be.true;203 expect(await token.repartition(bob, 150n)).to.be.true;232 await expect(token.transfer(bob, {Substrate: alice.address}, 160n)).to.eventually.be.rejected;204 await expect(token.transfer(bob, {Substrate: alice.address}, 160n))233205 .to.eventually.be.rejectedWith(/common\.TokenValueTooLow/);234 });235 });206 });236207237 it('Repartition with increased amount', async () => {208 itSub('Repartition with increased amount', async ({helper}) => {238 await usingPlaygrounds(async helper => {239 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});209 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});240 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);210 const token = await collection.mintToken(alice, 100n);241 await token.repartition(alice, 200n);211 await token.repartition(alice, 200n);242 const chainEvents = helper.chainLog.slice(-1)[0].events.map((x: any) => x.event);212 const chainEvents = helper.chainLog.slice(-1)[0].events.map((x: any) => x.event);243 expect(chainEvents).to.include.deep.members([{213 expect(chainEvents).to.include.deep.members([{251 '100',221 '100',252 ],222 ],253 }]);223 }]);254 });255 });224 });256225257 it('Repartition with decreased amount', async () => {226 itSub('Repartition with decreased amount', async ({helper}) => {258 await usingPlaygrounds(async helper => {259 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});227 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});260 const token = await collection.mintToken(alice, {Substrate: alice.address}, 100n);228 const token = await collection.mintToken(alice, 100n);261 await token.repartition(alice, 50n);229 await token.repartition(alice, 50n);262 const chainEvents = helper.chainLog.slice(-1)[0].events.map((x: any) => x.event);230 const chainEvents = helper.chainLog.slice(-1)[0].events.map((x: any) => x.event);263 expect(chainEvents).to.include.deep.members([{231 expect(chainEvents).to.include.deep.members([{271 '50',239 '50',272 ],240 ],273 }]);241 }]);274 });275 });242 });276 243 277 it('Create new collection with properties', async () => {244 itSub('Create new collection with properties', async ({helper}) => {278 await usingPlaygrounds(async helper => {279 const properties = [{key: 'key1', value: 'val1'}];245 const properties = [{key: 'key1', value: 'val1'}];280 const tokenPropertyPermissions = [{key: 'key1', permission: {tokenOwner: true, mutable: false, collectionAdmin: true}}];246 const tokenPropertyPermissions = [{key: 'key1', permission: {tokenOwner: true, mutable: false, collectionAdmin: true}}];281 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test', properties, tokenPropertyPermissions});247 const collection = await helper.rft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test', properties, tokenPropertyPermissions});282 const info = await collection.getData();248 const info = await collection.getData();283 expect(info?.raw.properties).to.be.deep.equal(properties);249 expect(info?.raw.properties).to.be.deep.equal(properties);284 expect(info?.raw.tokenPropertyPermissions).to.be.deep.equal(tokenPropertyPermissions);250 expect(info?.raw.tokenPropertyPermissions).to.be.deep.equal(tokenPropertyPermissions);285 });286 });251 });287});252});288253tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';17import {IKeyringPair} from '@polkadot/types/types';19import {usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2021chai.use(chaiAsPromised);22const expect = chai.expect;231924describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {20describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {21 let alice: IKeyringPair;22 let bob: IKeyringPair;2324 before(async () => {25 await usingPlaygrounds(async (helper, privateKey) => {26 const donor = privateKey('//Alice');27 [alice, bob] = await helper.arrange.createAccounts([20n, 10n], donor);28 });29 });3025 it('Remove collection admin.', async () => {31 itSub('Remove collection admin', async ({helper}) => {26 await usingPlaygrounds(async (helper, privateKey) => {32 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionAdmin-1', tokenPrefix: 'RCA'});27 const alice = privateKey('//Alice');28 const bob = privateKey('//Bob');29 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});30 31 const collectionInfo = await collection.getData();33 const collectionInfo = await collection.getData();32 expect(collectionInfo?.raw.owner.toString()).to.be.deep.eq(alice.address);34 expect(collectionInfo?.raw.owner.toString()).to.be.deep.eq(alice.address);33 // first - add collection admin Bob35 // first - add collection admin Bob34 await collection.addAdmin(alice, {Substrate: bob.address});36 await collection.addAdmin(alice, {Substrate: bob.address});353736 const adminListAfterAddAdmin = await collection.getAdmins();38 const adminListAfterAddAdmin = await collection.getAdmins();37 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(bob.address)});39 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});384039 // then remove bob from admins of collection41 // then remove bob from admins of collection40 await collection.removeAdmin(alice, {Substrate: bob.address});42 await collection.removeAdmin(alice, {Substrate: bob.address});414342 const adminListAfterRemoveAdmin = await collection.getAdmins();44 const adminListAfterRemoveAdmin = await collection.getAdmins();43 expect(adminListAfterRemoveAdmin).not.to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(bob.address)});45 expect(adminListAfterRemoveAdmin).not.to.be.deep.contains({Substrate: bob.address});44 });45 });46 });464747 it('Remove admin from collection that has no admins', async () => {48 itSub('Remove admin from collection that has no admins', async ({helper}) => {48 await usingPlaygrounds(async (helper, privateKey) => {49 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionAdmin-2', tokenPrefix: 'RCA'});49 const alice = privateKey('//Alice');50 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});515052 const adminListBeforeAddAdmin = await collection.getAdmins();51 const adminListBeforeAddAdmin = await collection.getAdmins();53 expect(adminListBeforeAddAdmin).to.have.lengthOf(0);52 expect(adminListBeforeAddAdmin).to.have.lengthOf(0);545355 // await expect(collection.removeAdmin(alice, {Substrate: alice.address})).to.be.rejectedWith('Unable to remove collection admin');56 await collection.removeAdmin(alice, {Substrate: alice.address});54 await collection.removeAdmin(alice, {Substrate: alice.address});57 });58 });55 });59});56});605761describe('Negative Integration Test removeCollectionAdmin(collection_id, account_id):', () => {58describe('Negative Integration Test removeCollectionAdmin(collection_id, account_id):', () => {59 let alice: IKeyringPair;60 let bob: IKeyringPair;61 let charlie: IKeyringPair;6263 before(async () => {64 await usingPlaygrounds(async (helper, privateKey) => {65 const donor = privateKey('//Alice');66 [alice, bob, charlie] = await helper.arrange.createAccounts([20n, 10n, 10n], donor);67 });68 });6962 it('Can\'t remove collection admin from not existing collection', async () => {70 itSub('Can\'t remove collection admin from not existing collection', async ({helper}) => {63 await usingPlaygrounds(async (helper, privateKey) => {64 // tslint:disable-next-line: no-bitwise65 const collectionId = (1 << 32) - 1;71 const collectionId = (1 << 32) - 1;66 const alice = privateKey('//Alice');67 const bob = privateKey('//Bob');687269 await expect(helper.collection.removeAdmin(alice, collectionId, {Substrate: bob.address})).to.be.rejected;73 await expect(helper.collection.removeAdmin(alice, collectionId, {Substrate: bob.address}))7074 .to.be.rejectedWith(/common\.CollectionNotFound/);71 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)72 await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});73 });74 });75 });757676 it('Can\'t remove collection admin from deleted collection', async () => {77 itSub('Can\'t remove collection admin from deleted collection', async ({helper}) => {77 await usingPlaygrounds(async (helper, privateKey) => {78 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionAdmin-Neg-2', tokenPrefix: 'RCA'});78 const alice = privateKey('//Alice');79 const bob = privateKey('//Bob');80 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});817982 expect(await collection.burn(alice)).to.be.true;80 expect(await collection.burn(alice)).to.be.true;838184 await expect(helper.collection.removeAdmin(alice, collection.collectionId, {Substrate: bob.address})).to.be.rejected;82 await expect(helper.collection.removeAdmin(alice, collection.collectionId, {Substrate: bob.address}))8583 .to.be.rejectedWith(/common\.CollectionNotFound/);86 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)87 await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});88 });89 });84 });908591 it('Regular user can\'t remove collection admin', async () => {86 itSub('Regular user can\'t remove collection admin', async ({helper}) => {92 await usingPlaygrounds(async (helper, privateKey) => {87 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionAdmin-Neg-3', tokenPrefix: 'RCA'});93 const alice = privateKey('//Alice');94 const bob = privateKey('//Bob');95 const charlie = privateKey('//Charlie');96 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});978898 await collection.addAdmin(alice, {Substrate: bob.address});89 await collection.addAdmin(alice, {Substrate: bob.address});9990100 await expect(collection.removeAdmin(charlie, {Substrate: bob.address})).to.be.rejected;91 await expect(collection.removeAdmin(charlie, {Substrate: bob.address}))10192 .to.be.rejectedWith(/common\.NoPermission/);102 // Verifying that nothing bad happened (network is live, new collections can be created, etc.)103 await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});104 });105 });93 });10694107 it('Admin can\'t remove collection admin.', async () => {95 itSub('Admin can\'t remove collection admin.', async ({helper}) => {108 await usingPlaygrounds(async (helper, privateKey) => {96 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionAdmin-Neg-4', tokenPrefix: 'RCA'});109 const alice = privateKey('//Alice');97 110 const bob = privateKey('//Bob');111 const charlie = privateKey('//Charlie');112 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});113 114 await collection.addAdmin(alice, {Substrate: bob.address});98 await collection.addAdmin(alice, {Substrate: bob.address});115 await collection.addAdmin(alice, {Substrate: charlie.address});99 await collection.addAdmin(alice, {Substrate: charlie.address});116100117 const adminListAfterAddAdmin = await collection.getAdmins();101 const adminListAfterAddAdmin = await collection.getAdmins();118 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(bob.address)});102 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: bob.address});119 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(charlie.address)});103 expect(adminListAfterAddAdmin).to.be.deep.contains({Substrate: charlie.address});120104121 await expect(collection.removeAdmin(charlie, {Substrate: bob.address})).to.be.rejected;105 await expect(collection.removeAdmin(charlie, {Substrate: bob.address}))106 .to.be.rejectedWith(/common\.NoPermission/);122107123 const adminListAfterRemoveAdmin = await collection.getAdmins();108 const adminListAfterRemoveAdmin = await collection.getAdmins();124 expect(adminListAfterRemoveAdmin).to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(bob.address)});109 expect(adminListAfterRemoveAdmin).to.be.deep.contains({Substrate: bob.address});125 expect(adminListAfterRemoveAdmin).to.be.deep.contains({Substrate: helper.address.normalizeSubstrate(charlie.address)});110 expect(adminListAfterRemoveAdmin).to.be.deep.contains({Substrate: charlie.address});126 });127 });111 });128});112});129113tests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {default as usingApi, submitTransactionExpectFailAsync} from './substrate/substrate-api';17import {IKeyringPair} from '@polkadot/types/types';20import {18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';21 createCollectionExpectSuccess,22 setCollectionSponsorExpectSuccess,23 destroyCollectionExpectSuccess,24 confirmSponsorshipExpectSuccess,25 confirmSponsorshipExpectFailure,26 createItemExpectSuccess,27 findUnusedAddress,28 removeCollectionSponsorExpectSuccess,29 removeCollectionSponsorExpectFailure,30 normalizeAccountId,31 addCollectionAdminExpectSuccess,32 getCreatedCollectionCount,33} from './util/helpers';34import {IKeyringPair} from '@polkadot/types/types';3536chai.use(chaiAsPromised);37const expect = chai.expect;3839let alice: IKeyringPair;40let bob: IKeyringPair;411942describe('integration test: ext. removeCollectionSponsor():', () => {20describe('integration test: ext. removeCollectionSponsor():', () => {21 let donor: IKeyringPair;22 let alice: IKeyringPair;23 let bob: IKeyringPair;432444 before(async () => {25 before(async () => {45 await usingApi(async (api, privateKeyWrapper) => {26 await usingPlaygrounds(async (helper, privateKey) => {46 alice = privateKeyWrapper('//Alice');27 donor = privateKey('//Alice');47 bob = privateKeyWrapper('//Bob');28 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);48 });29 });49 });30 });503151 it('Removing NFT collection sponsor stops sponsorship', async () => {32 itSub('Removing NFT collection sponsor stops sponsorship', async ({helper}) => {52 const collectionId = await createCollectionExpectSuccess();33 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-1', tokenPrefix: 'RCS'});53 await setCollectionSponsorExpectSuccess(collectionId, bob.address);34 await collection.setSponsor(alice, bob.address);54 await confirmSponsorshipExpectSuccess(collectionId, '//Bob');35 await collection.confirmSponsorship(bob);55 await removeCollectionSponsorExpectSuccess(collectionId);36 await collection.removeSponsor(alice);563757 await usingApi(async (api, privateKeyWrapper) => {58 // Find unused address38 // Find unused address59 const zeroBalance = await findUnusedAddress(api, privateKeyWrapper);39 const [zeroBalance] = await helper.arrange.createAccounts([0n], donor);604061 // Mint token for unused address41 // Mint token for unused address62 const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', zeroBalance.address);42 const token = await collection.mintToken(alice, {Substrate: zeroBalance.address});634364 // Transfer this tokens from unused address to Alice - should fail44 // Transfer this tokens from unused address to Alice - should fail65 const sponsorBalanceBefore = (await api.query.system.account(bob.address)).data.free.toBigInt();45 const sponsorBalanceBefore = await helper.balance.getSubstrate(bob.address);66 const zeroToAlice = api.tx.unique.transfer(normalizeAccountId(alice.address), collectionId, itemId, 0);67 const badTransaction = async function () {68 await submitTransactionExpectFailAsync(zeroBalance, zeroToAlice);69 };70 await expect(badTransaction()).to.be.rejectedWith('Inability to pay some fees');46 await expect(token.transfer(zeroBalance, {Substrate: alice.address}))47 .to.be.rejectedWith('Inability to pay some fees');71 const sponsorBalanceAfter = (await api.query.system.account(bob.address)).data.free.toBigInt();48 const sponsorBalanceAfter = await helper.balance.getSubstrate(bob.address);724973 expect(sponsorBalanceAfter).to.be.equal(sponsorBalanceBefore);50 expect(sponsorBalanceAfter).to.be.equal(sponsorBalanceBefore);74 });75 });51 });765277 it('Remove a sponsor after it was already removed', async () => {53 itSub('Remove a sponsor after it was already removed', async ({helper}) => {78 const collectionId = await createCollectionExpectSuccess();54 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-2', tokenPrefix: 'RCS'});79 await setCollectionSponsorExpectSuccess(collectionId, bob.address);55 await collection.setSponsor(alice, bob.address);80 await confirmSponsorshipExpectSuccess(collectionId, '//Bob');56 await collection.confirmSponsorship(bob);81 await removeCollectionSponsorExpectSuccess(collectionId);57 await expect(collection.removeSponsor(alice)).to.not.be.rejected;82 await removeCollectionSponsorExpectSuccess(collectionId);58 await expect(collection.removeSponsor(alice)).to.not.be.rejected;83 });59 });846085 it('Remove sponsor in a collection that never had the sponsor set', async () => {61 itSub('Remove sponsor in a collection that never had the sponsor set', async ({helper}) => {86 const collectionId = await createCollectionExpectSuccess();62 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-3', tokenPrefix: 'RCS'});87 await removeCollectionSponsorExpectSuccess(collectionId);63 await expect(collection.removeSponsor(alice)).to.not.be.rejected;88 });64 });896590 it('Remove sponsor for a collection that had the sponsor set, but not confirmed', async () => {66 itSub('Remove sponsor for a collection that had the sponsor set, but not confirmed', async ({helper}) => {91 const collectionId = await createCollectionExpectSuccess();67 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-4', tokenPrefix: 'RCS'});92 await setCollectionSponsorExpectSuccess(collectionId, bob.address);68 await collection.setSponsor(alice, bob.address);93 await removeCollectionSponsorExpectSuccess(collectionId);69 await expect(collection.removeSponsor(alice)).to.not.be.rejected;94 });70 });957196});72});977398describe('(!negative test!) integration test: ext. removeCollectionSponsor():', () => {74describe('(!negative test!) integration test: ext. removeCollectionSponsor():', () => {75 let alice: IKeyringPair;76 let bob: IKeyringPair;77 let charlie: IKeyringPair;7899 before(async () => {79 before(async () => {100 await usingApi(async (api, privateKeyWrapper) => {80 await usingPlaygrounds(async (helper, privateKey) => {101 alice = privateKeyWrapper('//Alice');81 const donor = privateKey('//Alice');102 bob = privateKeyWrapper('//Bob');82 [alice, bob, charlie] = await helper.arrange.createAccounts([20n, 10n, 10n], donor);103 });83 });104 });84 });10585106 it('(!negative test!) Remove sponsor for a collection that never existed', async () => {86 itSub('(!negative test!) Remove sponsor for a collection that never existed', async ({helper}) => {107 // Find the collection that never existed108 let collectionId = 0;87 const collectionId = (1 << 32) - 1;109 await usingApi(async (api) => {88 await expect(helper.collection.removeSponsor(alice, collectionId)).to.be.rejectedWith(/common\.CollectionNotFound/);110 collectionId = await getCreatedCollectionCount(api) + 1;111 });112113 await removeCollectionSponsorExpectFailure(collectionId);114 });89 });11590116 it('(!negative test!) Remove sponsor for a collection with collection admin permissions', async () => {91 itSub('(!negative test!) Remove sponsor for a collection with collection admin permissions', async ({helper}) => {117 const collectionId = await createCollectionExpectSuccess();92 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-Neg-1', tokenPrefix: 'RCS'});118 await setCollectionSponsorExpectSuccess(collectionId, bob.address);93 await collection.setSponsor(alice, bob.address);119 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);94 await collection.addAdmin(alice, {Substrate: charlie.address});120 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');95 await expect(collection.removeSponsor(charlie)).to.be.rejectedWith(/common\.NoPermission/);121 });96 });12297123 it('(!negative test!) Remove sponsor for a collection by regular user', async () => {98 itSub('(!negative test!) Remove sponsor for a collection by regular user', async ({helper}) => {124 const collectionId = await createCollectionExpectSuccess();99 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-Neg-2', tokenPrefix: 'RCS'});125 await setCollectionSponsorExpectSuccess(collectionId, bob.address);100 await collection.setSponsor(alice, bob.address);126 await removeCollectionSponsorExpectFailure(collectionId, '//Bob');101 await expect(collection.removeSponsor(charlie)).to.be.rejectedWith(/common\.NoPermission/);127 });102 });128103129 it('(!negative test!) Remove sponsor in a destroyed collection', async () => {104 itSub('(!negative test!) Remove sponsor in a destroyed collection', async ({helper}) => {130 const collectionId = await createCollectionExpectSuccess();105 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-Neg-3', tokenPrefix: 'RCS'});131 await setCollectionSponsorExpectSuccess(collectionId, bob.address);106 await collection.setSponsor(alice, bob.address);132 await destroyCollectionExpectSuccess(collectionId);107 await collection.burn(alice);133 await removeCollectionSponsorExpectFailure(collectionId);108 await expect(collection.removeSponsor(alice)).to.be.rejectedWith(/common\.CollectionNotFound/);134 });109 });135110136 it('Set - remove - confirm: fails', async () => {111 itSub('Set - remove - confirm: fails', async ({helper}) => {137 const collectionId = await createCollectionExpectSuccess();112 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-Neg-4', tokenPrefix: 'RCS'});138 await setCollectionSponsorExpectSuccess(collectionId, bob.address);113 await collection.setSponsor(alice, bob.address);139 await removeCollectionSponsorExpectSuccess(collectionId);114 await collection.removeSponsor(alice);140 await confirmSponsorshipExpectFailure(collectionId, '//Bob');115 await expect(collection.confirmSponsorship(bob)).to.be.rejectedWith(/unique\.ConfirmUnsetSponsorFail/);141 });116 });142117143 it('Set - confirm - remove - confirm: Sponsor cannot come back', async () => {118 itSub('Set - confirm - remove - confirm: Sponsor cannot come back', async ({helper}) => {144 const collectionId = await createCollectionExpectSuccess();119 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveCollectionSponsor-Neg-5', tokenPrefix: 'RCS'});145 await setCollectionSponsorExpectSuccess(collectionId, bob.address);120 await collection.setSponsor(alice, bob.address);146 await confirmSponsorshipExpectSuccess(collectionId, '//Bob');121 await collection.confirmSponsorship(bob);147 await removeCollectionSponsorExpectSuccess(collectionId);122 await collection.removeSponsor(alice);148 await confirmSponsorshipExpectFailure(collectionId, '//Bob');123 await expect(collection.confirmSponsorship(bob)).to.be.rejectedWith(/unique\.ConfirmUnsetSponsorFail/);149 });124 });150151});125});tests/src/removeFromAllowList.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {default as usingApi} from './substrate/substrate-api';17import {IKeyringPair} from '@polkadot/types/types';20import {18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';21 createCollectionExpectSuccess,22 destroyCollectionExpectSuccess,23 enableAllowListExpectSuccess,24 addToAllowListExpectSuccess,25 removeFromAllowListExpectSuccess,26 isAllowlisted,27 findNotExistingCollection,28 removeFromAllowListExpectFailure,29 disableAllowListExpectSuccess,30 normalizeAccountId,31 addCollectionAdminExpectSuccess,32} from './util/helpers';33import {IKeyringPair} from '@polkadot/types/types';3435chai.use(chaiAsPromised);36const expect = chai.expect;371938describe('Integration Test removeFromAllowList', () => {20describe('Integration Test removeFromAllowList', () => {39 let alice: IKeyringPair;21 let alice: IKeyringPair;40 let bob: IKeyringPair;22 let bob: IKeyringPair;412342 before(async () => {24 before(async () => {43 await usingApi(async (api, privateKeyWrapper) => {25 await usingPlaygrounds(async (helper, privateKey) => {44 alice = privateKeyWrapper('//Alice');26 const donor = privateKey('//Alice');45 bob = privateKeyWrapper('//Bob');27 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);46 });28 });47 });29 });483049 it('ensure bob is not in allowlist after removal', async () => {31 itSub('ensure bob is not in allowlist after removal', async ({helper}) => {50 await usingApi(async api => {32 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-1', tokenPrefix: 'RFAL'});3334 const collectionInfo = await collection.getData();51 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});35 expect(collectionInfo!.raw.permissions.access).to.not.equal('AllowList');3652 await enableAllowListExpectSuccess(alice, collectionId);37 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});53 await addToAllowListExpectSuccess(alice, collectionId, bob.address);38 await collection.addToAllowList(alice, {Substrate: bob.address});5439 expect(await collection.getAllowList()).to.deep.contains({Substrate: bob.address});40 55 await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(bob.address));41 await collection.removeFromAllowList(alice, {Substrate: bob.address});56 expect(await isAllowlisted(api, collectionId, bob.address)).to.be.false;42 expect(await collection.getAllowList()).to.be.empty;57 });58 });43 });594460 it('allows removal from collection with unset allowlist status', async () => {45 itSub('allows removal from collection with unset allowlist status', async ({helper}) => {61 await usingApi(async () => {46 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-2', tokenPrefix: 'RFAL'});4762 const collectionWithoutAllowlistId = await createCollectionExpectSuccess();48 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});63 await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);49 await collection.addToAllowList(alice, {Substrate: bob.address});64 await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, bob.address);50 expect(await collection.getAllowList()).to.deep.contains({Substrate: bob.address});5165 await disableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);52 await collection.setPermissions(alice, {access: 'Normal'});6653 67 await removeFromAllowListExpectSuccess(alice, collectionWithoutAllowlistId, normalizeAccountId(bob.address));54 await collection.removeFromAllowList(alice, {Substrate: bob.address});68 });55 expect(await collection.getAllowList()).to.be.empty;69 });56 });70});57});715874 let bob: IKeyringPair;61 let bob: IKeyringPair;756276 before(async () => {63 before(async () => {77 await usingApi(async (api, privateKeyWrapper) => {64 await usingPlaygrounds(async (helper, privateKey) => {78 alice = privateKeyWrapper('//Alice');65 const donor = privateKey('//Alice');79 bob = privateKeyWrapper('//Bob');66 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);80 });67 });81 });68 });826983 it('fails on removal from not existing collection', async () => {70 itSub('fails on removal from not existing collection', async ({helper}) => {71 const nonExistentCollectionId = (1 << 32) - 1;84 await usingApi(async (api) => {72 await expect(helper.collection.removeFromAllowList(alice, nonExistentCollectionId, {Substrate: alice.address}))85 const collectionId = await findNotExistingCollection(api);8687 await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));88 });73 .to.be.rejectedWith(/common\.CollectionNotFound/);89 });74 });907591 it('fails on removal from removed collection', async () => {76 itSub('fails on removal from removed collection', async ({helper}) => {92 await usingApi(async () => {77 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-3', tokenPrefix: 'RFAL'});93 const collectionId = await createCollectionExpectSuccess();78 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});94 await enableAllowListExpectSuccess(alice, collectionId);95 await addToAllowListExpectSuccess(alice, collectionId, bob.address);79 await collection.addToAllowList(alice, {Substrate: bob.address});8096 await destroyCollectionExpectSuccess(collectionId);81 await collection.burn(alice);9798 await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));82 await expect(collection.removeFromAllowList(alice, {Substrate: bob.address}))99 });83 .to.be.rejectedWith(/common\.CollectionNotFound/);100 });84 });101});85});10286106 let charlie: IKeyringPair;90 let charlie: IKeyringPair;10791108 before(async () => {92 before(async () => {109 await usingApi(async (api, privateKeyWrapper) => {93 await usingPlaygrounds(async (helper, privateKey) => {110 alice = privateKeyWrapper('//Alice');94 const donor = privateKey('//Alice');111 bob = privateKeyWrapper('//Bob');95 [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);112 charlie = privateKeyWrapper('//Charlie');113 });96 });114 });97 });11598116 it('ensure address is not in allowlist after removal', async () => {99 itSub('ensure address is not in allowlist after removal', async ({helper}) => {117 await usingApi(async api => {100 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-4', tokenPrefix: 'RFAL'});101 118 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});102 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});119 await enableAllowListExpectSuccess(alice, collectionId);120 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);103 await collection.addAdmin(alice, {Substrate: bob.address});104121 await addToAllowListExpectSuccess(alice, collectionId, charlie.address);105 await collection.addToAllowList(bob, {Substrate: charlie.address});122 await removeFromAllowListExpectSuccess(bob, collectionId, normalizeAccountId(charlie.address));106 await collection.removeFromAllowList(bob, {Substrate: charlie.address});107123 expect(await isAllowlisted(api, collectionId, charlie.address)).to.be.false;108 expect(await collection.getAllowList()).to.be.empty;124 });125 });109 });126110127 it('Collection admin allowed to remove from allowlist with unset allowlist status', async () => {111 itSub('Collection admin allowed to remove from allowlist with unset allowlist status', async ({helper}) => {128 await usingApi(async () => {112 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-5', tokenPrefix: 'RFAL'});113129 const collectionWithoutAllowlistId = await createCollectionExpectSuccess();114 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});130 await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);131 await addCollectionAdminExpectSuccess(alice, collectionWithoutAllowlistId, bob.address);115 await collection.addAdmin(alice, {Substrate: bob.address});132 await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, charlie.address);116 await collection.addToAllowList(alice, {Substrate: charlie.address});117133 await disableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);118 await collection.setPermissions(bob, {access: 'Normal'});134 await removeFromAllowListExpectSuccess(bob, collectionWithoutAllowlistId, normalizeAccountId(charlie.address));119 await collection.removeFromAllowList(bob, {Substrate: charlie.address});120135 });121 expect(await collection.getAllowList()).to.be.empty;136 });122 });137123138 it('Regular user can`t remove from allowlist', async () => {124 itSub('Regular user can`t remove from allowlist', async ({helper}) => {139 await usingApi(async () => {125 const collection = await helper.nft.mintCollection(alice, {name: 'RemoveFromAllowList-6', tokenPrefix: 'RFAL'});126140 const collectionWithoutAllowlistId = await createCollectionExpectSuccess();127 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});141 await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);128 await collection.addToAllowList(alice, {Substrate: charlie.address});129142 await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, charlie.address);130 await expect(collection.removeFromAllowList(bob, {Substrate: charlie.address}))131 .to.be.rejectedWith(/common\.NoPermission/);143 await removeFromAllowListExpectFailure(bob, collectionWithoutAllowlistId, normalizeAccountId(charlie.address));132 expect(await collection.getAllowList()).to.deep.contain({Substrate: charlie.address});144 });145 });133 });146});134});147135tests/src/removeFromContractAllowList.test.tsdiffbeforeafterboth20import {IKeyringPair} from '@polkadot/types/types';20import {IKeyringPair} from '@polkadot/types/types';21import {expect} from 'chai';21import {expect} from 'chai';222223// todo:playgrounds skipped again23describe.skip('Integration Test removeFromContractAllowList', () => {24describe.skip('Integration Test removeFromContractAllowList', () => {24 let bob: IKeyringPair;25 let bob: IKeyringPair;2526tests/src/rpc.test.tsdiffbeforeafterboth1// 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/>.161import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';2import {expect} from 'chai';18import {usingPlaygrounds, itSub, expect} from './util/playgrounds';3import usingApi from './substrate/substrate-api';4import {createCollection, createCollectionExpectSuccess, createFungibleItemExpectSuccess, CrossAccountId, getTokenOwner, normalizeAccountId, transfer, U128_MAX} from './util/helpers';19import {crossAccountIdFromLower} from './util/playgrounds/unique';56let alice: IKeyringPair;7let bob: IKeyringPair;892010describe('integration test: RPC methods', () => {21describe('integration test: RPC methods', () => {22 let donor: IKeyringPair;23 let alice: IKeyringPair;24 let bob: IKeyringPair;2511 before(async () => {26 before(async () => {12 await usingApi(async (api, privateKeyWrapper) => {27 await usingPlaygrounds(async (helper, privateKey) => {13 alice = privateKeyWrapper('//Alice');28 donor = privateKey('//Alice');14 bob = privateKeyWrapper('//Bob');29 [alice, bob] = await helper.arrange.createAccounts([20n, 10n], donor);15 });30 });16 });31 });173218 19 it('returns None for fungible collection', async () => {33 itSub('returns None for fungible collection', async ({helper}) => {20 await usingApi(async api => {21 const collection = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});34 const collection = await helper.ft.mintCollection(alice, {name: 'RPC-1', tokenPrefix: 'RPC'});22 await expect(getTokenOwner(api, collection, 0)).to.be.rejectedWith(/^owner == null$/);23 });35 const owner = (await helper.callRpc('api.rpc.unique.tokenOwner', [collection.collectionId, 0])).toJSON() as any;36 expect(owner).to.be.null;24 });37 });25 38 26 it('RPC method tokenOwners for fungible collection and token', async () => {39 itSub('RPC method tokenOwners for fungible collection and token', async ({helper}) => {27 await usingApi(async (api, privateKeyWrapper) => {40 // Set-up a few token owners of all stripes28 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};41 const ethAcc = {Ethereum: '0x67fb3503a61b284dc83fa96dceec4192db47dc7c'};29 const facelessCrowd = Array.from(Array(7).keys()).map(i => normalizeAccountId(privateKeyWrapper(i.toString())));42 const facelessCrowd = (await helper.arrange.createAccounts([0n, 0n, 0n, 0n, 0n, 0n, 0n], donor))30 43 .map(i => {return {Substrate: i.address};});44 31 const createCollectionResult = await createCollection(api, alice, {mode: {type: 'Fungible', decimalPoints: 0}});45 const collection = await helper.ft.mintCollection(alice, {name: 'RPC-2', tokenPrefix: 'RPC'});32 const collectionId = createCollectionResult.collectionId;46 // mint some maximum (u128) amounts of tokens possible33 const aliceTokenId = await createFungibleItemExpectSuccess(alice, collectionId, {Value: U128_MAX}, alice.address);47 await collection.mint(alice, (1n << 128n) - 1n);34 48 35 await transfer(api, collectionId, aliceTokenId, alice, bob, 1000n);49 await collection.transfer(alice, {Substrate: bob.address}, 1000n);36 await transfer(api, collectionId, aliceTokenId, alice, ethAcc, 900n);50 await collection.transfer(alice, ethAcc, 900n);37 51 38 for (let i = 0; i < 7; i++) {52 for (let i = 0; i < facelessCrowd.length; i++) {39 await transfer(api, collectionId, aliceTokenId, alice, facelessCrowd[i], 1);53 await collection.transfer(alice, facelessCrowd[i], 1n);40 } 54 }41 55 // Set-up over5642 const owners = await api.rpc.unique.tokenOwners(collectionId, aliceTokenId);57 const owners = await helper.callRpc('api.rpc.unique.tokenOwners', [collection.collectionId, 0]);43 const ids = (owners.toJSON() as CrossAccountId[]).map(s => normalizeAccountId(s));58 const ids = (owners.toJSON() as any[]).map(crossAccountIdFromLower);44 const aliceID = normalizeAccountId(alice);5945 const bobId = normalizeAccountId(bob);4647 // What to expect48 // tslint:disable-next-line:no-unused-expression49 expect(ids).to.deep.include.members([aliceID, ethAcc, bobId, ...facelessCrowd]);60 expect(ids).to.deep.include.members([{Substrate: alice.address}, ethAcc, {Substrate: bob.address}, ...facelessCrowd]);50 expect(owners.length == 10).to.be.true;61 expect(owners.length == 10).to.be.true;51 62 63 // Make sure only 10 results are returned with this RPC52 const eleven = privateKeyWrapper('11');64 const [eleven] = await helper.arrange.createAccounts([0n], donor);53 expect(await transfer(api, collectionId, aliceTokenId, alice, eleven, 10n)).to.be.true;65 expect(await collection.transfer(alice, {Substrate: eleven.address}, 10n)).to.be.true;54 expect((await api.rpc.unique.tokenOwners(collectionId, aliceTokenId)).length).to.be.equal(10);66 expect((await helper.callRpc('api.rpc.unique.tokenOwners', [collection.collectionId, 0])).length).to.be.equal(10);55 });56 });67 });57});68});tests/src/scheduler.test.tsdiffbeforeafterboth444445chai.use(chaiAsPromised);45chai.use(chaiAsPromised);464647// todo:playgrounds skipped ~ postponed47describe.skip('Scheduling token and balance transfers', () => {48describe.skip('Scheduling token and balance transfers', () => {48 let alice: IKeyringPair;49 let alice: IKeyringPair;49 let bob: IKeyringPair;50 let bob: IKeyringPair;tests/src/setChainLimits.test.tsdiffbeforeafterboth23 IChainLimits,23 IChainLimits,24} from './util/helpers';24} from './util/helpers';252526// todo:playgrounds skipped ~ postponed26describe.skip('Negative Integration Test setChainLimits', () => {27describe.skip('Negative Integration Test setChainLimits', () => {27 let alice: IKeyringPair;28 let alice: IKeyringPair;28 let bob: IKeyringPair;29 let bob: IKeyringPair;tests/src/setCollectionLimits.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {ApiPromise} from '@polkadot/api';19import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';20import chai from 'chai';21import chaiAsPromised from 'chai-as-promised';22import usingApi, {submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';23import {19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';24 createCollectionExpectSuccess, getCreatedCollectionCount,25 getCreateItemResult,26 setCollectionLimitsExpectFailure,27 setCollectionLimitsExpectSuccess,28 addCollectionAdminExpectSuccess,29 queryCollectionExpectSuccess,30} from './util/helpers';3132chai.use(chaiAsPromised);33const expect = chai.expect;3435let alice: IKeyringPair;36let bob: IKeyringPair;37let collectionIdForTesting: number;382039const accountTokenOwnershipLimit = 0;21const accountTokenOwnershipLimit = 0;40const sponsoredDataSize = 0;22const sponsoredDataSize = 0;41const sponsorTransferTimeout = 1;23const sponsorTransferTimeout = 1;42const tokenLimit = 10;24const tokenLimit = 10;432544describe('setCollectionLimits positive', () => {26describe('setCollectionLimits positive', () => {45 let tx;27 let alice: IKeyringPair;28 let bob: IKeyringPair;2946 before(async () => {30 before(async () => {47 await usingApi(async (api, privateKeyWrapper) => {31 await usingPlaygrounds(async (helper, privateKey) => {48 alice = privateKeyWrapper('//Alice');32 const donor = privateKey('//Alice');49 bob = privateKeyWrapper('//Bob');50 collectionIdForTesting = await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});33 [alice, bob] = await helper.arrange.createAccounts([20n, 10n], donor);51 });34 });52 });35 });3653 it('execute setCollectionLimits with predefined params ', async () => {37 itSub('execute setCollectionLimits with predefined params', async ({helper}) => {54 await usingApi(async (api: ApiPromise) => {55 tx = api.tx.unique.setCollectionLimits(56 collectionIdForTesting,57 {58 accountTokenOwnershipLimit: accountTokenOwnershipLimit,59 sponsoredDataSize: sponsoredDataSize,60 tokenLimit: tokenLimit,61 sponsorTransferTimeout,62 ownerCanTransfer: true,63 ownerCanDestroy: true,64 },65 );38 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-1', tokenPrefix: 'SCL'});3966 const events = await submitTransactionAsync(alice, tx);40 await collection.setLimits(67 const result = getCreateItemResult(events);41 alice,42 {43 accountTokenOwnershipLimit,44 sponsoredDataSize,45 tokenLimit,46 sponsorTransferTimeout,47 ownerCanTransfer: true,48 ownerCanDestroy: true,49 },50 );685169 // get collection limits defined previously52 // get collection limits defined previously70 const collectionInfo = await queryCollectionExpectSuccess(api, collectionIdForTesting);53 const collectionInfo = await collection.getEffectiveLimits();715472 // tslint:disable-next-line:no-unused-expression73 expect(result.success).to.be.true;74 expect(collectionInfo.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.be.equal(accountTokenOwnershipLimit);55 expect(collectionInfo.accountTokenOwnershipLimit).to.be.equal(accountTokenOwnershipLimit);75 expect(collectionInfo.limits.sponsoredDataSize.unwrap().toNumber()).to.be.equal(sponsoredDataSize);56 expect(collectionInfo.sponsoredDataSize).to.be.equal(sponsoredDataSize);76 expect(collectionInfo.limits.tokenLimit.unwrap().toNumber()).to.be.equal(tokenLimit);57 expect(collectionInfo.tokenLimit).to.be.equal(tokenLimit);77 expect(collectionInfo.limits.sponsorTransferTimeout.unwrap().toNumber()).to.be.equal(sponsorTransferTimeout);58 expect(collectionInfo.sponsorTransferTimeout).to.be.equal(sponsorTransferTimeout);78 expect(collectionInfo.limits.ownerCanTransfer.unwrap().toJSON()).to.be.true;59 expect(collectionInfo.ownerCanTransfer).to.be.true;79 expect(collectionInfo.limits.ownerCanDestroy.unwrap().toJSON()).to.be.true;60 expect(collectionInfo.ownerCanDestroy).to.be.true;80 });81 });61 });826283 it('Set the same token limit twice', async () => {63 itSub('Set the same token limit twice', async ({helper}) => {84 await usingApi(async (api: ApiPromise) => {64 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-2', tokenPrefix: 'SCL'});856586 const collectionLimits = {66 const collectionLimits = {87 accountTokenOwnershipLimit: accountTokenOwnershipLimit,67 accountTokenOwnershipLimit,88 sponsoredMintSize: sponsoredDataSize,68 sponsoredDataSize,89 tokenLimit: tokenLimit,69 tokenLimit,90 sponsorTransferTimeout,70 sponsorTransferTimeout,91 ownerCanTransfer: true,71 ownerCanTransfer: true,92 ownerCanDestroy: true,72 ownerCanDestroy: true,73 };7493 };75 await collection.setLimits(alice, collectionLimits);947695 // The first time96 const tx1 = api.tx.unique.setCollectionLimits(97 collectionIdForTesting,98 collectionLimits,99 );100 const events1 = await submitTransactionAsync(alice, tx1);101 const result1 = getCreateItemResult(events1);102 expect(result1.success).to.be.true;103 const collectionInfo1 = await queryCollectionExpectSuccess(api, collectionIdForTesting);77 const collectionInfo1 = await collection.getEffectiveLimits();78 104 expect(collectionInfo1.limits.tokenLimit.unwrap().toNumber()).to.be.equal(tokenLimit);79 expect(collectionInfo1.tokenLimit).to.be.equal(tokenLimit);10580106 // The second time107 const tx2 = api.tx.unique.setCollectionLimits(81 await collection.setLimits(alice, collectionLimits);108 collectionIdForTesting,109 collectionLimits,110 );111 const events2 = await submitTransactionAsync(alice, tx2);112 const result2 = getCreateItemResult(events2);113 expect(result2.success).to.be.true;114 const collectionInfo2 = await queryCollectionExpectSuccess(api, collectionIdForTesting);82 const collectionInfo2 = await collection.getEffectiveLimits();115 expect(collectionInfo2.limits.tokenLimit.unwrap().toNumber()).to.be.equal(tokenLimit);83 expect(collectionInfo2.tokenLimit).to.be.equal(tokenLimit);116 });117 });84 });11885119 it('execute setCollectionLimits from admin collection', async () => {86 itSub('execute setCollectionLimits from admin collection', async ({helper}) => {87 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-3', tokenPrefix: 'SCL'});120 await addCollectionAdminExpectSuccess(alice, collectionIdForTesting, bob.address);88 await collection.addAdmin(alice, {Substrate: bob.address});8990 const collectionLimits = {91 accountTokenOwnershipLimit,92 sponsoredDataSize,93 // sponsoredMintSize,94 tokenLimit,95 };96121 await usingApi(async (api: ApiPromise) => {97 await expect(collection.setLimits(alice, collectionLimits)).to.not.be.rejected;122 tx = api.tx.unique.setCollectionLimits(123 collectionIdForTesting,124 {125 accountTokenOwnershipLimit,126 sponsoredDataSize,127 // sponsoredMintSize,128 tokenLimit,129 },130 );131 await expect(submitTransactionAsync(bob, tx)).to.be.not.rejected;132 });133 });98 });134});99});135100136describe('setCollectionLimits negative', () => {101describe('setCollectionLimits negative', () => {137 let tx;102 let alice: IKeyringPair;103 let bob: IKeyringPair;104138 before(async () => {105 before(async () => {139 await usingApi(async (api, privateKeyWrapper) => {106 await usingPlaygrounds(async (helper, privateKey) => {140 alice = privateKeyWrapper('//Alice');107 const donor = privateKey('//Alice');141 bob = privateKeyWrapper('//Bob');142 collectionIdForTesting = await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});108 [alice, bob] = await helper.arrange.createAccounts([20n, 10n], donor);143 });109 });144 });110 });111 145 it('execute setCollectionLimits for not exists collection', async () => {112 itSub('execute setCollectionLimits for not exists collection', async ({helper}) => {113 const nonExistentCollectionId = (1 << 32) - 1;146 await usingApi(async (api: ApiPromise) => {114 await expect(helper.collection.setLimits(147 const collectionCount = await getCreatedCollectionCount(api);115 alice,148 const nonExistedCollectionId = collectionCount + 1;149 tx = api.tx.unique.setCollectionLimits(150 nonExistedCollectionId,116 nonExistentCollectionId,151 {117 {152 accountTokenOwnershipLimit,118 accountTokenOwnershipLimit,153 sponsoredDataSize,119 sponsoredDataSize,154 // sponsoredMintSize,120 // sponsoredMintSize,155 tokenLimit,121 tokenLimit,156 },122 },157 );123 )).to.be.rejectedWith(/common\.CollectionNotFound/);158 await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;159 });160 });124 });125161 it('execute setCollectionLimits from user who is not owner of this collection', async () => {126 itSub('execute setCollectionLimits from user who is not owner of this collection', async ({helper}) => {127 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-Neg-1', tokenPrefix: 'SCL'});128162 await usingApi(async (api: ApiPromise) => {129 await expect(collection.setLimits(bob, {163 tx = api.tx.unique.setCollectionLimits(164 collectionIdForTesting,165 {166 accountTokenOwnershipLimit,130 accountTokenOwnershipLimit,167 sponsoredDataSize,131 sponsoredDataSize,168 // sponsoredMintSize,132 // sponsoredMintSize,169 tokenLimit,133 tokenLimit,170 },134 })).to.be.rejectedWith(/common\.NoPermission/);171 );172 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;173 });174 });135 });175136176 it('fails when trying to enable OwnerCanTransfer after it was disabled', async () => {137 itSub('fails when trying to enable OwnerCanTransfer after it was disabled', async ({helper}) => {177 const collectionId = await createCollectionExpectSuccess();138 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-Neg-2', tokenPrefix: 'SCL'});139178 await setCollectionLimitsExpectSuccess(alice, collectionId, {140 await collection.setLimits(alice, {179 accountTokenOwnershipLimit: accountTokenOwnershipLimit,141 accountTokenOwnershipLimit,180 sponsoredMintSize: sponsoredDataSize,142 sponsoredDataSize,181 tokenLimit: tokenLimit,143 tokenLimit,182 sponsorTransferTimeout,144 sponsorTransferTimeout,183 ownerCanTransfer: false,145 ownerCanTransfer: false,184 ownerCanDestroy: true,146 ownerCanDestroy: true,185 });147 });148186 await setCollectionLimitsExpectFailure(alice, collectionId, {149 await expect(collection.setLimits(alice, {187 accountTokenOwnershipLimit: accountTokenOwnershipLimit,150 accountTokenOwnershipLimit,188 sponsoredMintSize: sponsoredDataSize,151 sponsoredDataSize,189 tokenLimit: tokenLimit,152 tokenLimit,190 sponsorTransferTimeout,153 sponsorTransferTimeout,191 ownerCanTransfer: true,154 ownerCanTransfer: true,192 ownerCanDestroy: true,155 ownerCanDestroy: true,193 });156 })).to.be.rejectedWith(/common\.OwnerPermissionsCantBeReverted/);194 });157 });195158196 it('fails when trying to enable OwnerCanDestroy after it was disabled', async () => {159 itSub('fails when trying to enable OwnerCanDestroy after it was disabled', async ({helper}) => {197 const collectionId = await createCollectionExpectSuccess();160 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-Neg-3', tokenPrefix: 'SCL'});161198 await setCollectionLimitsExpectSuccess(alice, collectionId, {162 await collection.setLimits(alice, {199 accountTokenOwnershipLimit: accountTokenOwnershipLimit,163 accountTokenOwnershipLimit,200 sponsoredMintSize: sponsoredDataSize,164 sponsoredDataSize,201 tokenLimit: tokenLimit,165 tokenLimit,202 sponsorTransferTimeout,166 sponsorTransferTimeout,203 ownerCanTransfer: true,167 ownerCanTransfer: true,204 ownerCanDestroy: false,168 ownerCanDestroy: false,205 });169 });170206 await setCollectionLimitsExpectFailure(alice, collectionId, {171 await expect(collection.setLimits(alice, {207 accountTokenOwnershipLimit: accountTokenOwnershipLimit,172 accountTokenOwnershipLimit,208 sponsoredMintSize: sponsoredDataSize,173 sponsoredDataSize,209 tokenLimit: tokenLimit,174 tokenLimit,210 sponsorTransferTimeout,175 sponsorTransferTimeout,211 ownerCanTransfer: true,176 ownerCanTransfer: true,212 ownerCanDestroy: true,177 ownerCanDestroy: true,213 });178 })).to.be.rejectedWith(/common\.OwnerPermissionsCantBeReverted/);214 });179 });215180216 it('Setting the higher token limit fails', async () => {181 itSub('Setting the higher token limit fails', async ({helper}) => {217 await usingApi(async () => {182 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionLimits-Neg-4', tokenPrefix: 'SCL'});218183 219 const collectionId = await createCollectionExpectSuccess();220 const collectionLimits = {184 const collectionLimits = {221 accountTokenOwnershipLimit: accountTokenOwnershipLimit,185 accountTokenOwnershipLimit: accountTokenOwnershipLimit,222 sponsoredMintSize: sponsoredDataSize,186 sponsoredMintSize: sponsoredDataSize,227 };191 };228192229 // The first time193 // The first time230 await setCollectionLimitsExpectSuccess(alice, collectionId, collectionLimits);194 await collection.setLimits(alice, collectionLimits);231195232 // The second time - higher token limit196 // The second time - higher token limit233 collectionLimits.tokenLimit += 1;197 collectionLimits.tokenLimit += 1;234 await setCollectionLimitsExpectFailure(alice, collectionId, collectionLimits);198 await expect(collection.setLimits(alice, collectionLimits)).to.be.rejectedWith(/common\.CollectionTokenLimitExceeded/);235 });236 });199 });237238});200});tests/src/setCollectionSponsor.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {default as usingApi} from './substrate/substrate-api';17import {IKeyringPair} from '@polkadot/types/types';20import {createCollectionExpectSuccess,18import {itSub, usingPlaygrounds, expect, Pallets} from './util/playgrounds';21 setCollectionSponsorExpectSuccess,22 destroyCollectionExpectSuccess,23 setCollectionSponsorExpectFailure,24 addCollectionAdminExpectSuccess,25 getCreatedCollectionCount,26 requirePallets,27 Pallets,28} from './util/helpers';29import {IKeyringPair} from '@polkadot/types/types';3031chai.use(chaiAsPromised);3233let alice: IKeyringPair;34let bob: IKeyringPair;35let charlie: IKeyringPair;361937describe('integration test: ext. setCollectionSponsor():', () => {20describe('integration test: ext. setCollectionSponsor():', () => {21 let alice: IKeyringPair;22 let bob: IKeyringPair;23 let charlie: IKeyringPair;382439 before(async () => {25 before(async () => {40 await usingApi(async (api, privateKeyWrapper) => {26 await usingPlaygrounds(async (helper, privateKey) => {41 alice = privateKeyWrapper('//Alice');27 const donor = privateKey('//Alice');42 bob = privateKeyWrapper('//Bob');28 [alice, bob, charlie] = await helper.arrange.createAccounts([20n, 10n, 10n], donor);43 charlie = privateKeyWrapper('//Charlie');44 });29 });45 });30 });463147 it('Set NFT collection sponsor', async () => {32 itSub('Set NFT collection sponsor', async ({helper}) => {48 const collectionId = await createCollectionExpectSuccess();33 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-1-NFT', tokenPrefix: 'SCS'});49 await setCollectionSponsorExpectSuccess(collectionId, bob.address);34 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;3536 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({37 Unconfirmed: bob.address,38 });50 });39 });40 51 it('Set Fungible collection sponsor', async () => {41 itSub('Set Fungible collection sponsor', async ({helper}) => {52 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});42 const collection = await helper.ft.mintCollection(alice, {name: 'SetCollectionSponsor-1-FT', tokenPrefix: 'SCS'});53 await setCollectionSponsorExpectSuccess(collectionId, bob.address);43 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;4445 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({46 Unconfirmed: bob.address,47 });54 });48 });4955 it('Set ReFungible collection sponsor', async function() {50 itSub.ifWithPallets('Set ReFungible collection sponsor', [Pallets.ReFungible], async ({helper}) => {56 await requirePallets(this, [Pallets.ReFungible]);5758 const collectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});51 const collection = await helper.rft.mintCollection(alice, {name: 'SetCollectionSponsor-1-RFT', tokenPrefix: 'SCS'});59 await setCollectionSponsorExpectSuccess(collectionId, bob.address);52 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;5354 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({55 Unconfirmed: bob.address,56 });60 });57 });615862 it('Set the same sponsor repeatedly', async () => {59 itSub('Set the same sponsor repeatedly', async ({helper}) => {63 const collectionId = await createCollectionExpectSuccess();60 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-2', tokenPrefix: 'SCS'});64 await setCollectionSponsorExpectSuccess(collectionId, bob.address);61 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;65 await setCollectionSponsorExpectSuccess(collectionId, bob.address);62 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;6364 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({65 Unconfirmed: bob.address,66 });66 });67 });6867 it('Replace collection sponsor', async () => {69 itSub('Replace collection sponsor', async ({helper}) => {68 const collectionId = await createCollectionExpectSuccess();70 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-3', tokenPrefix: 'SCS'});69 await setCollectionSponsorExpectSuccess(collectionId, bob.address);71 await expect(collection.setSponsor(alice, bob.address)).to.be.not.rejected;70 await setCollectionSponsorExpectSuccess(collectionId, charlie.address);72 await expect(collection.setSponsor(alice, charlie.address)).to.be.not.rejected;7374 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({75 Unconfirmed: charlie.address,76 });71 });77 });78 72 it('Collection admin add sponsor', async () => {79 itSub('Collection admin add sponsor', async ({helper}) => {73 const collectionId = await createCollectionExpectSuccess();80 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-4', tokenPrefix: 'SCS'});74 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);81 await collection.addAdmin(alice, {Substrate: bob.address});75 await setCollectionSponsorExpectSuccess(collectionId, charlie.address, '//Bob');82 await expect(collection.setSponsor(bob, charlie.address)).to.be.not.rejected;8384 expect((await collection.getData())?.raw.sponsorship).to.deep.equal({85 Unconfirmed: charlie.address,86 });76 });87 });77});88});788979describe('(!negative test!) integration test: ext. setCollectionSponsor():', () => {90describe('(!negative test!) integration test: ext. setCollectionSponsor():', () => {91 let alice: IKeyringPair;92 let bob: IKeyringPair;9380 before(async () => {94 before(async () => {81 await usingApi(async (api, privateKeyWrapper) => {95 await usingPlaygrounds(async (helper, privateKey) => {82 alice = privateKeyWrapper('//Alice');96 const donor = privateKey('//Alice');83 bob = privateKeyWrapper('//Bob');97 [alice, bob] = await helper.arrange.createAccounts([10n, 5n], donor);84 charlie = privateKeyWrapper('//Charlie');85 });98 });86 });99 });8710088 it('(!negative test!) Add sponsor with a non-owner', async () => {101 itSub('(!negative test!) Add sponsor with a non-owner', async ({helper}) => {89 const collectionId = await createCollectionExpectSuccess();102 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-Neg-1', tokenPrefix: 'SCS'});90 await setCollectionSponsorExpectFailure(collectionId, bob.address, '//Bob');103 await expect(collection.setSponsor(bob, bob.address))104 .to.be.rejectedWith(/common\.NoPermission/);91 });105 });10692 it('(!negative test!) Add sponsor to a collection that never existed', async () => {107 itSub('(!negative test!) Add sponsor to a collection that never existed', async ({helper}) => {93 // Find the collection that never existed94 let collectionId = 0;95 await usingApi(async (api) => {96 collectionId = await getCreatedCollectionCount(api) + 1;108 const collectionId = (1 << 32) - 1;97 });9899 await setCollectionSponsorExpectFailure(collectionId, bob.address);109 await expect(helper.collection.setSponsor(alice, collectionId, bob.address))110 .to.be.rejectedWith(/common\.CollectionNotFound/);100 });111 });112101 it('(!negative test!) Add sponsor to a collection that was destroyed', async () => {113 itSub('(!negative test!) Add sponsor to a collection that was destroyed', async ({helper}) => {102 const collectionId = await createCollectionExpectSuccess();114 const collection = await helper.nft.mintCollection(alice, {name: 'SetCollectionSponsor-Neg-2', tokenPrefix: 'SCS'});103 await destroyCollectionExpectSuccess(collectionId);115 await collection.burn(alice);104 await setCollectionSponsorExpectFailure(collectionId, bob.address);116 await expect(collection.setSponsor(alice, bob.address))117 .to.be.rejectedWith(/common\.CollectionNotFound/);105 });118 });106});119});107120tests/src/setContractSponsoringRateLimit.test.tsdiffbeforeafterboth25 setContractSponsoringRateLimitExpectSuccess,25 setContractSponsoringRateLimitExpectSuccess,26} from './util/helpers';26} from './util/helpers';272728// todo:playgrounds postponed skipped test28describe.skip('Integration Test setContractSponsoringRateLimit', () => {29describe.skip('Integration Test setContractSponsoringRateLimit', () => {29 it('ensure sponsored contract can\'t be called twice without pause for free', async () => {30 it('ensure sponsored contract can\'t be called twice without pause for free', async () => {30 await usingApi(async (api, privateKeyWrapper) => {31 await usingApi(async (api, privateKeyWrapper) => {tests/src/setMintPermission.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import usingApi from './substrate/substrate-api';19import {18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';20 addToAllowListExpectSuccess,21 createCollectionExpectSuccess,22 createItemExpectFailure,23 createItemExpectSuccess,24 destroyCollectionExpectSuccess,25 enableAllowListExpectSuccess,26 findNotExistingCollection,27 setMintPermissionExpectFailure,28 setMintPermissionExpectSuccess,29 addCollectionAdminExpectSuccess,30} from './util/helpers';311932describe('Integration Test setMintPermission', () => {20describe('Integration Test setMintPermission', () => {33 let alice: IKeyringPair;21 let alice: IKeyringPair;34 let bob: IKeyringPair;22 let bob: IKeyringPair;352336 before(async () => {24 before(async () => {37 await usingApi(async (api, privateKeyWrapper) => {25 await usingPlaygrounds(async (helper, privateKey) => {38 alice = privateKeyWrapper('//Alice');26 const donor = privateKey('//Alice');39 bob = privateKeyWrapper('//Bob');27 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);40 });28 });41 });29 });423043 it('ensure allow-listed non-privileged address can mint tokens', async () => {31 itSub('ensure allow-listed non-privileged address can mint tokens', async ({helper}) => {44 await usingApi(async () => {32 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-1', description: '', tokenPrefix: 'SMP'});45 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});33 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});46 await enableAllowListExpectSuccess(alice, collectionId);34 await collection.addToAllowList(alice, {Substrate: bob.address});47 await setMintPermissionExpectSuccess(alice, collectionId, true);3548 await addToAllowListExpectSuccess(alice, collectionId, bob.address);36 await expect(collection.mintToken(bob, {Substrate: bob.address})).to.not.be.rejected;4950 await createItemExpectSuccess(bob, collectionId, 'NFT');51 });52 });37 });533854 it('can be enabled twice', async () => {39 itSub('can be enabled twice', async ({helper}) => {55 await usingApi(async () => {40 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-2', description: '', tokenPrefix: 'SMP'});56 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});41 expect((await collection.getData())?.raw.permissions.access).to.not.equal('AllowList');4257 await setMintPermissionExpectSuccess(alice, collectionId, true);43 await collection.setPermissions(alice, {mintMode: true});58 await setMintPermissionExpectSuccess(alice, collectionId, true);44 await collection.setPermissions(alice, {mintMode: true});59 });45 expect((await collection.getData())?.raw.permissions.mintMode).to.be.true;60 });46 });614762 it('can be disabled twice', async () => {48 itSub('can be disabled twice', async ({helper}) => {63 await usingApi(async () => {49 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-3', description: '', tokenPrefix: 'SMP'});50 expect((await collection.getData())?.raw.permissions.access).to.equal('Normal');5152 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});53 expect((await collection.getData())?.raw.permissions.access).to.equal('AllowList');64 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});54 expect((await collection.getData())?.raw.permissions.mintMode).to.equal(true);5565 await setMintPermissionExpectSuccess(alice, collectionId, true);56 await collection.setPermissions(alice, {access: 'Normal', mintMode: false});66 await setMintPermissionExpectSuccess(alice, collectionId, false);57 await collection.setPermissions(alice, {access: 'Normal', mintMode: false});67 await setMintPermissionExpectSuccess(alice, collectionId, false);58 expect((await collection.getData())?.raw.permissions.access).to.equal('Normal');68 });59 expect((await collection.getData())?.raw.permissions.mintMode).to.equal(false);69 });60 });706171 it('Collection admin success on set', async () => {62 itSub('Collection admin success on set', async ({helper}) => {63 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-4', description: '', tokenPrefix: 'SMP'});72 await usingApi(async () => {64 await collection.addAdmin(alice, {Substrate: bob.address});73 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});65 await collection.setPermissions(bob, {access: 'AllowList', mintMode: true});74 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);66 75 await setMintPermissionExpectSuccess(bob, collectionId, true);67 expect((await collection.getData())?.raw.permissions.access).to.equal('AllowList');76 });68 expect((await collection.getData())?.raw.permissions.mintMode).to.equal(true);77 });69 });78});70});797182 let bob: IKeyringPair;74 let bob: IKeyringPair;837584 before(async () => {76 before(async () => {85 await usingApi(async (api, privateKeyWrapper) => {77 await usingPlaygrounds(async (helper, privateKey) => {86 alice = privateKeyWrapper('//Alice');78 const donor = privateKey('//Alice');87 bob = privateKeyWrapper('//Bob');79 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);88 });80 });89 });81 });908291 it('fails on not existing collection', async () => {83 itSub('fails on not existing collection', async ({helper}) => {84 const collectionId = (1 << 32) - 1;92 await usingApi(async (api) => {85 await expect(helper.collection.setPermissions(alice, collectionId, {mintMode: true}))93 const nonExistingCollection = await findNotExistingCollection(api);94 await setMintPermissionExpectFailure(alice, nonExistingCollection, true);95 });86 .to.be.rejectedWith(/common\.CollectionNotFound/);96 });87 });978898 it('fails on removed collection', async () => {89 itSub('fails on removed collection', async ({helper}) => {90 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-Neg-1', tokenPrefix: 'SMP'});91 await collection.burn(alice);9299 await usingApi(async () => {93 await expect(collection.setPermissions(alice, {mintMode: true}))100 const removedCollectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});101 await destroyCollectionExpectSuccess(removedCollectionId);102103 await setMintPermissionExpectFailure(alice, removedCollectionId, true);104 });94 .to.be.rejectedWith(/common\.CollectionNotFound/);105 });95 });10696107 it('fails when not collection owner tries to set mint status', async () => {97 itSub('fails when non-owner tries to set mint status', async ({helper}) => {108 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});98 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-Neg-2', tokenPrefix: 'SMP'});109 await enableAllowListExpectSuccess(alice, collectionId);99110 await setMintPermissionExpectFailure(bob, collectionId, true);100 await expect(collection.setPermissions(bob, {mintMode: true}))101 .to.be.rejectedWith(/common\.NoPermission/);111 });102 });112103113 it('ensure non-allow-listed non-privileged address can\'t mint tokens', async () => {104 itSub('ensure non-allow-listed non-privileged address can\'t mint tokens', async ({helper}) => {105 const collection = await helper.nft.mintCollection(alice, {name: 'SetMintPermission-Neg-3', tokenPrefix: 'SMP'});106 await collection.setPermissions(alice, {mintMode: true});107114 await usingApi(async () => {108 await expect(collection.mintToken(bob, {Substrate: bob.address}))115 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});116 await enableAllowListExpectSuccess(alice, collectionId);117 await setMintPermissionExpectSuccess(alice, collectionId, true);118119 await createItemExpectFailure(bob, collectionId, 'NFT');120 });109 .to.be.rejectedWith(/common\.AddressNotInAllowlist/);121 });110 });122});111});123112tests/src/setPublicAccessMode.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion18import {ApiPromise} from '@polkadot/api';19import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';20import chai from 'chai';21import chaiAsPromised from 'chai-as-promised';22import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';23import {19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';24 addToAllowListExpectSuccess,2025 createCollectionExpectSuccess,21describe('Integration Test setPublicAccessMode(): ', () => {26 createItemExpectSuccess,27 destroyCollectionExpectSuccess,28 enablePublicMintingExpectSuccess,29 enableAllowListExpectSuccess,30 normalizeAccountId,31 addCollectionAdminExpectSuccess,32 getCreatedCollectionCount,33} from './util/helpers';3435chai.use(chaiAsPromised);36const expect = chai.expect;3738let alice: IKeyringPair;22 let alice: IKeyringPair;39let bob: IKeyringPair;23 let bob: IKeyringPair;4024 41describe('Integration Test setPublicAccessMode(): ', () => {42 before(async () => {25 before(async () => {43 await usingApi(async (api, privateKeyWrapper) => {26 await usingPlaygrounds(async (helper, privateKey) => {44 alice = privateKeyWrapper('//Alice');27 const donor = privateKey('//Alice');45 bob = privateKeyWrapper('//Bob');28 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);46 });29 });47 });30 });483149 it('Run extrinsic with collection id parameters, set the allowlist mode for the collection', async () => {32 itSub('Runs extrinsic with collection id parameters, sets the allowlist mode for the collection', async ({helper}) => {50 await usingApi(async () => {33 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-1', tokenPrefix: 'TF'});51 const collectionId: number = await createCollectionExpectSuccess();34 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});52 await enableAllowListExpectSuccess(alice, collectionId);53 await enablePublicMintingExpectSuccess(alice, collectionId);54 await addToAllowListExpectSuccess(alice, collectionId, bob.address);35 await collection.addToAllowList(alice, {Substrate: bob.address});36 55 await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);37 await expect(collection.mintToken(bob, {Substrate: bob.address})).to.be.not.rejected;56 });57 });38 });583959 it('Allowlisted collection limits', async () => {40 itSub('Allowlisted collection limits', async ({helper}) => {41 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-2', tokenPrefix: 'TF'});42 await collection.setPermissions(alice, {access: 'AllowList', mintMode: true});43 60 await usingApi(async (api: ApiPromise) => {44 await expect(collection.mintToken(bob, {Substrate: bob.address}))61 const collectionId = await createCollectionExpectSuccess();62 await enableAllowListExpectSuccess(alice, collectionId);63 await enablePublicMintingExpectSuccess(alice, collectionId);64 const tx = api.tx.unique.createItem(collectionId, normalizeAccountId(bob.address), 'NFT');65 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;45 .to.be.rejectedWith(/common\.AddressNotInAllowlist/);66 });67 });46 });4748 itSub('setPublicAccessMode by collection admin', async ({helper}) => {49 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-Neg-4', tokenPrefix: 'TF'});50 await collection.addAdmin(alice, {Substrate: bob.address});5152 await expect(collection.setPermissions(bob, {access: 'AllowList'})).to.be.not.rejected;53 });68});54});695570describe('Negative Integration Test ext. setPublicAccessMode(): ', () => {56describe('Negative Integration Test ext. setPublicAccessMode(): ', () => {57 let alice: IKeyringPair;58 let bob: IKeyringPair;59 71 it('Set a non-existent collection', async () => {60 before(async () => {72 await usingApi(async (api: ApiPromise) => {61 await usingPlaygrounds(async (helper, privateKey) => {73 // tslint:disable-next-line: radix74 const collectionId = await getCreatedCollectionCount(api) + 1;62 const donor = privateKey('//Alice');75 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});63 [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);76 await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;77 });64 });78 });65 });796680 it('Set the collection that has been deleted', async () => {67 itSub('Sets a non-existent collection', async ({helper}) => {68 const collectionId = (1 << 32) - 1;81 await usingApi(async (api: ApiPromise) => {69 await expect(helper.collection.setPermissions(alice, collectionId, {access: 'AllowList'}))82 // tslint:disable-next-line: no-bitwise83 const collectionId = await createCollectionExpectSuccess();84 await destroyCollectionExpectSuccess(collectionId);85 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});86 await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;70 .to.be.rejectedWith(/common\.CollectionNotFound/);87 });88 });71 });897290 it('Re-set the list mode already set in quantity', async () => {73 itSub('Sets the collection that has been deleted', async ({helper}) => {74 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-Neg-1', tokenPrefix: 'TF'});75 await collection.burn(alice);7691 await usingApi(async () => {77 await expect(collection.setPermissions(alice, {access: 'AllowList'}))92 const collectionId: number = await createCollectionExpectSuccess();93 await enableAllowListExpectSuccess(alice, collectionId);94 await enableAllowListExpectSuccess(alice, collectionId);95 });78 .to.be.rejectedWith(/common\.CollectionNotFound/);96 });79 });978098 it('Execute method not on behalf of the collection owner', async () => {81 itSub('Re-sets the list mode already set in quantity', async ({helper}) => {99 await usingApi(async (api: ApiPromise) => {100 // tslint:disable-next-line: no-bitwise101 const collectionId = await createCollectionExpectSuccess();82 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-Neg-2', tokenPrefix: 'TF'});102 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});103 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;104 });83 await collection.setPermissions(alice, {access: 'AllowList'});84 await collection.setPermissions(alice, {access: 'AllowList'});105 });85 });10686107 it('setPublicAccessMode by collection admin', async () => {87 itSub('Executes method as a malefactor', async ({helper}) => {88 const collection = await helper.nft.mintCollection(alice, {name: 'PublicAccess-Neg-3', tokenPrefix: 'TF'});89108 await usingApi(async (api: ApiPromise) => {90 await expect(collection.setPermissions(bob, {access: 'AllowList'}))109 // tslint:disable-next-line: no-bitwise110 const collectionId = await createCollectionExpectSuccess();111 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);112 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});113 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.not.rejected;91 .to.be.rejectedWith(/common\.NoPermission/);114 });115 });92 });116});93});117118describe('Negative Integration Test ext. collection admin setPublicAccessMode(): ', () => {119 before(async () => {120 await usingApi(async (api, privateKeyWrapper) => {121 alice = privateKeyWrapper('//Alice');122 bob = privateKeyWrapper('//Bob');123 });124 });125});12694tests/src/toggleContractAllowList.test.tsdiffbeforeafterboth31const value = 0;31const value = 0;32const gasLimit = 3000n * 1000000n;32const gasLimit = 3000n * 1000000n;333334// todo:playgrounds skipped ~ postpone34describe.skip('Integration Test toggleContractAllowList', () => {35describe.skip('Integration Test toggleContractAllowList', () => {353636 it('Enable allow list contract mode', async () => {37 it('Enable allow list contract mode', async () => {tests/src/transfer.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {ApiPromise} from '@polkadot/api';18import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';19import {expect} from 'chai';18import {itEth, usingEthPlaygrounds} from './eth/util/playgrounds';20import getBalance from './substrate/get-balance';21import {default as usingApi, submitTransactionAsync} from './substrate/substrate-api';22import {19import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';23 burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess,24 destroyCollectionExpectSuccess,25 findUnusedAddress,26 getCreateCollectionResult,27 getCreateItemResult,28 transferExpectFailure,29 transferExpectSuccess,30 addCollectionAdminExpectSuccess,31 getCreatedCollectionCount,32 toSubstrateAddress,33 getTokenOwner,34 normalizeAccountId,35 getBalance as getTokenBalance,36 transferFromExpectSuccess,37 transferFromExpectFail,38 requirePallets,39 Pallets,40} from './util/helpers';41import {42 subToEth,43 itWeb3, 44} from './eth/util/helpers';45import {request} from 'https';462021describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {47let alice: IKeyringPair;22 let alice: IKeyringPair;48let bob: IKeyringPair;23 let bob: IKeyringPair;49let charlie: IKeyringPair;502451describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {52 before(async () => {25 before(async () => {53 await usingApi(async (api, privateKeyWrapper) => {26 await usingPlaygrounds(async (helper, privateKey) => {54 alice = privateKeyWrapper('//Alice');27 const donor = privateKey('//Alice');55 bob = privateKeyWrapper('//Bob');28 [alice, bob] = await helper.arrange.createAccounts([50n, 10n], donor);56 });29 });57 });30 });58 31 59 it('Balance transfers and check balance', async () => {32 itSub('Balance transfers and check balance', async ({helper}) => {60 await usingApi(async (api, privateKeyWrapper) => {33 const alicesBalanceBefore = await helper.balance.getSubstrate(alice.address);61 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alice.address, bob.address]);34 const bobsBalanceBefore = await helper.balance.getSubstrate(bob.address);623563 const transfer = api.tx.balances.transfer(bob.address, 1n);36 expect(await helper.balance.transferToSubstrate(alice, bob.address, 1n)).to.be.true;64 const events = await submitTransactionAsync(alice, transfer);65 const result = getCreateItemResult(events);66 // tslint:disable-next-line:no-unused-expression67 expect(result.success).to.be.true;683769 const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alice.address, bob.address]);38 const alicesBalanceAfter = await helper.balance.getSubstrate(alice.address);39 const bobsBalanceAfter = await helper.balance.getSubstrate(bob.address);704071 // tslint:disable-next-line:no-unused-expression41 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;72 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;73 // tslint:disable-next-line:no-unused-expression42 expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;74 expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;75 });76 });43 });774478 it('Inability to pay fees error message is correct', async () => {45 itSub('Inability to pay fees error message is correct', async ({helper, privateKey}) => {79 await usingApi(async (api, privateKeyWrapper) => {80 // Find unused address46 const donor = privateKey('//Alice');81 const pk = await findUnusedAddress(api, privateKeyWrapper);47 const [zero] = await helper.arrange.createAccounts([0n], donor);824883 const badTransfer = api.tx.balances.transfer(bob.address, 1n);49 // console.error = () => {};84 // const events = await submitTransactionAsync(pk, badTransfer);85 const badTransaction = async () => {86 const events = await submitTransactionAsync(pk, badTransfer);50 // The following operation throws an error into the console and the logs. Pay it no heed as long as the test succeeds.87 const result = getCreateCollectionResult(events);88 // tslint:disable-next-line:no-unused-expression89 expect(result.success).to.be.false;51 await expect(helper.balance.transferToSubstrate(zero, donor.address, 1n))90 };91 await expect(badTransaction()).to.be.rejectedWith('Inability to pay some fees , e.g. account balance too low');52 .to.be.rejectedWith('Inability to pay some fees , e.g. account balance too low');92 });93 });53 });945495 it('[nft] User can transfer owned token', async () => {55 itSub('[nft] User can transfer owned token', async ({helper}) => {96 const nftCollectionId = await createCollectionExpectSuccess();56 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-1-NFT', description: '', tokenPrefix: 'T'});97 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');57 const nft = await collection.mintToken(alice);5898 await transferExpectSuccess(nftCollectionId, newNftTokenId, alice, bob, 1, 'NFT');59 await nft.transfer(alice, {Substrate: bob.address});60 expect(await nft.getOwner()).to.be.deep.equal({Substrate: bob.address});99 });61 });10062101 it('[fungible] User can transfer owned token', async () => {63 itSub('[fungible] User can transfer owned token', async ({helper}) => {102 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});64 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-1-FT', description: '', tokenPrefix: 'T'});103 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');65 await collection.mint(alice, 10n);6667 await collection.transfer(alice, {Substrate: bob.address}, 9n);104 await transferExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob, 1, 'Fungible');68 expect(await collection.getBalance({Substrate: bob.address})).to.be.equal(9n);69 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1n);105 });70 });10671107 it('[refungible] User can transfer owned token', async function() {72 itSub.ifWithPallets('[refungible] User can transfer owned token', [Pallets.ReFungible], async ({helper}) => {108 await requirePallets(this, [Pallets.ReFungible]);73 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-1-RFT', description: '', tokenPrefix: 'T'});74 const rft = await collection.mintToken(alice, 10n);10975110 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});76 await rft.transfer(alice, {Substrate: bob.address}, 9n);111 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');77 expect(await rft.getBalance({Substrate: bob.address})).to.be.equal(9n);112 await transferExpectSuccess(78 expect(await rft.getBalance({Substrate: alice.address})).to.be.equal(1n);113 reFungibleCollectionId,114 newReFungibleTokenId,115 alice,116 bob,117 100,118 'ReFungible',119 );120 });79 });12180122 it('[nft] Collection admin can transfer owned token', async () => {81 itSub('[nft] Collection admin can transfer owned token', async ({helper}) => {123 const nftCollectionId = await createCollectionExpectSuccess();82 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-2-NFT', description: '', tokenPrefix: 'T'});124 await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);83 await collection.addAdmin(alice, {Substrate: bob.address});84125 const newNftTokenId = await createItemExpectSuccess(bob, nftCollectionId, 'NFT', bob.address);85 const nft = await collection.mintToken(bob, {Substrate: bob.address});126 await transferExpectSuccess(nftCollectionId, newNftTokenId, bob, alice, 1, 'NFT');86 await nft.transfer(bob, {Substrate: alice.address});8788 expect(await nft.getOwner()).to.be.deep.equal({Substrate: alice.address});127 });89 });12890129 it('[fungible] Collection admin can transfer owned token', async () => {91 itSub('[fungible] Collection admin can transfer owned token', async ({helper}) => {130 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});92 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-2-FT', description: '', tokenPrefix: 'T'});131 await addCollectionAdminExpectSuccess(alice, fungibleCollectionId, bob.address);93 await collection.addAdmin(alice, {Substrate: bob.address});94132 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible', bob.address);95 await collection.mint(bob, 10n, {Substrate: bob.address});133 await transferExpectSuccess(fungibleCollectionId, newFungibleTokenId, bob, alice, 1, 'Fungible');96 await collection.transfer(bob, {Substrate: alice.address}, 1n);9798 expect(await collection.getBalance({Substrate: bob.address})).to.be.equal(9n);99 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1n);134 });100 });135101136 it('[refungible] Collection admin can transfer owned token', async function() {102 itSub.ifWithPallets('[refungible] Collection admin can transfer owned token', [Pallets.ReFungible], async ({helper}) => {137 await requirePallets(this, [Pallets.ReFungible]);103 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-2-RFT', description: '', tokenPrefix: 'T'});104 await collection.addAdmin(alice, {Substrate: bob.address});138105139 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});106 const rft = await collection.mintToken(bob, 10n, {Substrate: bob.address});140 await addCollectionAdminExpectSuccess(alice, reFungibleCollectionId, bob.address);107 await rft.transfer(bob, {Substrate: alice.address}, 1n);108141 const newReFungibleTokenId = await createItemExpectSuccess(bob, reFungibleCollectionId, 'ReFungible', bob.address);109 expect(await rft.getBalance({Substrate: bob.address})).to.be.equal(9n);142 await transferExpectSuccess(110 expect(await rft.getBalance({Substrate: alice.address})).to.be.equal(1n);143 reFungibleCollectionId,144 newReFungibleTokenId,145 bob,146 alice,147 100,148 'ReFungible',149 );150 });111 });151});112});152113153describe('Negative Integration Test Transfer(recipient, collection_id, item_id, value)', () => {114describe('Negative Integration Test Transfer(recipient, collection_id, item_id, value)', () => {115 let alice: IKeyringPair;116 let bob: IKeyringPair;117154 before(async () => {118 before(async () => {155 await usingApi(async (api, privateKeyWrapper) => {119 await usingPlaygrounds(async (helper, privateKey) => {156 alice = privateKeyWrapper('//Alice');120 const donor = privateKey('//Alice');157 bob = privateKeyWrapper('//Bob');121 [alice, bob] = await helper.arrange.createAccounts([50n, 10n], donor);158 charlie = privateKeyWrapper('//Charlie');159 });122 });160 });123 });161124162 it('[nft] Transfer with not existed collection_id', async () => {125 itSub('[nft] Transfer with not existed collection_id', async ({helper}) => {163 await usingApi(async (api) => {164 const nftCollectionCount = await getCreatedCollectionCount(api);126 const collectionId = (1 << 32) - 1;165 await transferExpectFailure(nftCollectionCount + 1, 1, alice, bob, 1);127 await expect(helper.nft.transferToken(alice, collectionId, 1, {Substrate: bob.address}))166 });128 .to.be.rejectedWith(/common\.CollectionNotFound/);167 });129 });168130169 it('[fungible] Transfer with not existed collection_id', async () => {131 itSub('[fungible] Transfer with not existed collection_id', async ({helper}) => {170 await usingApi(async (api) => {171 const fungibleCollectionCount = await getCreatedCollectionCount(api);132 const collectionId = (1 << 32) - 1;172 await transferExpectFailure(fungibleCollectionCount + 1, 0, alice, bob, 1);133 await expect(helper.ft.transfer(alice, collectionId, {Substrate: bob.address}))173 });134 .to.be.rejectedWith(/common\.CollectionNotFound/);174 });135 });175136176 it('[refungible] Transfer with not existed collection_id', async function() {137 itSub.ifWithPallets('[refungible] Transfer with not existed collection_id', [Pallets.ReFungible], async ({helper}) => {177 await requirePallets(this, [Pallets.ReFungible]);178179 await usingApi(async (api) => {180 const reFungibleCollectionCount = await getCreatedCollectionCount(api);138 const collectionId = (1 << 32) - 1;181 await transferExpectFailure(reFungibleCollectionCount + 1, 1, alice, bob, 1);139 await expect(helper.rft.transferToken(alice, collectionId, 1, {Substrate: bob.address}))182 });140 .to.be.rejectedWith(/common\.CollectionNotFound/);183 });141 });184142185 it('[nft] Transfer with deleted collection_id', async () => {143 itSub('[nft] Transfer with deleted collection_id', async ({helper}) => {186 const nftCollectionId = await createCollectionExpectSuccess();144 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-1-NFT', description: '', tokenPrefix: 'T'});187 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');145 const nft = await collection.mintToken(alice);146188 await burnItemExpectSuccess(alice, nftCollectionId, newNftTokenId);147 await nft.burn(alice);189 await destroyCollectionExpectSuccess(nftCollectionId);148 await collection.burn(alice);149190 await transferExpectFailure(nftCollectionId, newNftTokenId, alice, bob, 1);150 await expect(nft.transfer(alice, {Substrate: bob.address}))151 .to.be.rejectedWith(/common\.CollectionNotFound/);191 });152 });192153193 it('[fungible] Transfer with deleted collection_id', async () => {154 itSub('[fungible] Transfer with deleted collection_id', async ({helper}) => {194 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});155 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-Neg-1-FT', description: '', tokenPrefix: 'T'});195 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');156 await collection.mint(alice, 10n);157196 await burnItemExpectSuccess(alice, fungibleCollectionId, newFungibleTokenId, 10);158 await collection.burnTokens(alice, 10n);197 await destroyCollectionExpectSuccess(fungibleCollectionId);159 await collection.burn(alice);160198 await transferExpectFailure(fungibleCollectionId, newFungibleTokenId, alice, bob, 1);161 await expect(collection.transfer(alice, {Substrate: bob.address}))162 .to.be.rejectedWith(/common\.CollectionNotFound/);199 });163 });164 165 itSub.ifWithPallets('[refungible] Transfer with deleted collection_id', [Pallets.ReFungible], async ({helper}) => {166 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-Neg-1-RFT', description: '', tokenPrefix: 'T'});167 const rft = await collection.mintToken(alice, 10n);200168201 it('[refungible] Transfer with deleted collection_id', async function() {169 await rft.burn(alice, 10n);202 await requirePallets(this, [Pallets.ReFungible]);170 await collection.burn(alice);203171204 const reFungibleCollectionId = await172 await expect(rft.transfer(alice, {Substrate: bob.address}))205 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});206 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');207 await burnItemExpectSuccess(alice, reFungibleCollectionId, newReFungibleTokenId, 100);173 .to.be.rejectedWith(/common\.CollectionNotFound/);208 await destroyCollectionExpectSuccess(reFungibleCollectionId);209 await transferExpectFailure(210 reFungibleCollectionId,211 newReFungibleTokenId,212 alice,213 bob,214 1,215 );216 });174 });217175218 it('[nft] Transfer with not existed item_id', async () => {176 itSub('[nft] Transfer with not existed item_id', async ({helper}) => {219 const nftCollectionId = await createCollectionExpectSuccess();177 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-2-NFT', description: '', tokenPrefix: 'T'});220 await transferExpectFailure(nftCollectionId, 2, alice, bob, 1);178 await expect(collection.transferToken(alice, 1, {Substrate: bob.address}))179 .to.be.rejectedWith(/common\.TokenNotFound/);221 });180 });222181223 it('[fungible] Transfer with not existed item_id', async () => {182 itSub('[fungible] Transfer with not existed item_id', async ({helper}) => {224 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});183 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-Neg-2-FT', description: '', tokenPrefix: 'T'});225 await transferExpectFailure(fungibleCollectionId, 2, alice, bob, 1);184 await expect(collection.transfer(alice, {Substrate: bob.address}))185 .to.be.rejectedWith(/common\.TokenValueTooLow/);226 });186 });227187228 it('[refungible] Transfer with not existed item_id', async function() {188 itSub.ifWithPallets('[refungible] Transfer with not existed item_id', [Pallets.ReFungible], async ({helper}) => {229 await requirePallets(this, [Pallets.ReFungible]);189 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-Neg-2-RFT', description: '', tokenPrefix: 'T'});230231 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});232 await transferExpectFailure(190 await expect(collection.transferToken(alice, 1, {Substrate: bob.address}))233 reFungibleCollectionId,234 2,235 alice,236 bob,237 1,191 .to.be.rejectedWith(/common\.TokenValueTooLow/);238 );239 });192 });240193241 it('[nft] Transfer with deleted item_id', async () => {194 itSub('[nft] Transfer with deleted item_id', async ({helper}) => {242 const nftCollectionId = await createCollectionExpectSuccess();195 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-3-NFT', description: '', tokenPrefix: 'T'});243 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');196 const nft = await collection.mintToken(alice);197244 await burnItemExpectSuccess(alice, nftCollectionId, newNftTokenId, 1);198 await nft.burn(alice);199245 await transferExpectFailure(nftCollectionId, newNftTokenId, alice, bob, 1);200 await expect(nft.transfer(alice, {Substrate: bob.address}))201 .to.be.rejectedWith(/common\.TokenNotFound/);246 });202 });247203248 it('[fungible] Transfer with deleted item_id', async () => {204 itSub('[fungible] Transfer with deleted item_id', async ({helper}) => {249 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});205 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-Neg-3-FT', description: '', tokenPrefix: 'T'});250 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');206 await collection.mint(alice, 10n);207251 await burnItemExpectSuccess(alice, fungibleCollectionId, newFungibleTokenId, 10);208 await collection.burnTokens(alice, 10n);209252 await transferExpectFailure(fungibleCollectionId, newFungibleTokenId, alice, bob, 1);210 await expect(collection.transfer(alice, {Substrate: bob.address}))211 .to.be.rejectedWith(/common\.TokenValueTooLow/);253 });212 });254213255 it('[refungible] Transfer with deleted item_id', async function() {214 itSub.ifWithPallets('[refungible] Transfer with deleted item_id', [Pallets.ReFungible], async ({helper}) => {256 await requirePallets(this, [Pallets.ReFungible]);215 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-Neg-3-RFT', description: '', tokenPrefix: 'T'});216 const rft = await collection.mintToken(alice, 10n);257217258 const reFungibleCollectionId = await218 await rft.burn(alice, 10n);259 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});219260 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');261 await burnItemExpectSuccess(alice, reFungibleCollectionId, newReFungibleTokenId, 100);262 await transferExpectFailure(220 await expect(rft.transfer(alice, {Substrate: bob.address}))263 reFungibleCollectionId,264 newReFungibleTokenId,265 alice,266 bob,267 1,221 .to.be.rejectedWith(/common\.TokenValueTooLow/);268 );269 });222 });270223271 it('[nft] Transfer with recipient that is not owner', async () => {224 itSub('[nft] Transfer with recipient that is not owner', async ({helper}) => {272 const nftCollectionId = await createCollectionExpectSuccess();225 const collection = await helper.nft.mintCollection(alice, {name: 'Transfer-Neg-4-NFT', description: '', tokenPrefix: 'T'});273 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');226 const nft = await collection.mintToken(alice);227274 await transferExpectFailure(nftCollectionId, newNftTokenId, charlie, bob, 1);228 await expect(nft.transfer(bob, {Substrate: bob.address}))229 .to.be.rejectedWith(/common\.NoPermission/);230 expect(await nft.getOwner()).to.be.deep.equal({Substrate: alice.address});275 });231 });276232277 it('[fungible] Transfer with recipient that is not owner', async () => {233 itSub('[fungible] Transfer with recipient that is not owner', async ({helper}) => {278 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});234 const collection = await helper.ft.mintCollection(alice, {name: 'Transfer-Neg-4-FT', description: '', tokenPrefix: 'T'});279 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');235 await collection.mint(alice, 10n);236237 await expect(collection.transfer(bob, {Substrate: bob.address}, 9n))238 .to.be.rejectedWith(/common\.TokenValueTooLow/);280 await transferExpectFailure(fungibleCollectionId, newFungibleTokenId, charlie, bob, 1);239 expect(await collection.getBalance({Substrate: bob.address})).to.be.equal(0n);240 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(10n);281 });241 });282242283 it('[refungible] Transfer with recipient that is not owner', async function() {243 itSub.ifWithPallets('[refungible] Transfer with recipient that is not owner', [Pallets.ReFungible], async ({helper}) => {284 await requirePallets(this, [Pallets.ReFungible]);244 const collection = await helper.rft.mintCollection(alice, {name: 'Transfer-1-RFT', description: '', tokenPrefix: 'T'});245 const rft = await collection.mintToken(alice, 10n);285246286 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});247 await expect(rft.transfer(bob, {Substrate: bob.address}, 9n))287 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');248 .to.be.rejectedWith(/common\.TokenValueTooLow/);288 await transferExpectFailure(249 expect(await rft.getBalance({Substrate: bob.address})).to.be.equal(0n);289 reFungibleCollectionId,290 newReFungibleTokenId,291 charlie,292 bob,293 1,250 expect(await rft.getBalance({Substrate: alice.address})).to.be.equal(10n);294 );295 });251 });296});252});297253298describe('Zero value transfer(From)', () => {254describe('Transfers to self (potentially over substrate-evm boundary)', () => {299 before(async () => {255 let donor: IKeyringPair;256257 before(async function() {300 await usingApi(async (api, privateKeyWrapper) => {258 await usingEthPlaygrounds(async (_, privateKey) => {301 alice = privateKeyWrapper('//Alice');259 donor = privateKey('//Alice');302 bob = privateKeyWrapper('//Bob');303 });260 });304 });261 });262 263 itEth('Transfers to self. In case of same frontend', async ({helper}) => {264 const [owner] = await helper.arrange.createAccounts([10n], donor);265 const collection = await helper.ft.mintCollection(owner, {});266 await collection.mint(owner, 100n);305267306 it('NFT', async () => {268 const ownerProxy = helper.address.substrateToEth(owner.address);307 await usingApi(async (api: ApiPromise) => {308 const nftCollectionId = await createCollectionExpectSuccess();309 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');310269311 const transferTx = api.tx.unique.transfer(normalizeAccountId(bob), nftCollectionId, newNftTokenId, 0);270 // transfer to own proxy271 await collection.transfer(owner, {Ethereum: ownerProxy}, 10n);312 await submitTransactionAsync(alice, transferTx);272 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(90n);313 const address = normalizeAccountId(await getTokenOwner(api, nftCollectionId, newNftTokenId));273 expect(await collection.getBalance({Ethereum: ownerProxy})).to.be.equal(10n);314274315 expect(toSubstrateAddress(address)).to.be.equal(alice.address);275 // transfer-from own proxy to own proxy again276 await collection.transferFrom(owner, {Ethereum: ownerProxy}, {Ethereum: ownerProxy}, 5n);277 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(90n);316 });278 expect(await collection.getBalance({Ethereum: ownerProxy})).to.be.equal(10n);317 });279 });318280319 it('RFT', async function() {281 itEth('Transfers to self. In case of substrate-evm boundary', async ({helper}) => {320 await requirePallets(this, [Pallets.ReFungible]);282 const [owner] = await helper.arrange.createAccounts([10n], donor);283 const collection = await helper.ft.mintCollection(owner, {});284 await collection.mint(owner, 100n);321285322 await usingApi(async (api: ApiPromise) => {286 const ownerProxy = helper.address.substrateToEth(owner.address);323 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});324 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');325 const balanceBeforeAlice = await getTokenBalance(api, reFungibleCollectionId, normalizeAccountId(alice), newReFungibleTokenId);326 const balanceBeforeBob = await getTokenBalance(api, reFungibleCollectionId, normalizeAccountId(bob), newReFungibleTokenId);327287328 const transferTx = api.tx.unique.transfer(normalizeAccountId(bob), reFungibleCollectionId, newReFungibleTokenId, 0);288 // transfer to own proxy289 await collection.transfer(owner, {Ethereum: ownerProxy}, 10n);329 await submitTransactionAsync(alice, transferTx);290 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(90n);291 expect(await collection.getBalance({Ethereum: ownerProxy})).to.be.equal(10n);330292331 const balanceAfterAlice = await getTokenBalance(api, reFungibleCollectionId, normalizeAccountId(alice), newReFungibleTokenId);293 // transfer-from own proxy to self332 const balanceAfterBob = await getTokenBalance(api, reFungibleCollectionId, normalizeAccountId(bob), newReFungibleTokenId);294 await collection.transferFrom(owner, {Ethereum: ownerProxy}, {Substrate: owner.address}, 5n);333334 expect((balanceBeforeAlice)).to.be.equal(balanceAfterAlice);295 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(95n);335 expect((balanceBeforeBob)).to.be.equal(balanceAfterBob);296 expect(await collection.getBalance({Ethereum: ownerProxy})).to.be.equal(5n);336 });337 });297 });338298339 it('Fungible', async () => {299 itEth('Transfers to self. In case of inside substrate-evm', async ({helper}) => {340 await usingApi(async (api: ApiPromise) => {341 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});300 const [owner] = await helper.arrange.createAccounts([10n], donor);342 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');301 const collection = await helper.ft.mintCollection(owner, {});343 const balanceBeforeAlice = await getTokenBalance(api, fungibleCollectionId, normalizeAccountId(alice), newFungibleTokenId);302 await collection.mint(owner, 100n);344 const balanceBeforeBob = await getTokenBalance(api, fungibleCollectionId, normalizeAccountId(bob), newFungibleTokenId);345303346 const transferTx = api.tx.unique.transfer(normalizeAccountId(bob), fungibleCollectionId, newFungibleTokenId, 0);304 // transfer to self again305 await collection.transfer(owner, {Substrate: owner.address}, 10n);347 await submitTransactionAsync(alice, transferTx);306 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(100n);348307349 const balanceAfterAlice = await getTokenBalance(api, fungibleCollectionId, normalizeAccountId(alice), newFungibleTokenId);308 // transfer-from self to self again350 const balanceAfterBob = await getTokenBalance(api, fungibleCollectionId, normalizeAccountId(bob), newFungibleTokenId);309 await collection.transferFrom(owner, {Substrate: owner.address}, {Substrate: owner.address}, 5n);351352 expect((balanceBeforeAlice)).to.be.equal(balanceAfterAlice);310 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(100n);353 expect((balanceBeforeBob)).to.be.equal(balanceAfterBob);354 });355 });311 });356});357312358describe('Transfers to self (potentially over substrate-evm boundary)', () => {313 itEth('Transfers to self. In case of inside substrate-evm when not enought "Fungibles"', async ({helper}) => {359 itWeb3('Transfers to self. In case of same frontend', async ({api, privateKeyWrapper}) => {360 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});314 const [owner] = await helper.arrange.createAccounts([10n], donor);361 const aliceProxy = subToEth(alice.address);362 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});363 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, 10, 'Fungible');364 const balanceAliceBefore = await getTokenBalance(api, collectionId, {Ethereum: aliceProxy}, tokenId);315 const collection = await helper.ft.mintCollection(owner, {});365 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, {Ethereum: aliceProxy}, 10, 'Fungible');316 await collection.mint(owner, 10n);366 const balanceAliceAfter = await getTokenBalance(api, collectionId, {Ethereum: aliceProxy}, tokenId);367 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);368 });369317370 itWeb3('Transfers to self. In case of substrate-evm boundary', async ({api, privateKeyWrapper}) => {318 // transfer to self again371 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});319 await expect(collection.transfer(owner, {Substrate: owner.address}, 11n))372 const aliceProxy = subToEth(alice.address);373 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});374 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);375 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy} , 10, 'Fungible');376 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, alice, 10, 'Fungible');377 const balanceAliceAfter = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);378 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);379 });380381 itWeb3('Transfers to self. In case of inside substrate-evm', async ({api, privateKeyWrapper}) => {382 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});383 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});384 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);385 await transferExpectSuccess(collectionId, tokenId, alice, alice , 10, 'Fungible');320 .to.be.rejectedWith(/common\.TokenValueTooLow/);386 await transferFromExpectSuccess(collectionId, tokenId, alice, alice, alice, 10, 'Fungible');387 const balanceAliceAfter = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);388 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);389 });390321391 itWeb3('Transfers to self. In case of inside substrate-evm when not enought "Fungibles"', async ({api, privateKeyWrapper}) => {322 // transfer-from self to self again392 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});323 await expect(collection.transferFrom(owner, {Substrate: owner.address}, {Substrate: owner.address}, 12n))393 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});394 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);395 await transferExpectFailure(collectionId, tokenId, alice, alice , 11);324 .to.be.rejectedWith(/common\.TokenValueTooLow/);396 await transferFromExpectFail(collectionId, tokenId, alice, alice, alice, 11);397 const balanceAliceAfter = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);325 expect(await collection.getBalance({Substrate: owner.address})).to.be.equal(10n);398 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);399 });326 });400});327});401328tests/src/transferFrom.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {ApiPromise} from '@polkadot/api';18import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';19import chai from 'chai';18import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';20import chaiAsPromised from 'chai-as-promised';21import {default as usingApi} from './substrate/substrate-api';22import {23 approveExpectFail,24 approveExpectSuccess,25 createCollectionExpectSuccess,26 createFungibleItemExpectSuccess,27 createItemExpectSuccess,28 getAllowance,29 transferFromExpectFail,30 transferFromExpectSuccess,31 burnItemExpectSuccess,32 setCollectionLimitsExpectSuccess,33 getCreatedCollectionCount,34 requirePallets,35 Pallets,36} from './util/helpers';371938chai.use(chaiAsPromised);39const expect = chai.expect;4041describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {20describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {42 let alice: IKeyringPair;21 let alice: IKeyringPair;43 let bob: IKeyringPair;22 let bob: IKeyringPair;44 let charlie: IKeyringPair;23 let charlie: IKeyringPair;452446 before(async () => {25 before(async () => {47 await usingApi(async (api, privateKeyWrapper) => {26 await usingPlaygrounds(async (helper, privateKey) => {48 alice = privateKeyWrapper('//Alice');27 const donor = privateKey('//Alice');49 bob = privateKeyWrapper('//Bob');28 [alice, bob, charlie] = await helper.arrange.createAccounts([20n, 10n, 10n], donor);50 charlie = privateKeyWrapper('//Charlie');51 });29 });52 });30 });533154 it('[nft] Execute the extrinsic and check nftItemList - owner of token', async () => {32 itSub('[nft] Execute the extrinsic and check nftItemList - owner of token', async ({helper}) => {55 const nftCollectionId = await createCollectionExpectSuccess();33 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-1', description: '', tokenPrefix: 'TF'});56 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');34 const nft = await collection.mintToken(alice);35 await nft.approve(alice, {Substrate: bob.address});57 await approveExpectSuccess(nftCollectionId, newNftTokenId, alice, bob.address);36 expect(await nft.isApproved({Substrate: bob.address})).to.be.true;583759 await transferFromExpectSuccess(nftCollectionId, newNftTokenId, bob, alice, charlie, 1, 'NFT');38 await nft.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address});39 expect(await nft.getOwner()).to.be.deep.equal({Substrate: charlie.address});60 });40 });614162 it('[fungible] Execute the extrinsic and check nftItemList - owner of token', async () => {42 itSub('[fungible] Execute the extrinsic and check nftItemList - owner of token', async ({helper}) => {63 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});43 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-2', description: '', tokenPrefix: 'TF'});64 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');44 await collection.mint(alice, 10n);45 await collection.approveTokens(alice, {Substrate: bob.address}, 7n);65 await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob.address);46 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(7n);66 await transferFromExpectSuccess(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 1, 'Fungible');47 48 await collection.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 6n);49 expect(await collection.getBalance({Substrate: charlie.address})).to.be.equal(6n);50 expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(4n);51 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(1n);67 });52 });685369 it('[refungible] Execute the extrinsic and check nftItemList - owner of token', async function() {54 itSub.ifWithPallets('[refungible] Execute the extrinsic and check nftItemList - owner of token', [Pallets.ReFungible], async ({helper}) => {70 await requirePallets(this, [Pallets.ReFungible]);55 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-3', description: '', tokenPrefix: 'TF'});7172 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});73 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');56 const rft = await collection.mintToken(alice, 10n);74 await approveExpectSuccess(reFungibleCollectionId, newReFungibleTokenId, alice, bob.address, 100);57 await rft.approve(alice, {Substrate: bob.address}, 7n);75 await transferFromExpectSuccess(58 expect(await rft.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(7n);76 reFungibleCollectionId,77 newReFungibleTokenId,59 78 bob,60 await rft.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 6n);79 alice,80 charlie,61 expect(await rft.getBalance({Substrate: charlie.address})).to.be.equal(6n);81 100,62 expect(await rft.getBalance({Substrate: alice.address})).to.be.equal(4n);82 'ReFungible',63 expect(await rft.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(1n);83 );84 });64 });856586 it('Should reduce allowance if value is big', async () => {66 itSub('Should reduce allowance if value is big', async ({helper}) => {87 await usingApi(async (api, privateKeyWrapper) => {67 // fungible88 const alice = privateKeyWrapper('//Alice');68 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-4', description: '', tokenPrefix: 'TF'});89 const bob = privateKeyWrapper('//Bob');90 const charlie = privateKeyWrapper('//Charlie');69 await collection.mint(alice, 500000n);917092 // fungible71 await collection.approveTokens(alice, {Substrate: bob.address}, 500000n);93 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});94 const newFungibleTokenId = await createFungibleItemExpectSuccess(alice, fungibleCollectionId, {Value: 500000n});72 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(500000n);9596 await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob.address, 500000n);97 await transferFromExpectSuccess(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 500000n, 'Fungible');73 await collection.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 500000n);98 expect(await getAllowance(api, fungibleCollectionId, alice.address, bob.address, newFungibleTokenId)).to.equal(0n);74 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.equal(0n);99 });100 });75 });10176102 it('can be called by collection owner on non-owned item when OwnerCanTransfer == true', async () => {77 itSub('can be called by collection owner on non-owned item when OwnerCanTransfer == true', async ({helper}) => {103 const collectionId = await createCollectionExpectSuccess();78 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-5', description: '', tokenPrefix: 'TF'});104 await setCollectionLimitsExpectSuccess(alice, collectionId, {ownerCanTransfer: true});105 const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', bob.address);79 await collection.setLimits(alice, {ownerCanTransfer: true});10680107 await transferFromExpectSuccess(collectionId, itemId, alice, bob, charlie);81 const nft = await collection.mintToken(alice, {Substrate: bob.address});82 await nft.transferFrom(alice, {Substrate: bob.address}, {Substrate: charlie.address});83 expect(await nft.getOwner()).to.be.deep.equal({Substrate: charlie.address});108 });84 });109});85});11086114 let charlie: IKeyringPair;90 let charlie: IKeyringPair;11591116 before(async () => {92 before(async () => {117 await usingApi(async (api, privateKeyWrapper) => {93 await usingPlaygrounds(async (helper, privateKey) => {118 alice = privateKeyWrapper('//Alice');94 const donor = privateKey('//Alice');119 bob = privateKeyWrapper('//Bob');95 [alice, bob, charlie] = await helper.arrange.createAccounts([50n, 10n, 10n], donor);120 charlie = privateKeyWrapper('//Charlie');121 });96 });122 });97 });12398124 it('[nft] transferFrom for a collection that does not exist', async () => {99 itSub('transferFrom for a collection that does not exist', async ({helper}) => {125 await usingApi(async (api: ApiPromise) => {100 const collectionId = (1 << 32) - 1;126 const nftCollectionCount = await getCreatedCollectionCount(api);101 await expect(helper.collection.approveToken(alice, collectionId, 0, {Substrate: bob.address}, 1n))127 await approveExpectFail(nftCollectionCount + 1, 1, alice, bob);102 .to.be.rejectedWith(/common\.CollectionNotFound/);128129 await transferFromExpectFail(nftCollectionCount + 1, 1, bob, alice, charlie, 1);103 await expect(helper.collection.transferTokenFrom(bob, collectionId, 0, {Substrate: alice.address}, {Substrate: bob.address}, 1n))130 });104 .to.be.rejectedWith(/common\.CollectionNotFound/);131 });105 });132106133 it('[fungible] transferFrom for a collection that does not exist', async () => {107 /* itSub('transferFrom for a collection that was destroyed', async ({helper}) => {134 await usingApi(async (api: ApiPromise) => {135 const fungibleCollectionCount = await getCreatedCollectionCount(api);108 this test copies approve negative test136 await approveExpectFail(fungibleCollectionCount + 1, 0, alice, bob);109 }); */137110138 await transferFromExpectFail(fungibleCollectionCount + 1, 0, bob, alice, charlie, 1);111 /* itSub('transferFrom a token that does not exist', async ({helper}) => {112 this test copies approve negative test113 }); */114115 /* itSub('transferFrom a token that was deleted', async ({helper}) => {116 this test copies approve negative test117 }); */118119 itSub('[nft] transferFrom for not approved address', async ({helper}) => {120 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-1', description: '', tokenPrefix: 'TF'});121 const nft = await collection.mintToken(alice);122123 await expect(nft.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}))124 .to.be.rejectedWith(/common\.ApprovedValueTooLow/);139 });125 expect(await nft.getOwner()).to.be.deep.equal({Substrate: alice.address});140 });126 });141127142 it('[refungible] transferFrom for a collection that does not exist', async function() {128 itSub('[fungible] transferFrom for not approved address', async ({helper}) => {143 await requirePallets(this, [Pallets.ReFungible]);129 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-Neg-1', description: '', tokenPrefix: 'TF'});130 await collection.mint(alice, 10n);144131145 await usingApi(async (api: ApiPromise) => {132 await expect(collection.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 5n))146 const reFungibleCollectionCount = await getCreatedCollectionCount(api);133 .to.be.rejectedWith(/common\.ApprovedValueTooLow/);134 expect(await collection.getBalance({Substrate: alice.address})).to.be.deep.equal(10n);147 await approveExpectFail(reFungibleCollectionCount + 1, 1, alice, bob);135 expect(await collection.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);136 expect(await collection.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);137 });148138149 await transferFromExpectFail(reFungibleCollectionCount + 1, 1, bob, alice, charlie, 1);139 itSub.ifWithPallets('[refungible] transferFrom for not approved address', [Pallets.ReFungible], async({helper}) => {140 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-Neg-3', description: '', tokenPrefix: 'TF'});141 const rft = await collection.mintToken(alice, 10n);142143 await expect(rft.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}))144 .to.be.rejectedWith(/common\.ApprovedValueTooLow/);150 });145 expect(await rft.getBalance({Substrate: alice.address})).to.be.deep.equal(10n);146 expect(await rft.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);147 expect(await rft.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);151 });148 });152149153 /* it('transferFrom for a collection that was destroyed', async () => {150 itSub('[nft] transferFrom incorrect token count', async ({helper}) => {154 await usingApi(async (api: ApiPromise) => {151 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-4', description: '', tokenPrefix: 'TF'});155 this test copies approve negative test152 const nft = await collection.mintToken(alice);156 });157 }); */158153159 /* it('transferFrom a token that does not exist', async () => {154 await nft.approve(alice, {Substrate: bob.address});160 await usingApi(async (api: ApiPromise) => {155 expect(await nft.isApproved({Substrate: bob.address})).to.be.true;161 this test copies approve negative test162 });163 }); */164156165 /* it('transferFrom a token that was deleted', async () => {157 await expect(helper.collection.transferTokenFrom(158 bob, 159 collection.collectionId, 166 await usingApi(async (api: ApiPromise) => {160 nft.tokenId, 161 {Substrate: alice.address}, 167 this test copies approve negative test162 {Substrate: charlie.address}, 163 2n,168 });164 )).to.be.rejectedWith(/nonfungible\.NonfungibleItemsHaveNoAmount/);165 expect(await nft.getOwner()).to.be.deep.equal({Substrate: alice.address});169 }); */166 });170167171 it('[nft] transferFrom for not approved address', async () => {168 itSub('[fungible] transferFrom incorrect token count', async ({helper}) => {172 const nftCollectionId = await createCollectionExpectSuccess();169 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-Neg-5', description: '', tokenPrefix: 'TF'});173 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');170 await collection.mint(alice, 10n);174171175 await transferFromExpectFail(nftCollectionId, newNftTokenId, bob, alice, charlie, 1);172 await collection.approveTokens(alice, {Substrate: bob.address}, 2n);173 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(2n);174175 await expect(collection.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 5n))176 .to.be.rejectedWith(/common\.ApprovedValueTooLow/);177 expect(await collection.getBalance({Substrate: alice.address})).to.be.deep.equal(10n);178 expect(await collection.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);179 expect(await collection.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);176 });180 });177181178 it('[fungible] transferFrom for not approved address', async () => {182 itSub.ifWithPallets('[refungible] transferFrom incorrect token count', [Pallets.ReFungible], async ({helper}) => {179 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});183 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-Neg-6', description: '', tokenPrefix: 'TF'});180 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');184 const rft = await collection.mintToken(alice, 10n);185186 await rft.approve(alice, {Substrate: bob.address}, 5n);181 await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 1);187 expect(await rft.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(5n);188189 await expect(rft.transferFrom(bob, {Substrate: alice.address}, {Substrate: charlie.address}, 7n))190 .to.be.rejectedWith(/common\.ApprovedValueTooLow/);191 expect(await rft.getBalance({Substrate: alice.address})).to.be.deep.equal(10n);192 expect(await rft.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);193 expect(await rft.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);182 });194 });183195184 it('[refungible] transferFrom for not approved address', async function() {196 itSub('[nft] execute transferFrom from account that is not owner of collection', async ({helper}) => {185 await requirePallets(this, [Pallets.ReFungible]);197 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-7', description: '', tokenPrefix: 'TF'});198 const nft = await collection.mintToken(alice);186199187 const reFungibleCollectionId = await200 await expect(nft.approve(charlie, {Substrate: bob.address})).to.be.rejectedWith(/common\.CantApproveMoreThanOwned/);188 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});189 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');201 expect(await nft.isApproved({Substrate: bob.address})).to.be.false;202190 await transferFromExpectFail(203 await expect(nft.transferFrom(191 reFungibleCollectionId,192 newReFungibleTokenId,193 bob,194 alice,195 charlie,204 charlie,196 1,205 {Substrate: alice.address}, 197 );206 {Substrate: charlie.address},207 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);208 expect(await nft.getOwner()).to.be.deep.equal({Substrate: alice.address});198 });209 });199210200 it('[nft] transferFrom incorrect token count', async () => {211 itSub('[fungible] execute transferFrom from account that is not owner of collection', async ({helper}) => {201 const nftCollectionId = await createCollectionExpectSuccess();212 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-Neg-8', description: '', tokenPrefix: 'TF'});202 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');203 await approveExpectSuccess(nftCollectionId, newNftTokenId, alice, bob.address);213 await collection.mint(alice, 10000n);204214205 await transferFromExpectFail(nftCollectionId, newNftTokenId, bob, alice, charlie, 2);215 await expect(collection.approveTokens(charlie, {Substrate: bob.address}, 1n)).to.be.rejectedWith(/common\.CantApproveMoreThanOwned/);216 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(0n);206 });217 expect(await collection.getApprovedTokens({Substrate: charlie.address}, {Substrate: bob.address})).to.be.eq(0n);207218208 it('[fungible] transferFrom incorrect token count', async () => {219 await expect(collection.transferFrom(220 charlie,209 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});221 {Substrate: alice.address}, 222 {Substrate: charlie.address},223 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);210 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');224 expect(await collection.getBalance({Substrate: alice.address})).to.be.deep.equal(10000n);211 await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob.address);225 expect(await collection.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);212 await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 2);226 expect(await collection.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);213 });227 });214228215 it('[refungible] transferFrom incorrect token count', async function() {229 itSub.ifWithPallets('[refungible] execute transferFrom from account that is not owner of collection', [Pallets.ReFungible], async ({helper}) => {216 await requirePallets(this, [Pallets.ReFungible]);230 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-Neg-9', description: '', tokenPrefix: 'TF'});231 const rft = await collection.mintToken(alice, 10000n);217232218 const reFungibleCollectionId = await233 await expect(rft.approve(charlie, {Substrate: bob.address}, 1n)).to.be.rejectedWith(/common\.CantApproveMoreThanOwned/);219 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});220 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');234 expect(await rft.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(0n);221 await approveExpectSuccess(reFungibleCollectionId, newReFungibleTokenId, alice, bob.address);235 expect(await rft.getApprovedPieces({Substrate: charlie.address}, {Substrate: bob.address})).to.be.eq(0n);236222 await transferFromExpectFail(237 await expect(rft.transferFrom(223 reFungibleCollectionId,224 newReFungibleTokenId,225 bob,226 alice,227 charlie,238 charlie,228 2,239 {Substrate: alice.address}, 229 );240 {Substrate: charlie.address},241 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);242 expect(await rft.getBalance({Substrate: alice.address})).to.be.deep.equal(10000n);243 expect(await rft.getBalance({Substrate: bob.address})).to.be.deep.equal(0n);244 expect(await rft.getBalance({Substrate: charlie.address})).to.be.deep.equal(0n);230 });245 });231246232 it('[nft] execute transferFrom from account that is not owner of collection', async () => {247 itSub('transferFrom burnt token before approve NFT', async ({helper}) => {233 await usingApi(async (api, privateKeyWrapper) => {234 const dave = privateKeyWrapper('//Dave');248 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-10', description: '', tokenPrefix: 'TF'});235 const nftCollectionId = await createCollectionExpectSuccess();236 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');237 try {238 await approveExpectFail(nftCollectionId, newNftTokenId, dave, bob);239 await transferFromExpectFail(nftCollectionId, newNftTokenId, dave, alice, charlie, 1);249 await collection.setLimits(alice, {ownerCanTransfer: true});240 } catch (e) {250 const nft = await collection.mintToken(alice);241 // tslint:disable-next-line:no-unused-expression242 expect(e).to.be.exist;243 }244251245 // await transferFromExpectFail(nftCollectionId, newNftTokenId, Dave, Alice, Charlie, 1);252 await nft.burn(alice);253 await expect(nft.approve(alice, {Substrate: bob.address})).to.be.rejectedWith(/common\.TokenNotFound/);254255 await expect(nft.transferFrom(256 bob,257 {Substrate: alice.address}, 246 });258 {Substrate: charlie.address},259 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);247 });260 });248261249 it('[fungible] execute transferFrom from account that is not owner of collection', async () => {262 itSub('transferFrom burnt token before approve Fungible', async ({helper}) => {250 await usingApi(async (api, privateKeyWrapper) => {263 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-Neg-11', description: '', tokenPrefix: 'TF'});251 const dave = privateKeyWrapper('//Dave');264 await collection.setLimits(alice, {ownerCanTransfer: true});265 await collection.mint(alice, 10n);252266253 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});267 await collection.burnTokens(alice, 10n);254 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');268 await expect(collection.approveTokens(alice, {Substrate: bob.address})).to.be.not.rejected;255 try {269256 await approveExpectFail(fungibleCollectionId, newFungibleTokenId, dave, bob);270 await expect(collection.transferFrom(257 await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, dave, alice, charlie, 1);271 alice,258 } catch (e) {272 {Substrate: alice.address}, 259 // tslint:disable-next-line:no-unused-expression273 {Substrate: charlie.address},260 expect(e).to.be.exist;274 )).to.be.rejectedWith(/common\.TokenValueTooLow/);261 }262 });263 });275 });264276265 it('[refungible] execute transferFrom from account that is not owner of collection', async function() {277 itSub.ifWithPallets('transferFrom burnt token before approve ReFungible', [Pallets.ReFungible], async ({helper}) => {278 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-Neg-12', description: '', tokenPrefix: 'TF'});279 await collection.setLimits(alice, {ownerCanTransfer: true});266 await requirePallets(this, [Pallets.ReFungible]);280 const rft = await collection.mintToken(alice, 10n);267281268 await usingApi(async (api, privateKeyWrapper) => {282 await rft.burn(alice, 10n);269 const dave = privateKeyWrapper('//Dave');270 const reFungibleCollectionId = await283 await expect(rft.approve(alice, {Substrate: bob.address})).to.be.rejectedWith(/common\.CantApproveMoreThanOwned/);271 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});272 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');273 try {274 await approveExpectFail(reFungibleCollectionId, newReFungibleTokenId, dave, bob);275 await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, dave, alice, charlie, 1);276 } catch (e) {277 // tslint:disable-next-line:no-unused-expression278 expect(e).to.be.exist;279 }280 });281 });282 it('transferFrom burnt token before approve NFT', async () => {283 await usingApi(async () => {284 // nft285 const nftCollectionId = await createCollectionExpectSuccess();286 await setCollectionLimitsExpectSuccess(alice, nftCollectionId, {ownerCanTransfer: true});287 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');288 await burnItemExpectSuccess(alice, nftCollectionId, newNftTokenId, 1);289 await approveExpectFail(nftCollectionId, newNftTokenId, alice, bob);290 await transferFromExpectFail(nftCollectionId, newNftTokenId, bob, alice, charlie, 1);291 });292 });293 it('transferFrom burnt token before approve Fungible', async () => {294 await usingApi(async () => {295 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});296 await setCollectionLimitsExpectSuccess(alice, fungibleCollectionId, {ownerCanTransfer: true});297 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');298 await burnItemExpectSuccess(alice, fungibleCollectionId, newFungibleTokenId, 10);299 await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob.address);300 await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 1);301284302 });285 await expect(rft.transferFrom(286 alice,287 {Substrate: alice.address}, 288 {Substrate: charlie.address},289 )).to.be.rejectedWith(/common\.TokenValueTooLow/);303 });290 });304 it('transferFrom burnt token before approve ReFungible', async function() {305 await requirePallets(this, [Pallets.ReFungible]);306291307 await usingApi(async () => {292 itSub('transferFrom burnt token after approve NFT', async ({helper}) => {308 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});293 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-13', description: '', tokenPrefix: 'TF'});309 await setCollectionLimitsExpectSuccess(alice, reFungibleCollectionId, {ownerCanTransfer: true});310 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');294 const nft = await collection.mintToken(alice);311 await burnItemExpectSuccess(alice, reFungibleCollectionId, newReFungibleTokenId, 100);312 await approveExpectFail(reFungibleCollectionId, newReFungibleTokenId, alice, bob);313 await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, bob, alice, charlie, 1);314295315 });296 await nft.approve(alice, {Substrate: bob.address});316 });297 expect(await nft.isApproved({Substrate: bob.address})).to.be.true;317298318 it('transferFrom burnt token after approve NFT', async () => {299 await nft.burn(alice);319 await usingApi(async () => {300320 // nft321 const nftCollectionId = await createCollectionExpectSuccess();301 await expect(nft.transferFrom(322 const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');302 bob,323 await approveExpectSuccess(nftCollectionId, newNftTokenId, alice, bob.address);303 {Substrate: alice.address}, 324 await burnItemExpectSuccess(alice, nftCollectionId, newNftTokenId, 1);325 await transferFromExpectFail(nftCollectionId, newNftTokenId, bob, alice, charlie, 1);304 {Substrate: charlie.address},326 });305 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);327 });306 });328 it('transferFrom burnt token after approve Fungible', async () => {329 await usingApi(async () => {330 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});331 const newFungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');332 await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, alice, bob.address);333 await burnItemExpectSuccess(alice, fungibleCollectionId, newFungibleTokenId, 10);334 await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, bob, alice, charlie, 1);335307336 });308 itSub('transferFrom burnt token after approve Fungible', async ({helper}) => {309 const collection = await helper.ft.mintCollection(alice, {name: 'TransferFrom-Neg-14', description: '', tokenPrefix: 'TF'});310 await collection.mint(alice, 10n);311312 await collection.approveTokens(alice, {Substrate: bob.address});313 expect(await collection.getApprovedTokens({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(1n);314315 await collection.burnTokens(alice, 10n);316317 await expect(collection.transferFrom(318 bob,319 {Substrate: alice.address}, 320 {Substrate: charlie.address},321 )).to.be.rejectedWith(/common\.TokenValueTooLow/);337 });322 });338 it('transferFrom burnt token after approve ReFungible', async function() {339 await requirePallets(this, [Pallets.ReFungible]);340323341 await usingApi(async () => {324 itSub.ifWithPallets('transferFrom burnt token after approve ReFungible', [Pallets.ReFungible], async ({helper}) => {342 const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});325 const collection = await helper.rft.mintCollection(alice, {name: 'TransferFrom-Neg-15', description: '', tokenPrefix: 'TF'});343 const newReFungibleTokenId = await createItemExpectSuccess(alice, reFungibleCollectionId, 'ReFungible');344 await approveExpectSuccess(reFungibleCollectionId, newReFungibleTokenId, alice, bob.address);345 await burnItemExpectSuccess(alice, reFungibleCollectionId, newReFungibleTokenId, 100);326 const rft = await collection.mintToken(alice, 10n);346 await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, bob, alice, charlie, 1);347327348 });328 await rft.approve(alice, {Substrate: bob.address}, 10n);329 expect(await rft.getApprovedPieces({Substrate: alice.address}, {Substrate: bob.address})).to.be.eq(10n);330331 await rft.burn(alice, 10n);332333 await expect(rft.transferFrom(334 bob,335 {Substrate: alice.address}, 336 {Substrate: charlie.address},337 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);349 });338 });350339351 it('fails when called by collection owner on non-owned item when OwnerCanTransfer == false', async () => {340 itSub('fails when called by collection owner on non-owned item when OwnerCanTransfer == false', async ({helper}) => {352 const collectionId = await createCollectionExpectSuccess();341 const collection = await helper.nft.mintCollection(alice, {name: 'TransferFrom-Neg-16', description: '', tokenPrefix: 'TF'});353 const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', bob.address);354 await setCollectionLimitsExpectSuccess(alice, collectionId, {ownerCanTransfer: false});342 const nft = await collection.mintToken(alice, {Substrate: bob.address});355343356 await transferFromExpectFail(collectionId, itemId, alice, bob, charlie);344 await collection.setLimits(alice, {ownerCanTransfer: false});345346 await expect(nft.transferFrom(347 alice,348 {Substrate: bob.address}, 349 {Substrate: charlie.address},350 )).to.be.rejectedWith(/common\.ApprovedValueTooLow/);357 });351 });358});352});359353tests/src/util/playgrounds/index.tsdiffbeforeafterboth2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0334import {IKeyringPair} from '@polkadot/types/types';4import {IKeyringPair} from '@polkadot/types/types';5import chai from 'chai';6import chaiAsPromised from 'chai-as-promised';5import {Context} from 'mocha';7import {Context} from 'mocha';6import config from '../../config';8import config from '../../config';7import '../../interfaces/augment-api-events';9import '../../interfaces/augment-api-events';8import {DevUniqueHelper, SilentLogger, SilentConsole} from './unique.dev';10import {DevUniqueHelper, SilentLogger, SilentConsole} from './unique.dev';9111213chai.use(chaiAsPromised);14export const expect = chai.expect;101511export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {16export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {12 const silentConsole = new SilentConsole();17 const silentConsole = new SilentConsole();tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth257 }257 }258258259 async forParachainBlockNumber(blockNumber: bigint) {259 async forParachainBlockNumber(blockNumber: bigint) {260 // eslint-disable-next-line no-async-promise-executor260 return new Promise<void>(async (resolve) => {261 return new Promise<void>(async (resolve) => {261 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(async (data: any) => {262 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(async (data: any) => {262 if (data.number.toNumber() >= blockNumber) {263 if (data.number.toNumber() >= blockNumber) {268 }269 }269 270 270 async forRelayBlockNumber(blockNumber: bigint) {271 async forRelayBlockNumber(blockNumber: bigint) {272 // eslint-disable-next-line no-async-promise-executor271 return new Promise<void>(async (resolve) => {273 return new Promise<void>(async (resolve) => {272 const unsubscribe = await this.helper.api!.query.parachainSystem.validationData(async (data: any) => {274 const unsubscribe = await this.helper.api!.query.parachainSystem.validationData(async (data: any) => {273 if (data.value.relayParentNumber.toNumber() >= blockNumber) {275 if (data.value.relayParentNumber.toNumber() >= blockNumber) {tests/src/util/playgrounds/unique.tsdiffbeforeafterboth1678 * @example mintTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq"}, 1000n);1678 * @example mintTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq"}, 1000n);1679 * @returns ```true``` if extrinsic success, otherwise ```false``` 1679 * @returns ```true``` if extrinsic success, otherwise ```false``` 1680 */1680 */1681 async mintTokens(signer: TSigner, collectionId: number, owner: ICrossAccountId | string, amount: bigint): Promise<boolean> {1681 async mintTokens(signer: TSigner, collectionId: number, amount: bigint, owner: ICrossAccountId | string): Promise<boolean> {1682 const creationResult = await this.helper.executeExtrinsic(1682 const creationResult = await this.helper.executeExtrinsic(1683 signer,1683 signer,1684 'api.tx.unique.createItem', [collectionId, (typeof owner === 'string') ? {Substrate: owner} : owner, {1684 'api.tx.unique.createItem', [collectionId, (typeof owner === 'string') ? {Substrate: owner} : owner, {1699 * @param tokens array of tokens with properties and pieces1699 * @param tokens array of tokens with properties and pieces1700 * @returns ```true``` if extrinsic success, otherwise ```false``` 1700 * @returns ```true``` if extrinsic success, otherwise ```false``` 1701 */1701 */1702 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {value: bigint}[]): Promise<boolean> {1702 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, tokens: {value: bigint}[], owner: ICrossAccountId): Promise<boolean> {1703 const rawTokens = [];1703 const rawTokens = [];1704 for (const token of tokens) {1704 for (const token of tokens) {1705 const raw = {Fungible: {Value: token.value}};1705 const raw = {Fungible: {Value: token.value}};2128 return await this.helper.collection.addAdmin(signer, this.collectionId, adminAddressObj);2128 return await this.helper.collection.addAdmin(signer, this.collectionId, adminAddressObj);2129 }2129 }21302131 async enableCertainPermissions(signer: TSigner, accessMode: 'AllowList' | 'Normal' | undefined = 'AllowList', mintMode: boolean | undefined = true) {2132 return await this.setPermissions(signer, {access: accessMode, mintMode: mintMode});2133 }213421302135 async addToAllowList(signer: TSigner, addressObj: ICrossAccountId) {2131 async addToAllowList(signer: TSigner, addressObj: ICrossAccountId) {2136 return await this.helper.collection.addToAllowList(signer, this.collectionId, addressObj);2132 return await this.helper.collection.addToAllowList(signer, this.collectionId, addressObj);2215 return await this.helper.nft.isTokenApproved(this.collectionId, tokenId, toAddressObj);2211 return await this.helper.nft.isTokenApproved(this.collectionId, tokenId, toAddressObj);2216 }2212 }221722132218 async mintToken(signer: TSigner, owner: ICrossAccountId, properties?: IProperty[]) {2214 async mintToken(signer: TSigner, owner: ICrossAccountId = {Substrate: signer.address}, properties?: IProperty[]) {2219 return await this.helper.nft.mintToken(signer, {collectionId: this.collectionId, owner, properties});2215 return await this.helper.nft.mintToken(signer, {collectionId: this.collectionId, owner, properties});2220 }2216 }222122172290 return await this.helper.rft.repartitionToken(signer, this.collectionId, tokenId, amount);2286 return await this.helper.rft.repartitionToken(signer, this.collectionId, tokenId, amount);2291 }2287 }229222882293 async mintToken(signer: TSigner, owner: ICrossAccountId, pieces=100n, properties?: IProperty[]) {2289 async mintToken(signer: TSigner, pieces=1n, owner: ICrossAccountId = {Substrate: signer.address}, properties?: IProperty[]) {2294 return await this.helper.rft.mintToken(signer, {collectionId: this.collectionId, owner, pieces, properties});2290 return await this.helper.rft.mintToken(signer, {collectionId: this.collectionId, owner, pieces, properties});2295 }2291 }229622922297 async mintMultipleTokens(signer: TSigner, tokens: {owner: ICrossAccountId, pieces: bigint, properties?: IProperty[]}[]) {2293 async mintMultipleTokens(signer: TSigner, tokens: {pieces: bigint, owner: ICrossAccountId, properties?: IProperty[]}[]) {2298 return await this.helper.rft.mintMultipleTokens(signer, this.collectionId, tokens);2294 return await this.helper.rft.mintMultipleTokens(signer, this.collectionId, tokens);2299 }2295 }2300229623172313231823142319class UniqueFTCollection extends UniqueCollectionBase {2315class UniqueFTCollection extends UniqueCollectionBase {2320 async mint(signer: TSigner, owner: ICrossAccountId, amount: bigint) {2316 async mint(signer: TSigner, amount=1n, owner: ICrossAccountId = {Substrate: signer.address}) {2321 return await this.helper.ft.mintTokens(signer, this.collectionId, owner, amount);2317 return await this.helper.ft.mintTokens(signer, this.collectionId, amount, owner);2322 }2318 }232323192324 async mintWithOneOwner(signer: TSigner, owner: ICrossAccountId, tokens: {value: bigint}[]) {2320 async mintWithOneOwner(signer: TSigner, tokens: {value: bigint}[], owner: ICrossAccountId = {Substrate: signer.address}) {2325 return await this.helper.ft.mintMultipleTokensWithOneOwner(signer, this.collectionId, owner, tokens);2321 return await this.helper.ft.mintMultipleTokensWithOneOwner(signer, this.collectionId, tokens, owner);2326 }2322 }232723232328 async getBalance(addressObj: ICrossAccountId) {2324 async getBalance(addressObj: ICrossAccountId) {tests/src/xcmTransfer.test.tsdiffbeforeafterboth33const KARURA_PORT = '9946';33const KARURA_PORT = '9946';34const TRANSFER_AMOUNT = 2000000000000000000000000n;34const TRANSFER_AMOUNT = 2000000000000000000000000n;353536// todo:playgrounds refit when XCM drops36describe.skip('Integration test: Exchanging QTZ with Karura', () => {37describe.skip('Integration test: Exchanging QTZ with Karura', () => {37 let alice: IKeyringPair;38 let alice: IKeyringPair;3839tests/yarn.lockdiffbeforeafterboth17 dependencies:17 dependencies:18 "@babel/highlight" "^7.18.6"18 "@babel/highlight" "^7.18.6"191920"@babel/compat-data@^7.18.8":20"@babel/compat-data@^7.19.0":21 version "7.18.8"21 version "7.19.0"22 resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d"22 resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86"23 integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==23 integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==242425"@babel/core@^7.18.10":25"@babel/core@^7.18.10":26 version "7.18.10"26 version "7.19.0"27 resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8"27 resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.0.tgz#d2f5f4f2033c00de8096be3c9f45772563e150c3"28 integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==28 integrity sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==29 dependencies:29 dependencies:30 "@ampproject/remapping" "^2.1.0"30 "@ampproject/remapping" "^2.1.0"31 "@babel/code-frame" "^7.18.6"31 "@babel/code-frame" "^7.18.6"32 "@babel/generator" "^7.18.10"32 "@babel/generator" "^7.19.0"33 "@babel/helper-compilation-targets" "^7.18.9"33 "@babel/helper-compilation-targets" "^7.19.0"34 "@babel/helper-module-transforms" "^7.18.9"34 "@babel/helper-module-transforms" "^7.19.0"35 "@babel/helpers" "^7.18.9"35 "@babel/helpers" "^7.19.0"36 "@babel/parser" "^7.18.10"36 "@babel/parser" "^7.19.0"37 "@babel/template" "^7.18.10"37 "@babel/template" "^7.18.10"38 "@babel/traverse" "^7.18.10"38 "@babel/traverse" "^7.19.0"39 "@babel/types" "^7.18.10"39 "@babel/types" "^7.19.0"40 convert-source-map "^1.7.0"40 convert-source-map "^1.7.0"41 debug "^4.1.0"41 debug "^4.1.0"42 gensync "^1.0.0-beta.2"42 gensync "^1.0.0-beta.2"43 json5 "^2.2.1"43 json5 "^2.2.1"44 semver "^6.3.0"44 semver "^6.3.0"454546"@babel/generator@^7.18.10":46"@babel/generator@^7.19.0":47 version "7.18.12"47 version "7.19.0"48 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4"48 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a"49 integrity sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==49 integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==50 dependencies:50 dependencies:51 "@babel/types" "^7.18.10"51 "@babel/types" "^7.19.0"52 "@jridgewell/gen-mapping" "^0.3.2"52 "@jridgewell/gen-mapping" "^0.3.2"53 jsesc "^2.5.1"53 jsesc "^2.5.1"545455"@babel/helper-compilation-targets@^7.18.9":55"@babel/helper-compilation-targets@^7.19.0":56 version "7.18.9"56 version "7.19.0"57 resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf"57 resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz#537ec8339d53e806ed422f1e06c8f17d55b96bb0"58 integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==58 integrity sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==59 dependencies:59 dependencies:60 "@babel/compat-data" "^7.18.8"60 "@babel/compat-data" "^7.19.0"61 "@babel/helper-validator-option" "^7.18.6"61 "@babel/helper-validator-option" "^7.18.6"62 browserslist "^4.20.2"62 browserslist "^4.20.2"63 semver "^6.3.0"63 semver "^6.3.0"67 resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"67 resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"68 integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==68 integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==696970"@babel/helper-function-name@^7.18.9":70"@babel/helper-function-name@^7.19.0":71 version "7.18.9"71 version "7.19.0"72 resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0"72 resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c"73 integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==73 integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==74 dependencies:74 dependencies:75 "@babel/template" "^7.18.6"75 "@babel/template" "^7.18.10"76 "@babel/types" "^7.18.9"76 "@babel/types" "^7.19.0"777778"@babel/helper-hoist-variables@^7.18.6":78"@babel/helper-hoist-variables@^7.18.6":79 version "7.18.6"79 version "7.18.6"89 dependencies:89 dependencies:90 "@babel/types" "^7.18.6"90 "@babel/types" "^7.18.6"919192"@babel/helper-module-transforms@^7.18.9":92"@babel/helper-module-transforms@^7.19.0":93 version "7.18.9"93 version "7.19.0"94 resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712"94 resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30"95 integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==95 integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==96 dependencies:96 dependencies:97 "@babel/helper-environment-visitor" "^7.18.9"97 "@babel/helper-environment-visitor" "^7.18.9"98 "@babel/helper-module-imports" "^7.18.6"98 "@babel/helper-module-imports" "^7.18.6"99 "@babel/helper-simple-access" "^7.18.6"99 "@babel/helper-simple-access" "^7.18.6"100 "@babel/helper-split-export-declaration" "^7.18.6"100 "@babel/helper-split-export-declaration" "^7.18.6"101 "@babel/helper-validator-identifier" "^7.18.6"101 "@babel/helper-validator-identifier" "^7.18.6"102 "@babel/template" "^7.18.6"102 "@babel/template" "^7.18.10"103 "@babel/traverse" "^7.18.9"103 "@babel/traverse" "^7.19.0"104 "@babel/types" "^7.18.9"104 "@babel/types" "^7.19.0"105105106"@babel/helper-simple-access@^7.18.6":106"@babel/helper-simple-access@^7.18.6":107 version "7.18.6"107 version "7.18.6"132 resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"132 resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"133 integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==133 integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==134134135"@babel/helpers@^7.18.9":135"@babel/helpers@^7.19.0":136 version "7.18.9"136 version "7.19.0"137 resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9"137 resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18"138 integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==138 integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==139 dependencies:139 dependencies:140 "@babel/template" "^7.18.6"140 "@babel/template" "^7.18.10"141 "@babel/traverse" "^7.18.9"141 "@babel/traverse" "^7.19.0"142 "@babel/types" "^7.18.9"142 "@babel/types" "^7.19.0"143143144"@babel/highlight@^7.18.6":144"@babel/highlight@^7.18.6":145 version "7.18.6"145 version "7.18.6"150 chalk "^2.0.0"150 chalk "^2.0.0"151 js-tokens "^4.0.0"151 js-tokens "^4.0.0"152152153"@babel/parser@^7.18.10", "@babel/parser@^7.18.11":153"@babel/parser@^7.18.10", "@babel/parser@^7.19.0":154 version "7.18.11"154 version "7.19.0"155 resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9"155 resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c"156 integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==156 integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==157157158"@babel/register@^7.18.9":158"@babel/register@^7.18.9":159 version "7.18.9"159 version "7.18.9"167 source-map-support "^0.5.16"167 source-map-support "^0.5.16"168168169"@babel/runtime@^7.18.9":169"@babel/runtime@^7.18.9":170 version "7.18.9"170 version "7.19.0"171 resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a"171 resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"172 integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==172 integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==173 dependencies:173 dependencies:174 regenerator-runtime "^0.13.4"174 regenerator-runtime "^0.13.4"175175176"@babel/template@^7.18.10", "@babel/template@^7.18.6":176"@babel/template@^7.18.10":177 version "7.18.10"177 version "7.18.10"178 resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"178 resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"179 integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==179 integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==182 "@babel/parser" "^7.18.10"182 "@babel/parser" "^7.18.10"183 "@babel/types" "^7.18.10"183 "@babel/types" "^7.18.10"184184185"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9":185"@babel/traverse@^7.19.0":186 version "7.18.11"186 version "7.19.0"187 resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f"187 resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.0.tgz#eb9c561c7360005c592cc645abafe0c3c4548eed"188 integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==188 integrity sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==189 dependencies:189 dependencies:190 "@babel/code-frame" "^7.18.6"190 "@babel/code-frame" "^7.18.6"191 "@babel/generator" "^7.18.10"191 "@babel/generator" "^7.19.0"192 "@babel/helper-environment-visitor" "^7.18.9"192 "@babel/helper-environment-visitor" "^7.18.9"193 "@babel/helper-function-name" "^7.18.9"193 "@babel/helper-function-name" "^7.19.0"194 "@babel/helper-hoist-variables" "^7.18.6"194 "@babel/helper-hoist-variables" "^7.18.6"195 "@babel/helper-split-export-declaration" "^7.18.6"195 "@babel/helper-split-export-declaration" "^7.18.6"196 "@babel/parser" "^7.18.11"196 "@babel/parser" "^7.19.0"197 "@babel/types" "^7.18.10"197 "@babel/types" "^7.19.0"198 debug "^4.1.0"198 debug "^4.1.0"199 globals "^11.1.0"199 globals "^11.1.0"200200201"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9":201"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0":202 version "7.18.10"202 version "7.19.0"203 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6"203 resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600"204 integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==204 integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==205 dependencies:205 dependencies:206 "@babel/helper-string-parser" "^7.18.10"206 "@babel/helper-string-parser" "^7.18.10"207 "@babel/helper-validator-identifier" "^7.18.6"207 "@babel/helper-validator-identifier" "^7.18.6"214 dependencies:214 dependencies:215 "@jridgewell/trace-mapping" "0.3.9"215 "@jridgewell/trace-mapping" "0.3.9"216216217"@eslint/eslintrc@^1.3.0":217"@eslint/eslintrc@^1.3.1":218 version "1.3.0"218 version "1.3.1"219 resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f"219 resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d"220 integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==220 integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==221 dependencies:221 dependencies:222 ajv "^6.12.4"222 ajv "^6.12.4"223 debug "^4.3.2"223 debug "^4.3.2"224 espree "^9.3.2"224 espree "^9.4.0"225 globals "^13.15.0"225 globals "^13.15.0"226 ignore "^5.2.0"226 ignore "^5.2.0"227 import-fresh "^3.2.1"227 import-fresh "^3.2.1"246 ethereumjs-util "^7.1.5"246 ethereumjs-util "^7.1.5"247247248"@ethersproject/abi@^5.6.3":248"@ethersproject/abi@^5.6.3":249 version "5.6.4"249 version "5.7.0"250 resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362"250 resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449"251 integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg==251 integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==252 dependencies:252 dependencies:253 "@ethersproject/address" "^5.6.1"253 "@ethersproject/address" "^5.7.0"254 "@ethersproject/bignumber" "^5.6.2"254 "@ethersproject/bignumber" "^5.7.0"255 "@ethersproject/bytes" "^5.6.1"255 "@ethersproject/bytes" "^5.7.0"256 "@ethersproject/constants" "^5.6.1"256 "@ethersproject/constants" "^5.7.0"257 "@ethersproject/hash" "^5.6.1"257 "@ethersproject/hash" "^5.7.0"258 "@ethersproject/keccak256" "^5.6.1"258 "@ethersproject/keccak256" "^5.7.0"259 "@ethersproject/logger" "^5.6.0"259 "@ethersproject/logger" "^5.7.0"260 "@ethersproject/properties" "^5.6.0"260 "@ethersproject/properties" "^5.7.0"261 "@ethersproject/strings" "^5.6.1"261 "@ethersproject/strings" "^5.7.0"262262263"@ethersproject/abstract-provider@^5.6.1":263"@ethersproject/abstract-provider@^5.7.0":264 version "5.6.1"264 version "5.7.0"265 resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59"265 resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef"266 integrity sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ==266 integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==267 dependencies:267 dependencies:268 "@ethersproject/bignumber" "^5.6.2"268 "@ethersproject/bignumber" "^5.7.0"269 "@ethersproject/bytes" "^5.6.1"269 "@ethersproject/bytes" "^5.7.0"270 "@ethersproject/logger" "^5.6.0"270 "@ethersproject/logger" "^5.7.0"271 "@ethersproject/networks" "^5.6.3"271 "@ethersproject/networks" "^5.7.0"272 "@ethersproject/properties" "^5.6.0"272 "@ethersproject/properties" "^5.7.0"273 "@ethersproject/transactions" "^5.6.2"273 "@ethersproject/transactions" "^5.7.0"274 "@ethersproject/web" "^5.6.1"274 "@ethersproject/web" "^5.7.0"275275276"@ethersproject/abstract-signer@^5.6.2":276"@ethersproject/abstract-signer@^5.7.0":277 version "5.6.2"277 version "5.7.0"278 resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33"278 resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2"279 integrity sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ==279 integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==280 dependencies:280 dependencies:281 "@ethersproject/abstract-provider" "^5.6.1"281 "@ethersproject/abstract-provider" "^5.7.0"282 "@ethersproject/bignumber" "^5.6.2"282 "@ethersproject/bignumber" "^5.7.0"283 "@ethersproject/bytes" "^5.6.1"283 "@ethersproject/bytes" "^5.7.0"284 "@ethersproject/logger" "^5.6.0"284 "@ethersproject/logger" "^5.7.0"285 "@ethersproject/properties" "^5.6.0"285 "@ethersproject/properties" "^5.7.0"286286287"@ethersproject/address@^5.6.1":287"@ethersproject/address@^5.7.0":288 version "5.6.1"288 version "5.7.0"289 resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d"289 resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37"290 integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==290 integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==291 dependencies:291 dependencies:292 "@ethersproject/bignumber" "^5.6.2"292 "@ethersproject/bignumber" "^5.7.0"293 "@ethersproject/bytes" "^5.6.1"293 "@ethersproject/bytes" "^5.7.0"294 "@ethersproject/keccak256" "^5.6.1"294 "@ethersproject/keccak256" "^5.7.0"295 "@ethersproject/logger" "^5.6.0"295 "@ethersproject/logger" "^5.7.0"296 "@ethersproject/rlp" "^5.6.1"296 "@ethersproject/rlp" "^5.7.0"297297298"@ethersproject/base64@^5.6.1":298"@ethersproject/base64@^5.7.0":299 version "5.6.1"299 version "5.7.0"300 resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb"300 resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c"301 integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw==301 integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==302 dependencies:302 dependencies:303 "@ethersproject/bytes" "^5.6.1"303 "@ethersproject/bytes" "^5.7.0"304304305"@ethersproject/bignumber@^5.6.2":305"@ethersproject/bignumber@^5.7.0":306 version "5.6.2"306 version "5.7.0"307 resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66"307 resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2"308 integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw==308 integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==309 dependencies:309 dependencies:310 "@ethersproject/bytes" "^5.6.1"310 "@ethersproject/bytes" "^5.7.0"311 "@ethersproject/logger" "^5.6.0"311 "@ethersproject/logger" "^5.7.0"312 bn.js "^5.2.1"312 bn.js "^5.2.1"313313314"@ethersproject/bytes@^5.6.1":314"@ethersproject/bytes@^5.7.0":315 version "5.6.1"315 version "5.7.0"316 resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7"316 resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d"317 integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==317 integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==318 dependencies:318 dependencies:319 "@ethersproject/logger" "^5.6.0"319 "@ethersproject/logger" "^5.7.0"320320321"@ethersproject/constants@^5.6.1":321"@ethersproject/constants@^5.7.0":322 version "5.6.1"322 version "5.7.0"323 resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370"323 resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e"324 integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg==324 integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==325 dependencies:325 dependencies:326 "@ethersproject/bignumber" "^5.6.2"326 "@ethersproject/bignumber" "^5.7.0"327327328"@ethersproject/hash@^5.6.1":328"@ethersproject/hash@^5.7.0":329 version "5.6.1"329 version "5.7.0"330 resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4"330 resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7"331 integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA==331 integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==332 dependencies:332 dependencies:333 "@ethersproject/abstract-signer" "^5.6.2"333 "@ethersproject/abstract-signer" "^5.7.0"334 "@ethersproject/address" "^5.6.1"334 "@ethersproject/address" "^5.7.0"335 "@ethersproject/bignumber" "^5.6.2"335 "@ethersproject/base64" "^5.7.0"336 "@ethersproject/bignumber" "^5.7.0"336 "@ethersproject/bytes" "^5.6.1"337 "@ethersproject/bytes" "^5.7.0"337 "@ethersproject/keccak256" "^5.6.1"338 "@ethersproject/keccak256" "^5.7.0"338 "@ethersproject/logger" "^5.6.0"339 "@ethersproject/logger" "^5.7.0"339 "@ethersproject/properties" "^5.6.0"340 "@ethersproject/properties" "^5.7.0"340 "@ethersproject/strings" "^5.6.1"341 "@ethersproject/strings" "^5.7.0"341342342"@ethersproject/keccak256@^5.6.1":343"@ethersproject/keccak256@^5.7.0":343 version "5.6.1"344 version "5.7.0"344 resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc"345 resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a"345 integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA==346 integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==346 dependencies:347 dependencies:347 "@ethersproject/bytes" "^5.6.1"348 "@ethersproject/bytes" "^5.7.0"348 js-sha3 "0.8.0"349 js-sha3 "0.8.0"349350350"@ethersproject/logger@^5.6.0":351"@ethersproject/logger@^5.7.0":351 version "5.6.0"352 version "5.7.0"352 resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a"353 resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892"353 integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==354 integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==354355355"@ethersproject/networks@^5.6.3":356"@ethersproject/networks@^5.7.0":356 version "5.6.4"357 version "5.7.0"357 resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07"358 resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad"358 integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ==359 integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA==359 dependencies:360 dependencies:360 "@ethersproject/logger" "^5.6.0"361 "@ethersproject/logger" "^5.7.0"361362362"@ethersproject/properties@^5.6.0":363"@ethersproject/properties@^5.7.0":363 version "5.6.0"364 version "5.7.0"364 resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04"365 resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30"365 integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==366 integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==366 dependencies:367 dependencies:367 "@ethersproject/logger" "^5.6.0"368 "@ethersproject/logger" "^5.7.0"368369369"@ethersproject/rlp@^5.6.1":370"@ethersproject/rlp@^5.7.0":370 version "5.6.1"371 version "5.7.0"371 resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8"372 resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304"372 integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ==373 integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==373 dependencies:374 dependencies:374 "@ethersproject/bytes" "^5.6.1"375 "@ethersproject/bytes" "^5.7.0"375 "@ethersproject/logger" "^5.6.0"376 "@ethersproject/logger" "^5.7.0"376377377"@ethersproject/signing-key@^5.6.2":378"@ethersproject/signing-key@^5.7.0":378 version "5.6.2"379 version "5.7.0"379 resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3"380 resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3"380 integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ==381 integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==381 dependencies:382 dependencies:382 "@ethersproject/bytes" "^5.6.1"383 "@ethersproject/bytes" "^5.7.0"383 "@ethersproject/logger" "^5.6.0"384 "@ethersproject/logger" "^5.7.0"384 "@ethersproject/properties" "^5.6.0"385 "@ethersproject/properties" "^5.7.0"385 bn.js "^5.2.1"386 bn.js "^5.2.1"386 elliptic "6.5.4"387 elliptic "6.5.4"387 hash.js "1.1.7"388 hash.js "1.1.7"388389389"@ethersproject/strings@^5.6.1":390"@ethersproject/strings@^5.7.0":390 version "5.6.1"391 version "5.7.0"391 resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952"392 resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2"392 integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw==393 integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==393 dependencies:394 dependencies:394 "@ethersproject/bytes" "^5.6.1"395 "@ethersproject/bytes" "^5.7.0"395 "@ethersproject/constants" "^5.6.1"396 "@ethersproject/constants" "^5.7.0"396 "@ethersproject/logger" "^5.6.0"397 "@ethersproject/logger" "^5.7.0"397398398"@ethersproject/transactions@^5.6.2":399"@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0":399 version "5.6.2"400 version "5.7.0"400 resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b"401 resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b"401 integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q==402 integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==402 dependencies:403 dependencies:403 "@ethersproject/address" "^5.6.1"404 "@ethersproject/address" "^5.7.0"404 "@ethersproject/bignumber" "^5.6.2"405 "@ethersproject/bignumber" "^5.7.0"405 "@ethersproject/bytes" "^5.6.1"406 "@ethersproject/bytes" "^5.7.0"406 "@ethersproject/constants" "^5.6.1"407 "@ethersproject/constants" "^5.7.0"407 "@ethersproject/keccak256" "^5.6.1"408 "@ethersproject/keccak256" "^5.7.0"408 "@ethersproject/logger" "^5.6.0"409 "@ethersproject/logger" "^5.7.0"409 "@ethersproject/properties" "^5.6.0"410 "@ethersproject/properties" "^5.7.0"410 "@ethersproject/rlp" "^5.6.1"411 "@ethersproject/rlp" "^5.7.0"411 "@ethersproject/signing-key" "^5.6.2"412 "@ethersproject/signing-key" "^5.7.0"412413413"@ethersproject/web@^5.6.1":414"@ethersproject/web@^5.7.0":414 version "5.6.1"415 version "5.7.0"415 resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d"416 resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc"416 integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA==417 integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA==417 dependencies:418 dependencies:418 "@ethersproject/base64" "^5.6.1"419 "@ethersproject/base64" "^5.7.0"419 "@ethersproject/bytes" "^5.6.1"420 "@ethersproject/bytes" "^5.7.0"420 "@ethersproject/logger" "^5.6.0"421 "@ethersproject/logger" "^5.7.0"421 "@ethersproject/properties" "^5.6.0"422 "@ethersproject/properties" "^5.7.0"422 "@ethersproject/strings" "^5.6.1"423 "@ethersproject/strings" "^5.7.0"423424424"@humanwhocodes/config-array@^0.10.4":425"@humanwhocodes/config-array@^0.10.4":425 version "0.10.4"426 version "0.10.4"435 resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d"436 resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d"436 integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==437 integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==437438439"@humanwhocodes/module-importer@^1.0.1":440 version "1.0.1"441 resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"442 integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==443438"@humanwhocodes/object-schema@^1.2.1":444"@humanwhocodes/object-schema@^1.2.1":439 version "1.2.1"445 version "1.2.1"440 resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"446 resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"597 rxjs "^7.5.6"603 rxjs "^7.5.6"598604599"@polkadot/keyring@^10.1.4":605"@polkadot/keyring@^10.1.4":600 version "10.1.4"606 version "10.1.7"601 resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-10.1.4.tgz#7c60002cb442d2a160ee215b21c1319e85d97eaf"607 resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-10.1.7.tgz#d51be1dc5807c961889847d8f0e10e4bbdd19d3f"602 integrity sha512-dCMejp5heZwKSFeO+1vCHFoo1h1KgNvu4AaKQdNxpyr/3eCINrCFI74/qT9XGypblxd61caOpJcMl8B1R/UWFA==608 integrity sha512-lArwaAS3hDs+HHupDIC4r2mFaAfmNQV2YzwL2wM5zhOqB2RugN03BFrgwNll0y9/Bg8rYDqM3Y5BvVMzgMZ6XA==603 dependencies:609 dependencies:604 "@babel/runtime" "^7.18.9"610 "@babel/runtime" "^7.18.9"605 "@polkadot/util" "10.1.4"611 "@polkadot/util" "10.1.7"606 "@polkadot/util-crypto" "10.1.4"612 "@polkadot/util-crypto" "10.1.7"607613608"@polkadot/networks@10.1.1":614"@polkadot/networks@10.1.7", "@polkadot/networks@^10.1.4":609 version "10.1.1"615 version "10.1.7"610 resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-10.1.1.tgz#d3deeff5c4cfad8c1eec85732351d80d1b2d0934"616 resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-10.1.7.tgz#33b38d70409e2daf0990ef18ff150c6718ffb700"611 integrity sha512-upM8r0mrsCVA+vPVbJUjtnkAfdleBMHB+Fbxvy3xtbK1IFpzQTUhSOQb6lBnBAPBFGyxMtQ3TytnInckAdYZeg==617 integrity sha512-ol864SZ/GwAF72GQOPRy+Y9r6NtgJJjMBlDLESvV5VK64eEB0MRSSyiOdd7y/4SumR9crrrNimx3ynACFgxZ8A==612 dependencies:618 dependencies:613 "@babel/runtime" "^7.18.9"619 "@babel/runtime" "^7.18.9"614 "@polkadot/util" "10.1.1"620 "@polkadot/util" "10.1.7"615 "@substrate/ss58-registry" "^1.24.0"621 "@substrate/ss58-registry" "^1.28.0"616622617"@polkadot/networks@10.1.4", "@polkadot/networks@^10.1.4":618 version "10.1.4"619 resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-10.1.4.tgz#d8b375aad8f858f611165d8288eb5eab7275ca24"620 integrity sha512-5wMwqD+DeVMh29OZZBVkA4DQE9EBsUj5FjmUS2CloA8RzE6SV0qL34zhTwOdq95KJV1OoDbp9aGjCBqhEuozKw==621 dependencies:622 "@babel/runtime" "^7.18.9"623 "@polkadot/util" "10.1.4"624 "@substrate/ss58-registry" "^1.25.0"625626"@polkadot/rpc-augment@9.2.2":623"@polkadot/rpc-augment@9.2.2":627 version "9.2.2"624 version "9.2.2"628 resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-9.2.2.tgz#7246e6a43536296ad19be8460a81e434d718ff4c"625 resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-9.2.2.tgz#7246e6a43536296ad19be8460a81e434d718ff4c"758 "@polkadot/util-crypto" "^10.1.4"755 "@polkadot/util-crypto" "^10.1.4"759 rxjs "^7.5.6"756 rxjs "^7.5.6"760757761"@polkadot/util-crypto@10.1.1":758"@polkadot/util-crypto@10.1.7", "@polkadot/util-crypto@^10.1.4":762 version "10.1.1"759 version "10.1.7"763 resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-10.1.1.tgz#c6e16e626e55402fdb44c8bb20ce4a9d7c50b9db"760 resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-10.1.7.tgz#fe5ea006bf23ae19319f3ac9236905a984a65e2f"764 integrity sha512-R0V++xXbL2pvnCFIuXnKc/TlNhBkyxcno1u8rmjYNuH9S5GOmi2jY/8cNhbrwk6wafBsi+xMPHrEbUnduk82Ag==761 integrity sha512-zGmSU7a0wdWfpDtfc+Q7fUuW+extu9o1Uh4JpkuwwZ/dxmyW5xlfqVsIScM1pdPyjJsyamX8KwsKiVsW4slasg==765 dependencies:762 dependencies:766 "@babel/runtime" "^7.18.9"763 "@babel/runtime" "^7.18.9"767 "@noble/hashes" "1.1.2"764 "@noble/hashes" "1.1.2"768 "@noble/secp256k1" "1.6.3"765 "@noble/secp256k1" "1.6.3"769 "@polkadot/networks" "10.1.1"766 "@polkadot/networks" "10.1.7"770 "@polkadot/util" "10.1.1"767 "@polkadot/util" "10.1.7"771 "@polkadot/wasm-crypto" "^6.3.1"768 "@polkadot/wasm-crypto" "^6.3.1"772 "@polkadot/x-bigint" "10.1.1"769 "@polkadot/x-bigint" "10.1.7"773 "@polkadot/x-randomvalues" "10.1.1"770 "@polkadot/x-randomvalues" "10.1.7"774 "@scure/base" "1.1.1"771 "@scure/base" "1.1.1"775 ed2curve "^0.3.0"772 ed2curve "^0.3.0"776 tweetnacl "^1.0.3"773 tweetnacl "^1.0.3"777774778"@polkadot/util-crypto@10.1.4", "@polkadot/util-crypto@^10.1.4":775"@polkadot/util@10.1.7", "@polkadot/util@^10.1.4":779 version "10.1.4"776 version "10.1.7"780 resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-10.1.4.tgz#1d65a9b3d979f1cb078636a413cdf664db760a8b"777 resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-10.1.7.tgz#c54ca2a5b29cb834b40d8a876baefa3a0efb93af"781 integrity sha512-6rdUwCdbwmQ0PBWBNYh55RsXAcFjhco/TGLuM7GJ7YufrN9qqv1sr40HlneLbtpiZnfukZ3q/qOpj0h7Hrw2JQ==778 integrity sha512-s7gDLdNb4HUpoe3faXwoO6HwiUp8pi66voYKiUYRh1kEtW1o9vGBgyZPHPGC/FBgILzTJKii/9XxnSex60zBTA==782 dependencies:779 dependencies:783 "@babel/runtime" "^7.18.9"780 "@babel/runtime" "^7.18.9"784 "@noble/hashes" "1.1.2"781 "@polkadot/x-bigint" "10.1.7"785 "@noble/secp256k1" "1.6.3"786 "@polkadot/networks" "10.1.4"787 "@polkadot/util" "10.1.4"788 "@polkadot/wasm-crypto" "^6.3.1"789 "@polkadot/x-bigint" "10.1.4"790 "@polkadot/x-randomvalues" "10.1.4"791 "@scure/base" "1.1.1"792 ed2curve "^0.3.0"793 tweetnacl "^1.0.3"794795"@polkadot/util@10.1.1":796 version "10.1.1"797 resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-10.1.1.tgz#5aa20eac03806e70dc21e618a7f8cd767dac0fd0"798 integrity sha512-/g0sEqOOXfiNmQnWcFK3H1+wKBjbJEfGj6lTmbQ0xnL4TS5mFFQ7ZZEvxD60EkoXVMuCmSSh9E54goNLzh+Zyg==799 dependencies:800 "@babel/runtime" "^7.18.9"801 "@polkadot/x-bigint" "10.1.1"782 "@polkadot/x-global" "10.1.7"802 "@polkadot/x-global" "10.1.1"803 "@polkadot/x-textdecoder" "10.1.1"783 "@polkadot/x-textdecoder" "10.1.7"804 "@polkadot/x-textencoder" "10.1.1"784 "@polkadot/x-textencoder" "10.1.7"805 "@types/bn.js" "^5.1.0"785 "@types/bn.js" "^5.1.1"806 bn.js "^5.2.1"786 bn.js "^5.2.1"807787808"@polkadot/util@10.1.4", "@polkadot/util@^10.1.4":809 version "10.1.4"810 resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-10.1.4.tgz#29654dd52d5028fd9ca175e9cebad605fa79396c"811 integrity sha512-MHz1UxYXuV+XxPl+GR++yOUE0OCiVd+eJBqLgpjpVJNRkudbAmfGAbB2TNR0+76M0fevIeHj4DGEd0gY6vqKLw==812 dependencies:813 "@babel/runtime" "^7.18.9"814 "@polkadot/x-bigint" "10.1.4"815 "@polkadot/x-global" "10.1.4"816 "@polkadot/x-textdecoder" "10.1.4"817 "@polkadot/x-textencoder" "10.1.4"818 "@types/bn.js" "^5.1.0"819 bn.js "^5.2.1"820821"@polkadot/wasm-bridge@6.3.1":788"@polkadot/wasm-bridge@6.3.1":822 version "6.3.1"789 version "6.3.1"823 resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-6.3.1.tgz#439fa78e80947a7cb695443e1f64b25c30bb1487"790 resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-6.3.1.tgz#439fa78e80947a7cb695443e1f64b25c30bb1487"869 dependencies:836 dependencies:870 "@babel/runtime" "^7.18.9"837 "@babel/runtime" "^7.18.9"871838872"@polkadot/x-bigint@10.1.1":839"@polkadot/x-bigint@10.1.7", "@polkadot/x-bigint@^10.1.4":873 version "10.1.1"840 version "10.1.7"874 resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-10.1.1.tgz#c084cfdfe48633da07423f4d9916563882947563"841 resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-10.1.7.tgz#1338689476ffdbb9f9cb243df1954ae8186134b9"875 integrity sha512-YNYN64N4icKyqiDIw0tcGyWwz3g/282Kk0ozfcA5TM0wGRe2BwmoB4gYrZ7pJDxvsHnRPR6Dw0r9Xxh8DNIzHQ==842 integrity sha512-uaClHpI6cnDumIfejUKvNTkB43JleEb0V6OIufDKJ/e1aCLE3f/Ws9ggwL8ea05lQP5k5xqOzbPdizi/UvrgKQ==876 dependencies:843 dependencies:877 "@babel/runtime" "^7.18.9"844 "@babel/runtime" "^7.18.9"878 "@polkadot/x-global" "10.1.1"845 "@polkadot/x-global" "10.1.7"879846880"@polkadot/x-bigint@10.1.4", "@polkadot/x-bigint@^10.1.4":881 version "10.1.4"882 resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-10.1.4.tgz#a084a9d2f80f25ffd529faafdf95cd6c3044ef74"883 integrity sha512-qgLetTukFhkxNxNcUWMmnrfE9bp4TNbrqNoVBVH7wqSuEVpDPITBXsQ/78LbaaZGWD80Ew0wGxcZ/rqX+dLVUA==884 dependencies:885 "@babel/runtime" "^7.18.9"886 "@polkadot/x-global" "10.1.4"887888"@polkadot/x-fetch@^10.1.4":847"@polkadot/x-fetch@^10.1.4":889 version "10.1.4"848 version "10.1.7"890 resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-10.1.4.tgz#72db88007c74f3aee47f72091a33d553f7ca241a"849 resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-10.1.7.tgz#1b76051a495563403a20ef235a8558c6d91b11a6"891 integrity sha512-hVhLpOvx+ys6klkqWJnINi9FU/JcDnc+6cyU9fa+Dum3mqO1XnngOYDO9mpf5HODIwrFNFmohll9diRP+TW0yQ==850 integrity sha512-NL+xrlqUoCLwCIAvQLwOA189gSUgeSGOFjCmZ9uMkBqf35KXeZoHWse6YaoseTSlnAal3dQOGbXnYWZ4Ck2OSA==892 dependencies:851 dependencies:893 "@babel/runtime" "^7.18.9"852 "@babel/runtime" "^7.18.9"894 "@polkadot/x-global" "10.1.4"853 "@polkadot/x-global" "10.1.7"895 "@types/node-fetch" "^2.6.2"854 "@types/node-fetch" "^2.6.2"896 node-fetch "^3.2.10"855 node-fetch "^3.2.10"897856898"@polkadot/x-global@10.1.1":857"@polkadot/x-global@10.1.7", "@polkadot/x-global@^10.1.4":899 version "10.1.1"858 version "10.1.7"900 resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-10.1.1.tgz#d0d90ef71fd94f59605e8c73dcd1aa3e3dd4fc37"859 resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-10.1.7.tgz#91a472ac2f83fd0858dcd0df528844a5b650790e"901 integrity sha512-wB3rZTTNN14umLSfR2GLL0dJrlGM1YRUNw7XvbA+3B8jxGCIOmjSyAkdZBeiCxg2XIbJD3EkB0hBhga2mNuS6g==860 integrity sha512-k2ZUZyBVgDnP/Ysxapa0mthn63j6gsN2V0kZejEQPyOfCHtQQkse3jFvAWdslpWoR8j2k8SN5O6reHc0F4f7mA==902 dependencies:861 dependencies:903 "@babel/runtime" "^7.18.9"862 "@babel/runtime" "^7.18.9"904863905"@polkadot/x-global@10.1.4", "@polkadot/x-global@^10.1.4":864"@polkadot/x-randomvalues@10.1.7":906 version "10.1.4"865 version "10.1.7"907 resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-10.1.4.tgz#657f7054fe07a7c027b4d18fcfa3438d2ffaef07"866 resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-10.1.7.tgz#d537f1f7bf3fb03e6c08ae6e6ac36e069c1f9844"908 integrity sha512-67f53H872wHvmjmL96DvhC3dG7gKRG1ghEbHXeFIGwkix+9zGEMV9krYW1+OAvGAuCQZqUIUGiJ7lad4Zjb7wQ==867 integrity sha512-3er4UYOlozLGgFYWwcbmcFslmO8m82u4cAGR4AaEag0VdV7jLO/M5lTmivT/3rtLSww6sjkEfr522GM2Q5lmFg==909 dependencies:868 dependencies:910 "@babel/runtime" "^7.18.9"869 "@babel/runtime" "^7.18.9"870 "@polkadot/x-global" "10.1.7"911871912"@polkadot/x-randomvalues@10.1.1":872"@polkadot/x-textdecoder@10.1.7":913 version "10.1.1"873 version "10.1.7"914 resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-10.1.1.tgz#3b1f590e6641e322e3a28bb4f17f0a53005d9ada"874 resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-10.1.7.tgz#1dd4e6141b1669acdd321a4da1fc6fdc271b7908"915 integrity sha512-opVFNEnzCir7cWsFfyDqNlrGazkpjnL+JpkxE/b9WmSco6y0IUzn/Q7rL3EaBzBEvxY0/J8KeSGGs3W+mf6tBQ==875 integrity sha512-iAFOHludmZFOyVL8sQFv4TDqbcqQU5gwwYv74duTA+WQBgbSITJrBahSCV/rXOjUqds9pzQO3qBFzziznNnkiQ==916 dependencies:876 dependencies:917 "@babel/runtime" "^7.18.9"877 "@babel/runtime" "^7.18.9"918 "@polkadot/x-global" "10.1.1"878 "@polkadot/x-global" "10.1.7"919879920"@polkadot/x-randomvalues@10.1.4":880"@polkadot/x-textencoder@10.1.7":921 version "10.1.4"881 version "10.1.7"922 resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-10.1.4.tgz#de337a046826223081697e6fc1991c547f685787"882 resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-10.1.7.tgz#b208601f33b936c7a059f126dbb6b26a87f45864"923 integrity sha512-sfYz3GmyG739anj07Y+8PUX+95upO1zlsADAEfK1w1mMpTw97xEoMZf66CduAQOe43gEwQXc/JuKq794C/Hr7Q==883 integrity sha512-GzjaWZDbgzZ0IQT60xuZ7cZ0wnlNVYMqpfI9KvBc58X9dPI3TIMwzbXDVzZzpjY1SAqJGs4hJse9HMWZazfhew==924 dependencies:884 dependencies:925 "@babel/runtime" "^7.18.9"885 "@babel/runtime" "^7.18.9"926 "@polkadot/x-global" "10.1.4"886 "@polkadot/x-global" "10.1.7"927887928"@polkadot/x-textdecoder@10.1.1":929 version "10.1.1"930 resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-10.1.1.tgz#536d0093749fcc14a60d4ae29c35f699dea7e651"931 integrity sha512-a52ah/sUS+aGZcCCL7BhrytAeV/7kiqu1zbuCoZtIzxP6x34a2vcic3bLPoyynLcX2ruzvLKFhJDGOJ4Bq5lcA==932 dependencies:933 "@babel/runtime" "^7.18.9"934 "@polkadot/x-global" "10.1.1"935936"@polkadot/x-textdecoder@10.1.4":937 version "10.1.4"938 resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-10.1.4.tgz#d85028f6fcd00adc1e3581ab97668a61299270f9"939 integrity sha512-B8XcAmJLnuppSr4RUNPevh5MH3tWZBwBR0wUsSdIyiGXuncgnkj9jmpbGLgV1tSn+BGxX3SNsRho3/4CNmndWQ==940 dependencies:941 "@babel/runtime" "^7.18.9"942 "@polkadot/x-global" "10.1.4"943944"@polkadot/x-textencoder@10.1.1":945 version "10.1.1"946 resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-10.1.1.tgz#c1a86b3d0fe0ca65d30c8ce5c6f75c4035e95847"947 integrity sha512-prTzUXXW9OxFyf17EwGSBxe2GvVFG60cmKV8goC50nghhNMl1y0GdGpvKNQTFG6hIk5fIon9/pBpWsas4iAf+Q==948 dependencies:949 "@babel/runtime" "^7.18.9"950 "@polkadot/x-global" "10.1.1"951952"@polkadot/x-textencoder@10.1.4":953 version "10.1.4"954 resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-10.1.4.tgz#253e828bb571eb2a92a8377acd57d9bfcbe52fe8"955 integrity sha512-vDpo0rVV4jBmr0L2tCZPZzxmzV2vZhpH1Dw9H7MpmZSPePz4ZF+o4RBJz/ocwQh3+1qV1SKQm7+fj4lPwUZdEw==956 dependencies:957 "@babel/runtime" "^7.18.9"958 "@polkadot/x-global" "10.1.4"959960"@polkadot/x-ws@^10.1.4":888"@polkadot/x-ws@^10.1.4":961 version "10.1.4"889 version "10.1.7"962 resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-10.1.4.tgz#b3fa515598bc6f8e85d92754d5f1c4be19ca44a1"890 resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-10.1.7.tgz#b1fbfe3e16fa809f35f24ef47fde145b018d8cdc"963 integrity sha512-hi7hBRRCLlHgqVW2p5TkoJuTxV7sVprl+aAnmcIpPU4J8Ai6PKQvXR+fLK01T8moBYmH5ztHrBWvY/XRzmQ8Vg==891 integrity sha512-aNkotxHx3qPVjiItD9lbNONs4GNzqeeZ98wHtCjd9JWl/g+xNkOVF3xQ8++1qSHPBEYSwKh9URjQH2+CD2XlvQ==964 dependencies:892 dependencies:965 "@babel/runtime" "^7.18.9"893 "@babel/runtime" "^7.18.9"966 "@polkadot/x-global" "10.1.4"894 "@polkadot/x-global" "10.1.7"967 "@types/websocket" "^1.0.5"895 "@types/websocket" "^1.0.5"968 websocket "^1.0.34"896 websocket "^1.0.34"969897972 resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"900 resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"973 integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==901 integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==974902975"@sindresorhus/is@^4.6.0":903"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0":976 version "4.6.0"904 version "4.6.0"977 resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f"905 resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f"978 integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==906 integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==999 pako "^2.0.4"927 pako "^2.0.4"1000 websocket "^1.0.32"928 websocket "^1.0.32"10019291002"@substrate/ss58-registry@^1.24.0", "@substrate/ss58-registry@^1.25.0":930"@substrate/ss58-registry@^1.28.0":1003 version "1.25.0"931 version "1.29.0"1004 resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.25.0.tgz#0fcd8c9c0e53963a88fbed41f2cbd8a1a5c74cde"932 resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.29.0.tgz#0dea078271b5318c5eff7176e1df1f9b2c27e43f"1005 integrity sha512-LmCH4QJRdHaeLsLTPSgJaXguMoIW+Ig9fA9LRPpeya9HefVAJ7gZuUYinldv+QmX7evNm5CL0rspNUS8l1DvXg==933 integrity sha512-KTqwZgTjtWPhCAUJJx9qswP/p9cRKUU9GOHYUDKNdISFDiFafWmpI54JHfYLkgjvkSKEUgRZnvLpe0LMF1fXvw==1006934935"@szmarczak/http-timer@^4.0.5":936 version "4.0.6"937 resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807"938 integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==939 dependencies:940 defer-to-connect "^2.0.0"9411007"@szmarczak/http-timer@^5.0.1":942"@szmarczak/http-timer@^5.0.1":1008 version "5.0.1"943 version "5.0.1"1009 resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a"944 resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a"1031 resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"966 resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"1032 integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==967 integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==10339681034"@types/bn.js@^5.1.0":969"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1":1035 version "5.1.0"970 version "5.1.1"1036 resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68"971 resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682"1037 integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==972 integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==1038 dependencies:973 dependencies:1039 "@types/node" "*"974 "@types/node" "*"10409751041"@types/cacheable-request@^6.0.2":976"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2":1042 version "6.0.2"977 version "6.0.2"1043 resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9"978 resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9"1044 integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==979 integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==1097 resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"1032 resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"1098 integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==1033 integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==109910341100"@types/json-buffer@~3.0.0":1101 version "3.0.0"1102 resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64"1103 integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==11041105"@types/json-schema@^7.0.9":1035"@types/json-schema@^7.0.9":1106 version "7.0.11"1036 version "7.0.11"1107 resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"1037 resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"1128 form-data "^3.0.0"1058 form-data "^3.0.0"112910591130"@types/node@*":1060"@types/node@*":1131 version "18.7.5"1061 version "18.7.16"1132 resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.5.tgz#f1c1d4b7d8231c0278962347163656f9c36f3e83"1062 resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.16.tgz#0eb3cce1e37c79619943d2fd903919fc30850601"1133 integrity sha512-NcKK6Ts+9LqdHJaW6HQmgr7dT/i3GOHG+pt6BiWv++5SnjtRd4NXeiuN2kA153SjhXPR/AhHIPHPbrsbpUVOww==1063 integrity sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==113410641135"@types/node@^12.12.6":1065"@types/node@^12.12.6":1136 version "12.20.55"1066 version "12.20.55"1171 "@types/node" "*"1101 "@types/node" "*"117211021173"@typescript-eslint/eslint-plugin@^5.26.0":1103"@typescript-eslint/eslint-plugin@^5.26.0":1174 version "5.33.1"1104 version "5.36.2"1175 resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz#c0a480d05211660221eda963cc844732fe9b1714"1105 resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.2.tgz#6df092a20e0f9ec748b27f293a12cb39d0c1fe4d"1176 integrity sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==1106 integrity sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw==1177 dependencies:1107 dependencies:1178 "@typescript-eslint/scope-manager" "5.33.1"1108 "@typescript-eslint/scope-manager" "5.36.2"1179 "@typescript-eslint/type-utils" "5.33.1"1109 "@typescript-eslint/type-utils" "5.36.2"1180 "@typescript-eslint/utils" "5.33.1"1110 "@typescript-eslint/utils" "5.36.2"1181 debug "^4.3.4"1111 debug "^4.3.4"1182 functional-red-black-tree "^1.0.1"1112 functional-red-black-tree "^1.0.1"1183 ignore "^5.2.0"1113 ignore "^5.2.0"1186 tsutils "^3.21.0"1116 tsutils "^3.21.0"118711171188"@typescript-eslint/parser@^5.26.0":1118"@typescript-eslint/parser@^5.26.0":1189 version "5.33.1"1119 version "5.36.2"1190 resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.33.1.tgz#e4b253105b4d2a4362cfaa4e184e2d226c440ff3"1120 resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.2.tgz#3ddf323d3ac85a25295a55fcb9c7a49ab4680ddd"1191 integrity sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==1121 integrity sha512-qS/Kb0yzy8sR0idFspI9Z6+t7mqk/oRjnAYfewG+VN73opAUvmYL3oPIMmgOX6CnQS6gmVIXGshlb5RY/R22pA==1192 dependencies:1122 dependencies:1193 "@typescript-eslint/scope-manager" "5.33.1"1123 "@typescript-eslint/scope-manager" "5.36.2"1194 "@typescript-eslint/types" "5.33.1"1124 "@typescript-eslint/types" "5.36.2"1195 "@typescript-eslint/typescript-estree" "5.33.1"1125 "@typescript-eslint/typescript-estree" "5.36.2"1196 debug "^4.3.4"1126 debug "^4.3.4"119711271198"@typescript-eslint/scope-manager@5.33.1":1128"@typescript-eslint/scope-manager@5.36.2":1199 version "5.33.1"1129 version "5.36.2"1200 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz#8d31553e1b874210018ca069b3d192c6d23bc493"1130 resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz#a75eb588a3879ae659514780831370642505d1cd"1201 integrity sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==1131 integrity sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==1202 dependencies:1132 dependencies:1203 "@typescript-eslint/types" "5.33.1"1133 "@typescript-eslint/types" "5.36.2"1204 "@typescript-eslint/visitor-keys" "5.33.1"1134 "@typescript-eslint/visitor-keys" "5.36.2"120511351206"@typescript-eslint/type-utils@5.33.1":1136"@typescript-eslint/type-utils@5.36.2":1207 version "5.33.1"1137 version "5.36.2"1208 resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz#1a14e94650a0ae39f6e3b77478baff002cec4367"1138 resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.2.tgz#752373f4babf05e993adf2cd543a763632826391"1209 integrity sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==1139 integrity sha512-rPQtS5rfijUWLouhy6UmyNquKDPhQjKsaKH0WnY6hl/07lasj8gPaH2UD8xWkePn6SC+jW2i9c2DZVDnL+Dokw==1210 dependencies:1140 dependencies:1211 "@typescript-eslint/utils" "5.33.1"1141 "@typescript-eslint/typescript-estree" "5.36.2"1142 "@typescript-eslint/utils" "5.36.2"1212 debug "^4.3.4"1143 debug "^4.3.4"1213 tsutils "^3.21.0"1144 tsutils "^3.21.0"121411451215"@typescript-eslint/types@5.33.1":1146"@typescript-eslint/types@5.36.2":1216 version "5.33.1"1147 version "5.36.2"1217 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.33.1.tgz#3faef41793d527a519e19ab2747c12d6f3741ff7"1148 resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.2.tgz#a5066e500ebcfcee36694186ccc57b955c05faf9"1218 integrity sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==1149 integrity sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==121911501220"@typescript-eslint/typescript-estree@5.33.1":1151"@typescript-eslint/typescript-estree@5.36.2":1221 version "5.33.1"1152 version "5.36.2"1222 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz#a573bd360790afdcba80844e962d8b2031984f34"1153 resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz#0c93418b36c53ba0bc34c61fe9405c4d1d8fe560"1223 integrity sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==1154 integrity sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==1224 dependencies:1155 dependencies:1225 "@typescript-eslint/types" "5.33.1"1156 "@typescript-eslint/types" "5.36.2"1226 "@typescript-eslint/visitor-keys" "5.33.1"1157 "@typescript-eslint/visitor-keys" "5.36.2"1227 debug "^4.3.4"1158 debug "^4.3.4"1228 globby "^11.1.0"1159 globby "^11.1.0"1229 is-glob "^4.0.3"1160 is-glob "^4.0.3"1230 semver "^7.3.7"1161 semver "^7.3.7"1231 tsutils "^3.21.0"1162 tsutils "^3.21.0"123211631233"@typescript-eslint/utils@5.33.1":1164"@typescript-eslint/utils@5.36.2":1234 version "5.33.1"1165 version "5.36.2"1235 resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.33.1.tgz#171725f924fe1fe82bb776522bb85bc034e88575"1166 resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.2.tgz#b01a76f0ab244404c7aefc340c5015d5ce6da74c"1236 integrity sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==1167 integrity sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==1237 dependencies:1168 dependencies:1238 "@types/json-schema" "^7.0.9"1169 "@types/json-schema" "^7.0.9"1239 "@typescript-eslint/scope-manager" "5.33.1"1170 "@typescript-eslint/scope-manager" "5.36.2"1240 "@typescript-eslint/types" "5.33.1"1171 "@typescript-eslint/types" "5.36.2"1241 "@typescript-eslint/typescript-estree" "5.33.1"1172 "@typescript-eslint/typescript-estree" "5.36.2"1242 eslint-scope "^5.1.1"1173 eslint-scope "^5.1.1"1243 eslint-utils "^3.0.0"1174 eslint-utils "^3.0.0"124411751245"@typescript-eslint/visitor-keys@5.33.1":1176"@typescript-eslint/visitor-keys@5.36.2":1246 version "5.33.1"1177 version "5.36.2"1247 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz#0155c7571c8cd08956580b880aea327d5c34a18b"1178 resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz#2f8f78da0a3bad3320d2ac24965791ac39dace5a"1248 integrity sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==1179 integrity sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==1249 dependencies:1180 dependencies:1250 "@typescript-eslint/types" "5.33.1"1181 "@typescript-eslint/types" "5.36.2"1251 eslint-visitor-keys "^3.3.0"1182 eslint-visitor-keys "^3.3.0"125211831253"@ungap/promise-all-settled@1.1.2":1184"@ungap/promise-all-settled@1.1.2":1621 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"1552 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"1622 integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==1553 integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==162315541555cacheable-lookup@^5.0.3:1556 version "5.0.4"1557 resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005"1558 integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==15591624cacheable-lookup@^6.0.4:1560cacheable-lookup@^6.0.4:1625 version "6.1.0"1561 version "6.1.0"1626 resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385"1562 resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385"1658 integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==1594 integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==165915951660caniuse-lite@^1.0.30001370:1596caniuse-lite@^1.0.30001370:1661 version "1.0.30001377"1597 version "1.0.30001393"1662 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001377.tgz#fa446cef27f25decb0c7420759c9ea17a2221a70"1598 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001393.tgz#1aa161e24fe6af2e2ccda000fc2b94be0b0db356"1663 integrity sha512-I5XeHI1x/mRSGl96LFOaSk528LA/yZG3m3iQgImGujjO8gotd/DL8QaI1R1h1dg5ATeI2jqPblMpKq4Tr5iKfQ==1599 integrity sha512-N/od11RX+Gsk+1qY/jbPa0R6zJupEa0lxeBG598EbrtblxVCTJsQwbRBm6+V+rxpc5lHKdsXb9RY83cZIPLseA==166416001665caseless@~0.12.0:1601caseless@~0.12.0:1666 version "0.12.0"1602 version "0.12.0"1834 resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"1770 resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"1835 integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==1771 integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==183617721837compress-brotli@^1.3.8:1838 version "1.3.8"1839 resolved "https://registry.yarnpkg.com/compress-brotli/-/compress-brotli-1.3.8.tgz#0c0a60c97a989145314ec381e84e26682e7b38db"1840 integrity sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==1841 dependencies:1842 "@types/json-buffer" "~3.0.0"1843 json-buffer "~3.0.1"18441845concat-map@0.0.1:1773concat-map@0.0.1:1846 version "0.0.1"1774 version "0.0.1"1847 resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"1775 resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"2016 resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"1944 resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"2017 integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==1945 integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==201819462019decompress-response@^3.2.0:2020 version "3.3.0"2021 resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"2022 integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==2023 dependencies:2024 mimic-response "^1.0.0"20252026decompress-response@^6.0.0:1947decompress-response@^6.0.0:2027 version "6.0.0"1948 version "6.0.0"2028 resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"1949 resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"2042 resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"1963 resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"2043 integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==1964 integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==204419652045defer-to-connect@^2.0.1:1966defer-to-connect@^2.0.0, defer-to-connect@^2.0.1:2046 version "2.0.1"1967 version "2.0.1"2047 resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587"1968 resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587"2048 integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==1969 integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==2116 resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"2037 resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"2117 integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==2038 integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==211820392119duplexer3@^0.1.4:2120 version "0.1.5"2121 resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e"2122 integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==21232124ecc-jsbn@~0.1.1:2040ecc-jsbn@~0.1.1:2125 version "0.1.2"2041 version "0.1.2"2126 resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"2042 resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"2142 integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==2058 integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==214320592144electron-to-chromium@^1.4.202:2060electron-to-chromium@^1.4.202:2145 version "1.4.221"2061 version "1.4.246"2146 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.221.tgz#1ff8425d257a8bfc8269d552a426993c5b525471"2062 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.246.tgz#802132d1bbd3ff32ce82fcd6a6ed6ab59b4366dc"2147 integrity sha512-aWg2mYhpxZ6Q6Xvyk7B2ziBca4YqrCDlXzmcD7wuRs65pVEVkMT1u2ifdjpAQais2O2o0rW964ZWWWYRlAL/kw==2063 integrity sha512-/wFCHUE+Hocqr/LlVGsuKLIw4P2lBWwFIDcNMDpJGzyIysQV4aycpoOitAs32FT94EHKnNqDR/CVZJFbXEufJA==214820642149elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4:2065elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4:2150 version "6.5.4"2066 version "6.5.4"2177 once "^1.4.0"2093 once "^1.4.0"217820942179es-abstract@^1.19.0, es-abstract@^1.19.5, es-abstract@^1.20.0:2095es-abstract@^1.19.0, es-abstract@^1.19.5, es-abstract@^1.20.0:2180 version "1.20.1"2096 version "1.20.2"2181 resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814"2097 resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.2.tgz#8495a07bc56d342a3b8ea3ab01bd986700c2ccb3"2182 integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==2098 integrity sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==2183 dependencies:2099 dependencies:2184 call-bind "^1.0.2"2100 call-bind "^1.0.2"2185 es-to-primitive "^1.2.1"2101 es-to-primitive "^1.2.1"2186 function-bind "^1.1.1"2102 function-bind "^1.1.1"2187 function.prototype.name "^1.1.5"2103 function.prototype.name "^1.1.5"2188 get-intrinsic "^1.1.1"2104 get-intrinsic "^1.1.2"2189 get-symbol-description "^1.0.0"2105 get-symbol-description "^1.0.0"2190 has "^1.0.3"2106 has "^1.0.3"2191 has-property-descriptors "^1.0.0"2107 has-property-descriptors "^1.0.0"2197 is-shared-array-buffer "^1.0.2"2113 is-shared-array-buffer "^1.0.2"2198 is-string "^1.0.7"2114 is-string "^1.0.7"2199 is-weakref "^1.0.2"2115 is-weakref "^1.0.2"2200 object-inspect "^1.12.0"2116 object-inspect "^1.12.2"2201 object-keys "^1.1.1"2117 object-keys "^1.1.1"2202 object.assign "^4.1.2"2118 object.assign "^4.1.4"2203 regexp.prototype.flags "^1.4.3"2119 regexp.prototype.flags "^1.4.3"2204 string.prototype.trimend "^1.0.5"2120 string.prototype.trimend "^1.0.5"2205 string.prototype.trimstart "^1.0.5"2121 string.prototype.trimstart "^1.0.5"2299 integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==2215 integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==230022162301eslint@^8.16.0:2217eslint@^8.16.0:2302 version "8.22.0"2218 version "8.23.0"2303 resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48"2219 resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040"2304 integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==2220 integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==2305 dependencies:2221 dependencies:2306 "@eslint/eslintrc" "^1.3.0"2222 "@eslint/eslintrc" "^1.3.1"2307 "@humanwhocodes/config-array" "^0.10.4"2223 "@humanwhocodes/config-array" "^0.10.4"2308 "@humanwhocodes/gitignore-to-minimatch" "^1.0.2"2224 "@humanwhocodes/gitignore-to-minimatch" "^1.0.2"2225 "@humanwhocodes/module-importer" "^1.0.1"2309 ajv "^6.10.0"2226 ajv "^6.10.0"2310 chalk "^4.0.0"2227 chalk "^4.0.0"2311 cross-spawn "^7.0.2"2228 cross-spawn "^7.0.2"2315 eslint-scope "^7.1.1"2232 eslint-scope "^7.1.1"2316 eslint-utils "^3.0.0"2233 eslint-utils "^3.0.0"2317 eslint-visitor-keys "^3.3.0"2234 eslint-visitor-keys "^3.3.0"2318 espree "^9.3.3"2235 espree "^9.4.0"2319 esquery "^1.4.0"2236 esquery "^1.4.0"2320 esutils "^2.0.2"2237 esutils "^2.0.2"2321 fast-deep-equal "^3.1.3"2238 fast-deep-equal "^3.1.3"2341 strip-ansi "^6.0.1"2258 strip-ansi "^6.0.1"2342 strip-json-comments "^3.1.0"2259 strip-json-comments "^3.1.0"2343 text-table "^0.2.0"2260 text-table "^0.2.0"2344 v8-compile-cache "^2.0.3"234522612346espree@^9.3.2, espree@^9.3.3:2262espree@^9.4.0:2347 version "9.3.3"2263 version "9.4.0"2348 resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d"2264 resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a"2349 integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==2265 integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==2350 dependencies:2266 dependencies:2351 acorn "^8.8.0"2267 acorn "^8.8.0"2352 acorn-jsx "^5.3.2"2268 acorn-jsx "^5.3.2"2518 vary "~1.1.2"2434 vary "~1.1.2"251924352520ext@^1.1.2:2436ext@^1.1.2:2521 version "1.6.0"2437 version "1.7.0"2522 resolved "https://registry.yarnpkg.com/ext/-/ext-1.6.0.tgz#3871d50641e874cc172e2b53f919842d19db4c52"2438 resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"2523 integrity sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==2439 integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==2524 dependencies:2440 dependencies:2525 type "^2.5.0"2441 type "^2.7.2"252624422527extend@~3.0.2:2443extend@~3.0.2:2528 version "3.0.2"2444 version "3.0.2"2545 integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==2461 integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==254624622547fast-glob@^3.2.9:2463fast-glob@^3.2.9:2548 version "3.2.11"2464 version "3.2.12"2549 resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"2465 resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"2550 integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==2466 integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==2551 dependencies:2467 dependencies:2552 "@nodelib/fs.stat" "^2.0.2"2468 "@nodelib/fs.stat" "^2.0.2"2553 "@nodelib/fs.walk" "^1.2.3"2469 "@nodelib/fs.walk" "^1.2.3"2654 integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==2570 integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==265525712656flatted@^3.1.0:2572flatted@^3.1.0:2657 version "3.2.6"2573 version "3.2.7"2658 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2"2574 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787"2659 integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==2575 integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==266025762661follow-redirects@^1.12.1:2577follow-redirects@^1.12.1:2662 version "1.15.1"2578 version "1.15.1"2781 resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"2697 resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"2782 integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==2698 integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==278326992784get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:2700get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.2:2785 version "1.1.2"2701 version "1.1.2"2786 resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598"2702 resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598"2787 integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==2703 integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==2790 has "^1.0.3"2706 has "^1.0.3"2791 has-symbols "^1.0.3"2707 has-symbols "^1.0.3"279227082793get-stream@^3.0.0:2794 version "3.0.0"2795 resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"2796 integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==27972798get-stream@^5.1.0:2709get-stream@^5.1.0:2799 version "5.2.0"2710 version "5.2.0"2800 resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"2711 resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"2911 p-cancelable "^3.0.0"2822 p-cancelable "^3.0.0"2912 responselike "^2.0.0"2823 responselike "^2.0.0"291328242914got@^7.1.0:2825got@^11.8.5:2915 version "7.1.0"2826 version "11.8.5"2916 resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a"2827 resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046"2917 integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==2828 integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==2918 dependencies:2829 dependencies:2919 decompress-response "^3.2.0"2830 "@sindresorhus/is" "^4.0.0"2920 duplexer3 "^0.1.4"2921 get-stream "^3.0.0"2922 is-plain-obj "^1.1.0"2831 "@szmarczak/http-timer" "^4.0.5"2923 is-retry-allowed "^1.0.0"2832 "@types/cacheable-request" "^6.0.1"2924 is-stream "^1.0.0"2833 "@types/responselike" "^1.0.0"2925 isurl "^1.0.0-alpha5"2834 cacheable-lookup "^5.0.3"2926 lowercase-keys "^1.0.0"2835 cacheable-request "^7.0.2"2927 p-cancelable "^0.3.0"2836 decompress-response "^6.0.0"2928 p-timeout "^1.1.1"2837 http2-wrapper "^1.0.0-beta.5.2"2929 safe-buffer "^5.0.1"2930 timed-out "^4.0.0"2838 lowercase-keys "^2.0.0"2931 url-parse-lax "^1.0.0"2839 p-cancelable "^2.0.0"2932 url-to-options "^1.0.1"2840 responselike "^2.0.0"293328412934graceful-fs@^4.1.2, graceful-fs@^4.1.6:2842graceful-fs@^4.1.2, graceful-fs@^4.1.6:2935 version "4.2.10"2843 version "4.2.10"2988 dependencies:2896 dependencies:2989 get-intrinsic "^1.1.1"2897 get-intrinsic "^1.1.1"299028982991has-symbol-support-x@^1.4.1:2992 version "1.4.2"2993 resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"2994 integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==29952996has-symbols@^1.0.2, has-symbols@^1.0.3:2899has-symbols@^1.0.2, has-symbols@^1.0.3:2997 version "1.0.3"2900 version "1.0.3"2998 resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"2901 resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"2999 integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==2902 integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==300029033001has-to-string-tag-x@^1.2.0:3002 version "1.4.1"3003 resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d"3004 integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==3005 dependencies:3006 has-symbol-support-x "^1.4.1"30073008has-tostringtag@^1.0.0:2904has-tostringtag@^1.0.0:3009 version "1.0.0"2905 version "1.0.0"3010 resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"2906 resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"3080 jsprim "^1.2.2"2976 jsprim "^1.2.2"3081 sshpk "^1.7.0"2977 sshpk "^1.7.0"308229782979http2-wrapper@^1.0.0-beta.5.2:2980 version "1.0.3"2981 resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d"2982 integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==2983 dependencies:2984 quick-lru "^5.1.1"2985 resolve-alpn "^1.0.0"29863083http2-wrapper@^2.1.10:2987http2-wrapper@^2.1.10:3084 version "2.1.11"2988 version "2.1.11"3085 resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.1.11.tgz#d7c980c7ffb85be3859b6a96c800b2951ae257ef"2989 resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.1.11.tgz#d7c980c7ffb85be3859b6a96c800b2951ae257ef"3245 resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"3149 resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"3246 integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==3150 integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==324731513248is-object@^1.0.1:3249 version "1.0.2"3250 resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf"3251 integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==32523253is-plain-obj@^1.1.0:3254 version "1.1.0"3255 resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"3256 integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==32573258is-plain-obj@^2.1.0:3152is-plain-obj@^2.1.0:3259 version "2.1.0"3153 version "2.1.0"3260 resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"3154 resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"3275 call-bind "^1.0.2"3169 call-bind "^1.0.2"3276 has-tostringtag "^1.0.0"3170 has-tostringtag "^1.0.0"327731713278is-retry-allowed@^1.0.0:3279 version "1.2.0"3280 resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4"3281 integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==32823283is-shared-array-buffer@^1.0.2:3172is-shared-array-buffer@^1.0.2:3284 version "1.0.2"3173 version "1.0.2"3285 resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79"3174 resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79"3286 integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==3175 integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==3287 dependencies:3176 dependencies:3288 call-bind "^1.0.2"3177 call-bind "^1.0.2"328931783290is-stream@^1.0.0:3291 version "1.1.0"3292 resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"3293 integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==32943295is-string@^1.0.5, is-string@^1.0.7:3179is-string@^1.0.5, is-string@^1.0.7:3296 version "1.0.7"3180 version "1.0.7"3297 resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd"3181 resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd"3349 resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"3233 resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"3350 integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==3234 integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==335132353352isurl@^1.0.0-alpha5:3353 version "1.0.0"3354 resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"3355 integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==3356 dependencies:3357 has-to-string-tag-x "^1.2.0"3358 is-object "^1.0.1"33593360js-sha3@0.8.0, js-sha3@^0.8.0:3236js-sha3@0.8.0, js-sha3@^0.8.0:3361 version "0.8.0"3237 version "0.8.0"3362 resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"3238 resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"3389 resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"3265 resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"3390 integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==3266 integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==339132673392json-buffer@3.0.1, json-buffer@~3.0.1:3268json-buffer@3.0.1:3393 version "3.0.1"3269 version "3.0.1"3394 resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"3270 resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"3395 integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==3271 integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==3446 readable-stream "^3.6.0"3322 readable-stream "^3.6.0"344733233448keyv@^4.0.0:3324keyv@^4.0.0:3449 version "4.3.3"3325 version "4.5.0"3450 resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.3.3.tgz#6c1bcda6353a9e96fc1b4e1aeb803a6e35090ba9"3326 resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.0.tgz#dbce9ade79610b6e641a9a65f2f6499ba06b9bc6"3451 integrity sha512-AcysI17RvakTh8ir03+a3zJr5r0ovnAH/XTXei/4HIv3bL2K/jzvgivLK9UuI/JbU1aJjM3NSAnVvVVd3n+4DQ==3327 integrity sha512-2YvuMsA+jnFGtBareKqgANOEKe1mk3HKiXu2fRmAfyxG0MJAywNhi5ttWA3PMjl4NmpyjZNbFifR2vNjW1znfA==3452 dependencies:3328 dependencies:3453 compress-brotli "^1.3.8"3454 json-buffer "3.0.1"3329 json-buffer "3.0.1"345533303456kind-of@^6.0.2:3331kind-of@^6.0.2:3506 dependencies:3381 dependencies:3507 get-func-name "^2.0.0"3382 get-func-name "^2.0.0"350833833509lowercase-keys@^1.0.0:3510 version "1.0.1"3511 resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"3512 integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==35133514lowercase-keys@^2.0.0:3384lowercase-keys@^2.0.0:3515 version "2.0.0"3385 version "2.0.0"3516 resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"3386 resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"3885 resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"3755 resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"3886 integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==3756 integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==388737573888object-inspect@^1.12.0, object-inspect@^1.9.0:3758object-inspect@^1.12.2, object-inspect@^1.9.0:3889 version "1.12.2"3759 version "1.12.2"3890 resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"3760 resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"3891 integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==3761 integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==3895 resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"3765 resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"3896 integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==3766 integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==389737673898object.assign@^4.1.2:3768object.assign@^4.1.4:3899 version "4.1.3"3769 version "4.1.4"3900 resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f"3770 resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f"3901 integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA==3771 integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==3902 dependencies:3772 dependencies:3903 call-bind "^1.0.2"3773 call-bind "^1.0.2"3904 define-properties "^1.1.4"3774 define-properties "^1.1.4"3943 resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"3813 resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"3944 integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==3814 integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==394538153946p-cancelable@^0.3.0:3816p-cancelable@^2.0.0:3947 version "0.3.0"3817 version "2.1.1"3948 resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"3818 resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"3949 integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==3819 integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==395038203951p-cancelable@^3.0.0:3821p-cancelable@^3.0.0:3952 version "3.0.0"3822 version "3.0.0"3953 resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050"3823 resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050"3954 integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==3824 integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==395538253956p-finally@^1.0.0:3957 version "1.0.0"3958 resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"3959 integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==39603961p-limit@^2.0.0:3826p-limit@^2.0.0:3962 version "2.3.0"3827 version "2.3.0"3963 resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"3828 resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"3986 dependencies:3851 dependencies:3987 p-limit "^3.0.2"3852 p-limit "^3.0.2"398838533989p-timeout@^1.1.1:3990 version "1.2.1"3991 resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386"3992 integrity sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA==3993 dependencies:3994 p-finally "^1.0.0"39953996p-try@^2.0.0:3854p-try@^2.0.0:3997 version "2.2.0"3855 version "2.2.0"3998 resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"3856 resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"4114 resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"3972 resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"4115 integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==3973 integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==411639744117prepend-http@^1.0.1:4118 version "1.0.4"4119 resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"4120 integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==41214122process@^0.11.10:3975process@^0.11.10:4123 version "0.11.10"3976 version "0.11.10"4124 resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"3977 resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"4299 resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"4152 resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"4300 integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==4153 integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==430141544302resolve-alpn@^1.2.0:4155resolve-alpn@^1.0.0, resolve-alpn@^1.2.0:4303 version "1.2.1"4156 version "1.2.1"4304 resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9"4157 resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9"4305 integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==4158 integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==4641 has-flag "^4.0.0"4494 has-flag "^4.0.0"464244954643swarm-js@^0.1.40:4496swarm-js@^0.1.40:4644 version "0.1.40"4497 version "0.1.42"4645 resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99"4498 resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979"4646 integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==4499 integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==4647 dependencies:4500 dependencies:4648 bluebird "^3.5.0"4501 bluebird "^3.5.0"4649 buffer "^5.0.5"4502 buffer "^5.0.5"4650 eth-lib "^0.1.26"4503 eth-lib "^0.1.26"4651 fs-extra "^4.0.2"4504 fs-extra "^4.0.2"4652 got "^7.1.0"4505 got "^11.8.5"4653 mime-types "^2.1.16"4506 mime-types "^2.1.16"4654 mkdirp-promise "^5.0.1"4507 mkdirp-promise "^5.0.1"4655 mock-fs "^4.1.0"4508 mock-fs "^4.1.0"4675 resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"4528 resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"4676 integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==4529 integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==467745304678timed-out@^4.0.0, timed-out@^4.0.1:4531timed-out@^4.0.1:4679 version "4.0.1"4532 version "4.0.1"4680 resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"4533 resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"4681 integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==4534 integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==4800 resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"4653 resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"4801 integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==4654 integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==480246554803type@^2.5.0:4656type@^2.7.2:4804 version "2.7.2"4657 version "2.7.2"4805 resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0"4658 resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0"4806 integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==4659 integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==4813 is-typedarray "^1.0.0"4666 is-typedarray "^1.0.0"481446674815typescript@^4.7.2:4668typescript@^4.7.2:4816 version "4.7.4"4669 version "4.8.3"4817 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"4670 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88"4818 integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==4671 integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==481946724820uglify-js@^3.1.4:4673uglify-js@^3.1.4:4821 version "3.16.3"4674 version "3.17.0"4822 resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d"4675 resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85"4823 integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw==4676 integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==482446774825ultron@~1.1.0:4678ultron@~1.1.0:4826 version "1.1.1"4679 version "1.1.1"4848 integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==4701 integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==484947024850update-browserslist-db@^1.0.5:4703update-browserslist-db@^1.0.5:4851 version "1.0.5"4704 version "1.0.7"4852 resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38"4705 resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz#16279639cff1d0f800b14792de43d97df2d11b7d"4853 integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==4706 integrity sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==4854 dependencies:4707 dependencies:4855 escalade "^3.1.1"4708 escalade "^3.1.1"4856 picocolors "^1.0.0"4709 picocolors "^1.0.0"4862 dependencies:4715 dependencies:4863 punycode "^2.1.0"4716 punycode "^2.1.0"486447174865url-parse-lax@^1.0.0:4866 version "1.0.0"4867 resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"4868 integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==4869 dependencies:4870 prepend-http "^1.0.1"48714872url-set-query@^1.0.0:4718url-set-query@^1.0.0:4873 version "1.0.0"4719 version "1.0.0"4874 resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339"4720 resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339"4875 integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==4721 integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==487647224877url-to-options@^1.0.1:4878 version "1.0.1"4879 resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"4880 integrity sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==48814882utf-8-validate@^5.0.2:4723utf-8-validate@^5.0.2:4883 version "5.0.9"4724 version "5.0.9"4884 resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.9.tgz#ba16a822fbeedff1a58918f2a6a6b36387493ea3"4725 resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.9.tgz#ba16a822fbeedff1a58918f2a6a6b36387493ea3"4927 version "3.0.1"4768 version "3.0.1"4928 resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"4769 resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"4929 integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==4770 integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==49304931v8-compile-cache@^2.0.3:4932 version "2.3.0"4933 resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"4934 integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==493547714936varint@^5.0.0:4772varint@^5.0.0:4937 version "5.0.2"4773 version "5.0.2"