git.delta.rocks / unique-network / refs/commits / 258e5a1bc411

difftreelog

tests: rearrange scripts & lift top util files to util folder

Fahrrader2022-10-12parent: #9a57db1.patch.diff
in: master

80 files changed

modifiedtests/package.jsondiffbeforeafterboth
21 },21 },
22 "mocha": {22 "mocha": {
23 "timeout": 9999999,23 "timeout": 9999999,
24 "require": ["ts-node/register", "./src/util/playgrounds/globalSetup.ts"]24 "require": ["ts-node/register", "./src/util/globalSetup.ts"]
25 },25 },
26 "scripts": {26 "scripts": {
27 "lint": "eslint --ext .ts,.js src/",27 "lint": "eslint --ext .ts,.js src/",
28 "fix": "eslint --ext .ts,.js src/ --fix",28 "fix": "eslint --ext .ts,.js src/ --fix",
2929
30 "test": "yarn testParallel && yarn testSequential",30 "test": "mocha --timeout 9999999 -r ts-node/register './src/**/*.*test.ts'",
31 "testParallelFull": "yarn testParallel && yarn testSequential",
31 "testParallel": "mocha --parallel --timeout 9999999 -r ts-node/register './src/**/*.test.ts'",32 "testParallel": "mocha --parallel --timeout 9999999 -r ts-node/register './src/**/*.test.ts'",
32 "testSequential": "mocha --timeout 9999999 -r ts-node/register './src/**/*.seqtest.ts'",33 "testSequential": "mocha --timeout 9999999 -r ts-node/register './src/**/*.seqtest.ts'",
33 "testDevnode": "mocha --timeout 9999999 -r ts-node/register './src/**/*test.ts'",
34 "testStructure": "mocha --parallel --timeout 9999999 -r ts-node/register ./**/nesting/**.test.ts",34 "testStructure": "mocha --timeout 9999999 -r ts-node/register ./**/nesting/*.*test.ts",
35 "testEth": "mocha --parallel --timeout 9999999 -r ts-node/register './**/eth/**/*.test.ts'",35 "testEth": "mocha --timeout 9999999 -r ts-node/register './**/eth/**/*.*test.ts'",
36 "testEthNesting": "mocha --parallel --timeout 9999999 -r ts-node/register './**/eth/nesting/**/*.test.ts'",36 "testEthNesting": "mocha --timeout 9999999 -r ts-node/register './**/eth/nesting/**/*.*test.ts'",
37 "testEthFractionalizer": "mocha --parallel --timeout 9999999 -r ts-node/register './**/eth/fractionalizer/**/*.test.ts'",37 "testEthFractionalizer": "mocha --timeout 9999999 -r ts-node/register './**/eth/fractionalizer/**/*.*test.ts'",
38 "testEthMarketplace": "mocha --parallel --timeout 9999999 -r ts-node/register './**/eth/marketplace/**/*.test.ts'",38 "testEthMarketplace": "mocha --timeout 9999999 -r ts-node/register './**/eth/marketplace/**/*.*test.ts'",
39 "testEvent": "mocha --parallel --timeout 9999999 -r ts-node/register ./src/check-event/*.test.ts",39 "testEvent": "mocha --timeout 9999999 -r ts-node/register ./src/check-event/*.*test.ts",
40 "testRmrk": "mocha --timeout 9999999 -r ts-node/register ./**/rmrk/**test.ts",40 "testRmrk": "mocha --timeout 9999999 -r ts-node/register ./**/rmrk/*.*test.ts",
4141
42 "testEthPayable": "mocha --timeout 9999999 -r ts-node/register './**/eth/payable.test.ts'",42 "testEthPayable": "mocha --timeout 9999999 -r ts-node/register './**/eth/payable.test.ts'",
43 "testEthTokenProperties": "mocha --timeout 9999999 -r ts-node/register ./**/eth/tokenProperties.test.ts",43 "testEthTokenProperties": "mocha --timeout 9999999 -r ts-node/register ./**/eth/tokenProperties.test.ts",
modifiedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {20describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {
21 let donor: IKeyringPair;21 let donor: IKeyringPair;
modifiedtests/src/adminTransferAndBurn.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';
1919
20describe('Integration Test: ownerCanTransfer allows admins to use only transferFrom/burnFrom:', () => {20describe('Integration Test: ownerCanTransfer allows admins to use only transferFrom/burnFrom:', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/allowLists.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';
19import {ICollectionPermissions} from './util/playgrounds/types';19import {ICollectionPermissions} from './util/playgrounds/types';
2020
21describe('Integration Test ext. Allow list tests', () => {21describe('Integration Test ext. Allow list tests', () => {
modifiedtests/src/app-promotion.seqtest.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util/playgrounds';18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util';
19import {expect} from './eth/util/playgrounds';19import {expect} from './eth/util';
2020
21let superuser: IKeyringPair;21let superuser: IKeyringPair;
22let donor: IKeyringPair;22let donor: IKeyringPair;
modifiedtests/src/app-promotion.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util/playgrounds';18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util';
19import {DevUniqueHelper} from './util/playgrounds/unique.dev';19import {DevUniqueHelper} from './util/playgrounds/unique.dev';
20import {itEth, expect, SponsoringMode} from './eth/util/playgrounds';20import {itEth, expect, SponsoringMode} from './eth/util';
2121
22let donor: IKeyringPair;22let donor: IKeyringPair;
23let palletAdmin: IKeyringPair;23let palletAdmin: IKeyringPair;
36 await usingPlaygrounds(async (helper, privateKey) => {36 await usingPlaygrounds(async (helper, privateKey) => {
37 requirePalletsOrSkip(this, helper, [Pallets.AppPromotion]);37 requirePalletsOrSkip(this, helper, [Pallets.AppPromotion]);
38 donor = await privateKey({filename: __filename});38 donor = await privateKey({filename: __filename});
39 palletAddress = helper.arrange.calculatePalleteAddress('appstake');39 palletAddress = helper.arrange.calculatePalletAddress('appstake');
40 palletAdmin = await privateKey('//PromotionAdmin');40 palletAdmin = await privateKey('//PromotionAdmin');
41 nominal = helper.balance.getOneTokenNominal();41 nominal = helper.balance.getOneTokenNominal();
42 accounts = await helper.arrange.createCrowd(100, 1000n, donor); // create accounts-pool to speed up tests42 accounts = await helper.arrange.createCrowd(100, 1000n, donor); // create accounts-pool to speed up tests
modifiedtests/src/approve.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';
1919
2020
21describe('Integration Test approve(spender, collection_id, item_id, amount):', () => {21describe('Integration Test approve(spender, collection_id, item_id, amount):', () => {
modifiedtests/src/block-production.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {ApiPromise} from '@polkadot/api';17import {ApiPromise} from '@polkadot/api';
18import {expect, itSub} from './util/playgrounds';18import {expect, itSub} from './util';
1919
20const BLOCK_TIME_MS = 12000;20const BLOCK_TIME_MS = 12000;
21const TOLERANCE_MS = 3000;21const TOLERANCE_MS = 3000;
modifiedtests/src/burnItem.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';
1919
2020
21describe('integration test: ext. burnItem():', () => {21describe('integration test: ext. burnItem():', () => {
modifiedtests/src/calibrate.tsdiffbeforeafterboth
1import {IKeyringPair} from '@polkadot/types/types';1import {IKeyringPair} from '@polkadot/types/types';
22
3import {usingEthPlaygrounds, EthUniqueHelper} from './eth/util/playgrounds';3import {usingEthPlaygrounds, EthUniqueHelper} from './eth/util';
44
55
6function linearRegression(points: { x: bigint, y: bigint }[]) {6function linearRegression(points: { x: bigint, y: bigint }[]) {
56 }).reduce((a, b) => a + b, 0n) / BigInt(points.length));56 }).reduce((a, b) => a + b, 0n) / BigInt(points.length));
57}57}
5858
59async function calibrateWeightToFee(helper: EthUniqueHelper, privateKey: (account: string) => IKeyringPair) {59async function calibrateWeightToFee(helper: EthUniqueHelper, privateKey: (account: string) => Promise<IKeyringPair>) {
60 const alice = privateKey('//Alice');60 const alice = await privateKey('//Alice');
61 const bob = privateKey('//Bob');61 const bob = await privateKey('//Bob');
62 const dataPoints = [];62 const dataPoints = [];
6363
64 {64 {
106 }106 }
107}107}
108108
109async function calibrateMinGasPrice(helper: EthUniqueHelper, privateKey: (account: string) => IKeyringPair) {109async function calibrateMinGasPrice(helper: EthUniqueHelper, privateKey: (account: string) => Promise<IKeyringPair>) {
110 const alice = privateKey('//Alice');110 const alice = await privateKey('//Alice');
111 const caller = await helper.eth.createAccountWithBalance(alice);111 const caller = await helper.eth.createAccountWithBalance(alice);
112 const receiver = helper.eth.createAccount();112 const receiver = helper.eth.createAccount();
113 const dataPoints = [];113 const dataPoints = [];
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';
1919
20describe('Integration Test changeCollectionOwner(collection_id, new_owner):', () => {20describe('Integration Test changeCollectionOwner(collection_id, new_owner):', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {usingPlaygrounds, expect, itSub} from '../util/playgrounds';19import {usingPlaygrounds, expect, itSub} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
2222
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {usingPlaygrounds, itSub, expect} from '../util/playgrounds';19import {usingPlaygrounds, itSub, expect} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Create collection event ', () => {22describe('Create collection event ', () => {
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {itSub, usingPlaygrounds, expect} from '../util/playgrounds';19import {itSub, usingPlaygrounds, expect} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Create Item event ', () => {22describe('Create Item event ', () => {
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {usingPlaygrounds, itSub, expect} from '../util/playgrounds';19import {usingPlaygrounds, itSub, expect} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Create Multiple Items Event event ', () => {22describe('Create Multiple Items Event event ', () => {
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {itSub, usingPlaygrounds, expect} from '../util/playgrounds';19import {itSub, usingPlaygrounds, expect} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Destroy collection event ', () => {22describe('Destroy collection event ', () => {
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {usingPlaygrounds, expect, itSub} from '../util/playgrounds';19import {usingPlaygrounds, expect, itSub} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Transfer event ', () => {22describe('Transfer event ', () => {
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {usingPlaygrounds, expect, itSub} from '../util/playgrounds';19import {usingPlaygrounds, expect, itSub} from '../util';
20import {IEvent} from '../util/playgrounds/types';20import {IEvent} from '../util/playgrounds/types';
2121
22describe('Transfer event ', () => {22describe('Transfer event ', () => {
modifiedtests/src/confirmSponsorship.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub, Pallets} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub, Pallets} from './util';
1919
20async function setSponsorHelper(collection: any, signer: IKeyringPair, sponsorAddress: string) {20async function setSponsorHelper(collection: any, signer: IKeyringPair, sponsorAddress: string) {
21 await collection.setSponsor(signer, sponsorAddress);21 await collection.setSponsor(signer, sponsorAddress);
modifiedtests/src/connection.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itSub, expect, usingPlaygrounds} from './util/playgrounds';17import {itSub, expect, usingPlaygrounds} from './util';
1818
19describe('Connection smoke test', () => {19describe('Connection smoke test', () => {
20 itSub('Connection can be established', async ({helper}) => {20 itSub('Connection can be established', async ({helper}) => {
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub, Pallets} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub, Pallets} from './util';
19import {ICollectionCreationOptions, IProperty} from './util/playgrounds/types';19import {ICollectionCreationOptions, IProperty} from './util/playgrounds/types';
20import {UniqueHelper} from './util/playgrounds/unique';20import {UniqueHelper} from './util/playgrounds/unique';
2121
modifiedtests/src/createItem.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, itSub, Pallets} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub, Pallets} from './util';
19import {IProperty, ICrossAccountId} from './util/playgrounds/types';19import {IProperty, ICrossAccountId} from './util/playgrounds/types';
20import {UniqueHelper} from './util/playgrounds/unique';20import {UniqueHelper} from './util/playgrounds/unique';
2121
modifiedtests/src/createMultipleItems.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, Pallets, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, Pallets, itSub} from './util';
1919
20describe('Integration Test createMultipleItems(collection_id, owner, items_data):', () => {20describe('Integration Test createMultipleItems(collection_id, owner, items_data):', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, expect, Pallets, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, Pallets, itSub} from './util';
19import {IProperty} from './util/playgrounds/types';19import {IProperty} from './util/playgrounds/types';
2020
21describe('Integration Test: createMultipleItemsEx', () => {21describe('Integration Test: createMultipleItemsEx', () => {
modifiedtests/src/creditFeesToTreasury.seqtest.tsdiffbeforeafterboth
17import './interfaces/augment-api-consts';17import './interfaces/augment-api-consts';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {ApiPromise} from '@polkadot/api';19import {ApiPromise} from '@polkadot/api';
20import {usingPlaygrounds, expect, itSub} from './util/playgrounds';20import {usingPlaygrounds, expect, itSub} from './util';
2121
22const TREASURY = '5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z';22const TREASURY = '5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z';
23const saneMinimumFee = 0.05;23const saneMinimumFee = 0.05;
modifiedtests/src/destroyCollection.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, expect, usingPlaygrounds, Pallets} from './util/playgrounds';18import {itSub, expect, usingPlaygrounds, Pallets} from './util';
1919
20describe('integration test: ext. destroyCollection():', () => {20describe('integration test: ext. destroyCollection():', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/enableDisableTransfer.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20describe('Enable/Disable Transfers', () => {20describe('Enable/Disable Transfers', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/eth/allowlist.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';18import {itEth, usingEthPlaygrounds, expect} from './util';
1919
20describe('EVM contract allowlist', () => {20describe('EVM contract allowlist', () => {
21 let donor: IKeyringPair;21 let donor: IKeyringPair;
modifiedtests/src/eth/base.test.tsdiffbeforeafterboth
17import {Contract} from 'web3-eth-contract';17import {Contract} from 'web3-eth-contract';
1818
19import {IKeyringPair} from '@polkadot/types/types';19import {IKeyringPair} from '@polkadot/types/types';
20import {EthUniqueHelper, itEth, usingEthPlaygrounds, expect} from './util/playgrounds';20import {EthUniqueHelper, itEth, usingEthPlaygrounds, expect} from './util';
2121
2222
23describe('Contract calls', () => {23describe('Contract calls', () => {
modifiedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth
14// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.14// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1515
16import {IKeyringPair} from '@polkadot/types/types';16import {IKeyringPair} from '@polkadot/types/types';
17import {usingEthPlaygrounds, itEth, expect, EthUniqueHelper} from './util/playgrounds';17import {usingEthPlaygrounds, itEth, expect, EthUniqueHelper} from './util';
1818
19async function recordEthFee(helper: EthUniqueHelper, userAddress: string, call: () => Promise<any>) {19async function recordEthFee(helper: EthUniqueHelper, userAddress: string, call: () => Promise<any>) {
20 const before = await helper.balance.getSubstrate(helper.address.ethToSubstrate(userAddress));20 const before = await helper.balance.getSubstrate(helper.address.ethToSubstrate(userAddress));
modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';17import {itEth, usingEthPlaygrounds, expect} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
1919
20describe('EVM collection properties', () => {20describe('EVM collection properties', () => {
modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
2// This file is part of Unique Network.
3
4// Unique Network is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Unique Network is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
16
1import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
2import {usingPlaygrounds} from './../util/playgrounds/index';18import {usingPlaygrounds} from '../util/index';
3import {itEth, expect} from '../eth/util/playgrounds';19import {itEth, expect} from './util';
420
5describe('evm collection sponsoring', () => {21describe('evm collection sponsoring', () => {
6 let donor: IKeyringPair;22 let donor: IKeyringPair;
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {EthUniqueHelper} from './util/playgrounds/unique.dev';18import {EthUniqueHelper} from './util/playgrounds/unique.dev';
19import {itEth, expect, SponsoringMode, usingEthPlaygrounds} from '../eth/util/playgrounds';19import {itEth, expect, SponsoringMode, usingEthPlaygrounds} from './util';
20import {usingPlaygrounds} from '../util/playgrounds';20import {usingPlaygrounds} from '../util';
21import {CompiledContract} from './util/playgrounds/types';21import {CompiledContract} from './util/playgrounds/types';
2222
23describe('Sponsoring EVM contracts', () => {23describe('Sponsoring EVM contracts', () => {
modifiedtests/src/eth/createNFTCollection.test.tsdiffbeforeafterboth
1616
17import {evmToAddress} from '@polkadot/util-crypto';17import {evmToAddress} from '@polkadot/util-crypto';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';19import {expect, itEth, usingEthPlaygrounds} from './util';
2020
2121
22describe('Create NFT collection from EVM', () => {22describe('Create NFT collection from EVM', () => {
modifiedtests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth
1616
17import {evmToAddress} from '@polkadot/util-crypto';17import {evmToAddress} from '@polkadot/util-crypto';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {Pallets, requirePalletsOrSkip} from '../util/playgrounds';19import {Pallets, requirePalletsOrSkip} from '../util';
20import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';20import {expect, itEth, usingEthPlaygrounds} from './util';
2121
2222
23describe('Create RFT collection from EVM', () => {23describe('Create RFT collection from EVM', () => {
modifiedtests/src/eth/crossTransfer.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itEth, usingEthPlaygrounds} from './util/playgrounds';17import {itEth, usingEthPlaygrounds} from './util';
18import {CrossAccountId} from '../util/playgrounds/unique';18import {CrossAccountId} from '../util/playgrounds/unique';
19import {IKeyringPair} from '@polkadot/types/types';19import {IKeyringPair} from '@polkadot/types/types';
2020
modifiedtests/src/eth/evmCoder.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itEth, expect, usingEthPlaygrounds} from './util/playgrounds';18import {itEth, expect, usingEthPlaygrounds} from './util';
1919
20const getContractSource = (collectionAddress: string, contractAddress: string): string => {20const getContractSource = (collectionAddress: string, contractAddress: string): string => {
21 return `21 return `
modifiedtests/src/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth
2222
23import {Contract} from 'web3-eth-contract';23import {Contract} from 'web3-eth-contract';
2424
25import {usingEthPlaygrounds, expect, itEth, EthUniqueHelper} from '../util/playgrounds';25import {usingEthPlaygrounds, expect, itEth, EthUniqueHelper} from '../util';
26import {CompiledContract} from '../util/playgrounds/types';26import {CompiledContract} from '../util/playgrounds/types';
27import {requirePalletsOrSkip, Pallets} from '../../util/playgrounds';27import {requirePalletsOrSkip, Pallets} from '../../util';
2828
2929
30let compiledFractionalizer: CompiledContract;30let compiledFractionalizer: CompiledContract;
modifiedtests/src/eth/fungible.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
1919
20describe('Fungible: Information getting', () => {20describe('Fungible: Information getting', () => {
modifiedtests/src/eth/helpersSmoke.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
1919
20describe('Helpers sanity check', () => {20describe('Helpers sanity check', () => {
modifiedtests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {readFile} from 'fs/promises';18import {readFile} from 'fs/promises';
19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from '../util/playgrounds';19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from '../util';
2020
21describe('Matcher contract usage', () => {21describe('Matcher contract usage', () => {
22 const PRICE = 2000n;22 const PRICE = 2000n;
modifiedtests/src/eth/migration.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
1919
20describe('EVM Migrations', () => {20describe('EVM Migrations', () => {
modifiedtests/src/eth/nesting/nest.test.tsdiffbeforeafterboth
1import {IKeyringPair} from '@polkadot/types/types';1import {IKeyringPair} from '@polkadot/types/types';
2import {Contract} from 'web3-eth-contract';2import {Contract} from 'web3-eth-contract';
33
4import {itEth, EthUniqueHelper, usingEthPlaygrounds, expect} from '../util/playgrounds';4import {itEth, EthUniqueHelper, usingEthPlaygrounds, expect} from '../util';
55
6const createNestingCollection = async (6const createNestingCollection = async (
7 helper: EthUniqueHelper,7 helper: EthUniqueHelper,
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itEth, usingEthPlaygrounds, expect, EthUniqueHelper} from './util/playgrounds';17import {itEth, usingEthPlaygrounds, expect, EthUniqueHelper} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {Contract} from 'web3-eth-contract';19import {Contract} from 'web3-eth-contract';
2020
modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
1818
19import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util/playgrounds';19import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util';
2020
21describe('EVM payable contracts', () => {21describe('EVM payable contracts', () => {
22 let donor: IKeyringPair;22 let donor: IKeyringPair;
modifiedtests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth
17import {expect} from 'chai';17import {expect} from 'chai';
18import {readFile} from 'fs/promises';18import {readFile} from 'fs/promises';
19import {IKeyringPair} from '@polkadot/types/types';19import {IKeyringPair} from '@polkadot/types/types';
20import {EthUniqueHelper, itEth, usingEthPlaygrounds} from '../util/playgrounds';20import {EthUniqueHelper, itEth, usingEthPlaygrounds} from '../util';
2121
22async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {22async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {
23 // Proxy owner has no special privilegies, we don't need to reuse them23 // Proxy owner has no special privilegies, we don't need to reuse them
modifiedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth
1616
17import {readFile} from 'fs/promises';17import {readFile} from 'fs/promises';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {EthUniqueHelper, itEth, usingEthPlaygrounds, expect} from '../util/playgrounds';19import {EthUniqueHelper, itEth, usingEthPlaygrounds, expect} from '../util';
2020
2121
22async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {22async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {
modifiedtests/src/eth/reFungible.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {Pallets, requirePalletsOrSkip} from '../util/playgrounds';17import {Pallets, requirePalletsOrSkip} from '../util';
18import {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';18import {expect, itEth, usingEthPlaygrounds} from './util';
19import {IKeyringPair} from '@polkadot/types/types';19import {IKeyringPair} from '@polkadot/types/types';
2020
21describe('Refungible: Information getting', () => {21describe('Refungible: Information getting', () => {
modifiedtests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {Pallets, requirePalletsOrSkip} from '../util/playgrounds';17import {Pallets, requirePalletsOrSkip} from '../util';
18import {EthUniqueHelper, expect, itEth, usingEthPlaygrounds} from './util/playgrounds';18import {EthUniqueHelper, expect, itEth, usingEthPlaygrounds} from './util';
19import {IKeyringPair} from '@polkadot/types/types';19import {IKeyringPair} from '@polkadot/types/types';
20import {Contract} from 'web3-eth-contract';20import {Contract} from 'web3-eth-contract';
2121
modifiedtests/src/eth/sponsoring.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itEth, expect, SponsoringMode} from '../eth/util/playgrounds';18import {itEth, expect, SponsoringMode} from './util';
19import {usingPlaygrounds} from './../util/playgrounds/index';19import {usingPlaygrounds} from '../util/index';
2020
21describe('EVM sponsoring', () => {21describe('EVM sponsoring', () => {
22 let donor: IKeyringPair;22 let donor: IKeyringPair;
modifiedtests/src/eth/tokenProperties.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';17import {itEth, usingEthPlaygrounds, expect} from './util';
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
1919
20describe('EVM token properties', () => {20describe('EVM token properties', () => {
addedtests/src/eth/util/index.tsdiffbeforeafterboth

no changes

deletedtests/src/eth/util/playgrounds/index.tsdiffbeforeafterboth

no changes

modifiedtests/src/fungible.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20const U128_MAX = (1n << 128n) - 1n;20const U128_MAX = (1n << 128n) - 1n;
2121
modifiedtests/src/getPropertiesRpc.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
19import {UniqueHelper, UniqueNFTCollection} from './util/playgrounds/unique';19import {UniqueHelper, UniqueNFTCollection} from './util/playgrounds/unique';
2020
21const collectionProps = [21const collectionProps = [
modifiedtests/src/inflation.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, usingPlaygrounds} from './util';
1919
20// todo:playgrounds requires sudo, look into on the later stage20// todo:playgrounds requires sudo, look into on the later stage
21describe('integration test: Inflation', () => {21describe('integration test: Inflation', () => {
modifiedtests/src/limits.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util';
1919
20describe('Number of tokens per address (NFT)', () => {20describe('Number of tokens per address (NFT)', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/nesting/collectionProperties.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, Pallets, usingPlaygrounds, expect} from '../util/playgrounds';18import {itSub, Pallets, usingPlaygrounds, expect} from '../util';
19import {UniqueBaseCollection} from '../util/playgrounds/unique';19import {UniqueBaseCollection} from '../util/playgrounds/unique';
2020
21describe('Integration Test: Collection Properties', () => {21describe('Integration Test: Collection Properties', () => {
modifiedtests/src/nesting/graphs.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, usingPlaygrounds} from '../util/playgrounds';18import {expect, itSub, usingPlaygrounds} from '../util';
19import {UniqueHelper, UniqueNFToken} from '../util/playgrounds/unique';19import {UniqueHelper, UniqueNFToken} from '../util/playgrounds/unique';
2020
21/**21/**
modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from '../util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from '../util';
1919
20describe('Integration Test: Composite nesting tests', () => {20describe('Integration Test: Composite nesting tests', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/nesting/propertyPermissions.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, Pallets, usingPlaygrounds, expect} from '../util/playgrounds';18import {itSub, Pallets, usingPlaygrounds, expect} from '../util';
19import {UniqueNFTCollection, UniqueRFTCollection} from '../util/playgrounds/unique';19import {UniqueNFTCollection, UniqueRFTCollection} from '../util/playgrounds/unique';
2020
21describe('Integration Test: Access Rights to Token Properties', () => {21describe('Integration Test: Access Rights to Token Properties', () => {
modifiedtests/src/nesting/tokenProperties.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from '../util/playgrounds';18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from '../util';
19import {UniqueHelper, UniqueNFToken, UniqueRFToken} from '../util/playgrounds/unique';19import {UniqueHelper, UniqueNFToken, UniqueRFToken} from '../util/playgrounds/unique';
2020
21describe('Integration Test: Token Properties', () => {21describe('Integration Test: Token Properties', () => {
modifiedtests/src/nesting/unnest.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from '../util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from '../util';
1919
20describe('Integration Test: Unnesting', () => {20describe('Integration Test: Unnesting', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/nextSponsoring.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';
1919
20const SPONSORING_TIMEOUT = 5;20const SPONSORING_TIMEOUT = 5;
2121
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import {itSub, usingPlaygrounds, expect} from './util/playgrounds';17import {itSub, usingPlaygrounds, expect} from './util';
1818
19// Pallets that must always be present19// Pallets that must always be present
20const requiredPallets = [20const requiredPallets = [
modifiedtests/src/refungible.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util';
1919
20const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;20const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;
2121
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {20describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20describe('integration test: ext. removeCollectionSponsor():', () => {20describe('integration test: ext. removeCollectionSponsor():', () => {
21 let donor: IKeyringPair;21 let donor: IKeyringPair;
modifiedtests/src/rpc.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {usingPlaygrounds, itSub, expect} from './util/playgrounds';18import {usingPlaygrounds, itSub, expect} from './util';
19import {CrossAccountId} from './util/playgrounds/unique';19import {CrossAccountId} from './util/playgrounds/unique';
2020
21describe('integration test: RPC methods', () => {21describe('integration test: RPC methods', () => {
modifiedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth
1616
17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';
19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util';
2020
21const accountTokenOwnershipLimit = 0;21const accountTokenOwnershipLimit = 0;
22const sponsoredDataSize = 0;22const sponsoredDataSize = 0;
modifiedtests/src/setCollectionSponsor.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect, Pallets} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect, Pallets} from './util';
1919
20describe('integration test: ext. setCollectionSponsor():', () => {20describe('integration test: ext. setCollectionSponsor():', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/setPermissions.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20describe('Integration Test: Set Permissions', () => {20describe('Integration Test: Set Permissions', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/transfer.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itEth, usingEthPlaygrounds} from './eth/util/playgrounds';18import {itEth, usingEthPlaygrounds} from './eth/util';
19import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';19import {itSub, Pallets, usingPlaygrounds, expect} from './util';
2020
21describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {21describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
22 let donor: IKeyringPair;22 let donor: IKeyringPair;
modifiedtests/src/transferFrom.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, Pallets, usingPlaygrounds, expect} from './util';
1919
20describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {20describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {
21 let alice: IKeyringPair;21 let alice: IKeyringPair;
modifiedtests/src/tx-version-presence.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {Metadata} from '@polkadot/types';17import {Metadata} from '@polkadot/types';
18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';
1919
20let metadata: Metadata;20let metadata: Metadata;
2121
addedtests/src/util/globalSetup.tsdiffbeforeafterboth

no changes

addedtests/src/util/index.tsdiffbeforeafterboth

no changes

deletedtests/src/util/playgrounds/globalSetup.tsdiffbeforeafterboth

no changes

deletedtests/src/util/playgrounds/index.tsdiffbeforeafterboth

no changes

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
245 return balance;245 return balance;
246 }246 }
247247
248 calculatePalleteAddress(palletId: any) {248 calculatePalletAddress(palletId: any) {
249 const address = stringToU8a(('modl' + palletId).padEnd(32, '\0'));249 const address = stringToU8a(('modl' + palletId).padEnd(32, '\0'));
250 return encodeAddress(address);250 return encodeAddress(address);
251 }251 }