difftreelog
tests: rearrange scripts & lift top util files to util folder
in: master
80 files changed
tests/package.jsondiffbeforeafterboth21 },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",292930 "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",414142 "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",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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920describe('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;tests/src/adminTransferAndBurn.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 {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';191920describe('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;tests/src/allowLists.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 {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';19import {ICollectionPermissions} from './util/playgrounds/types';19import {ICollectionPermissions} from './util/playgrounds/types';202021describe('Integration Test ext. Allow list tests', () => {21describe('Integration Test ext. Allow list tests', () => {tests/src/app-promotion.seqtest.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 {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';202021let superuser: IKeyringPair;21let superuser: IKeyringPair;22let donor: IKeyringPair;22let donor: IKeyringPair;tests/src/app-promotion.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 {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';212122let 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 teststests/src/approve.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 {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';1919202021describe('Integration Test approve(spender, collection_id, item_id, amount):', () => {21describe('Integration Test approve(spender, collection_id, item_id, amount):', () => {tests/src/block-production.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 {ApiPromise} from '@polkadot/api';17import {ApiPromise} from '@polkadot/api';18import {expect, itSub} from './util/playgrounds';18import {expect, itSub} from './util';191920const BLOCK_TIME_MS = 12000;20const BLOCK_TIME_MS = 12000;21const TOLERANCE_MS = 3000;21const TOLERANCE_MS = 3000;tests/src/burnItem.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 {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';1919202021describe('integration test: ext. burnItem():', () => {21describe('integration test: ext. burnItem():', () => {tests/src/calibrate.tsdiffbeforeafterboth1import {IKeyringPair} from '@polkadot/types/types';1import {IKeyringPair} from '@polkadot/types/types';223import {usingEthPlaygrounds, EthUniqueHelper} from './eth/util/playgrounds';3import {usingEthPlaygrounds, EthUniqueHelper} from './eth/util';44556function 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}585859async 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 = [];636364 {64 {106 }106 }107}107}108108109async 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 = [];tests/src/change-collection-owner.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 {usingPlaygrounds, expect, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub} from './util';191920describe('Integration Test changeCollectionOwner(collection_id, new_owner):', () => {20describe('Integration Test changeCollectionOwner(collection_id, new_owner):', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';21212222tests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Create collection event ', () => {22describe('Create collection event ', () => {tests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Create Item event ', () => {22describe('Create Item event ', () => {tests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Create Multiple Items Event event ', () => {22describe('Create Multiple Items Event event ', () => {tests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Destroy collection event ', () => {22describe('Destroy collection event ', () => {tests/src/check-event/transferEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Transfer event ', () => {22describe('Transfer event ', () => {tests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {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';212122describe('Transfer event ', () => {22describe('Transfer event ', () => {tests/src/confirmSponsorship.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 {usingPlaygrounds, expect, itSub, Pallets} from './util/playgrounds';18import {usingPlaygrounds, expect, itSub, Pallets} from './util';191920async 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);tests/src/connection.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 {itSub, expect, usingPlaygrounds} from './util/playgrounds';17import {itSub, expect, usingPlaygrounds} from './util';181819describe('Connection smoke test', () => {19describe('Connection smoke test', () => {20 itSub('Connection can be established', async ({helper}) => {20 itSub('Connection can be established', async ({helper}) => {tests/src/createCollection.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 {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';2121tests/src/createItem.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 {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';2121tests/src/createMultipleItems.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 {usingPlaygrounds, expect, Pallets, itSub} from './util/playgrounds';18import {usingPlaygrounds, expect, Pallets, itSub} from './util';191920describe('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;tests/src/createMultipleItemsEx.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 {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';202021describe('Integration Test: createMultipleItemsEx', () => {21describe('Integration Test: createMultipleItemsEx', () => {tests/src/creditFeesToTreasury.seqtest.tsdiffbeforeafterboth17import './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';212122const TREASURY = '5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z';22const TREASURY = '5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z';23const saneMinimumFee = 0.05;23const saneMinimumFee = 0.05;tests/src/destroyCollection.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 {itSub, expect, usingPlaygrounds, Pallets} from './util/playgrounds';18import {itSub, expect, usingPlaygrounds, Pallets} from './util';191920describe('integration test: ext. destroyCollection():', () => {20describe('integration test: ext. destroyCollection():', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/enableDisableTransfer.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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920describe('Enable/Disable Transfers', () => {20describe('Enable/Disable Transfers', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/eth/allowlist.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 {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';18import {itEth, usingEthPlaygrounds, expect} from './util';191920describe('EVM contract allowlist', () => {20describe('EVM contract allowlist', () => {21 let donor: IKeyringPair;21 let donor: IKeyringPair;tests/src/eth/base.test.tsdiffbeforeafterboth17import {Contract} from 'web3-eth-contract';17import {Contract} from 'web3-eth-contract';181819import {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';2121222223describe('Contract calls', () => {23describe('Contract calls', () => {tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth14// 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/>.151516import {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';181819async 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));tests/src/eth/collectionProperties.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 {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';17import {itEth, usingEthPlaygrounds, expect} from './util';18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';191920describe('EVM collection properties', () => {20describe('EVM collection properties', () => {tests/src/eth/collectionSponsoring.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 {usingPlaygrounds} from './../util/playgrounds/index';18import {usingPlaygrounds} from '../util/index';3import {itEth, expect} from '../eth/util/playgrounds';19import {itEth, expect} from './util';4205describe('evm collection sponsoring', () => {21describe('evm collection sponsoring', () => {6 let donor: IKeyringPair;22 let donor: IKeyringPair;tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth161617import {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';222223describe('Sponsoring EVM contracts', () => {23describe('Sponsoring EVM contracts', () => {tests/src/eth/createNFTCollection.test.tsdiffbeforeafterboth161617import {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';2020212122describe('Create NFT collection from EVM', () => {22describe('Create NFT collection from EVM', () => {tests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth161617import {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';2121222223describe('Create RFT collection from EVM', () => {23describe('Create RFT collection from EVM', () => {tests/src/eth/crossTransfer.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 {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';2020tests/src/eth/evmCoder.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 {itEth, expect, usingEthPlaygrounds} from './util/playgrounds';18import {itEth, expect, usingEthPlaygrounds} from './util';191920const getContractSource = (collectionAddress: string, contractAddress: string): string => {20const getContractSource = (collectionAddress: string, contractAddress: string): string => {21 return `21 return `tests/src/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth222223import {Contract} from 'web3-eth-contract';23import {Contract} from 'web3-eth-contract';242425import {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';2828292930let compiledFractionalizer: CompiledContract;30let compiledFractionalizer: CompiledContract;tests/src/eth/fungible.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 {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';191920describe('Fungible: Information getting', () => {20describe('Fungible: Information getting', () => {tests/src/eth/helpersSmoke.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 {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';191920describe('Helpers sanity check', () => {20describe('Helpers sanity check', () => {tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth161617import {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';202021describe('Matcher contract usage', () => {21describe('Matcher contract usage', () => {22 const PRICE = 2000n;22 const PRICE = 2000n;tests/src/eth/migration.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 {expect, itEth, usingEthPlaygrounds} from './util/playgrounds';17import {expect, itEth, usingEthPlaygrounds} from './util';18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';191920describe('EVM Migrations', () => {20describe('EVM Migrations', () => {tests/src/eth/nesting/nest.test.tsdiffbeforeafterboth1import {IKeyringPair} from '@polkadot/types/types';1import {IKeyringPair} from '@polkadot/types/types';2import {Contract} from 'web3-eth-contract';2import {Contract} from 'web3-eth-contract';334import {itEth, EthUniqueHelper, usingEthPlaygrounds, expect} from '../util/playgrounds';4import {itEth, EthUniqueHelper, usingEthPlaygrounds, expect} from '../util';556const createNestingCollection = async (6const createNestingCollection = async (7 helper: EthUniqueHelper,7 helper: EthUniqueHelper,tests/src/eth/nonFungible.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 {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';2020tests/src/eth/payable.test.tsdiffbeforeafterboth161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';181819import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util/playgrounds';19import {itEth, expect, usingEthPlaygrounds, EthUniqueHelper} from './util';202021describe('EVM payable contracts', () => {21describe('EVM payable contracts', () => {22 let donor: IKeyringPair;22 let donor: IKeyringPair;tests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth17import {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';212122async 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 themtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth161617import {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';2020212122async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {22async function proxyWrap(helper: EthUniqueHelper, wrapped: any, donor: IKeyringPair) {tests/src/eth/reFungible.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 {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';202021describe('Refungible: Information getting', () => {21describe('Refungible: Information getting', () => {tests/src/eth/reFungibleToken.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 {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';2121tests/src/eth/sponsoring.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 {itEth, expect, SponsoringMode} from '../eth/util/playgrounds';18import {itEth, expect, SponsoringMode} from './util';19import {usingPlaygrounds} from './../util/playgrounds/index';19import {usingPlaygrounds} from '../util/index';202021describe('EVM sponsoring', () => {21describe('EVM sponsoring', () => {22 let donor: IKeyringPair;22 let donor: IKeyringPair;tests/src/eth/tokenProperties.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 {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';17import {itEth, usingEthPlaygrounds, expect} from './util';18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';191920describe('EVM token properties', () => {20describe('EVM token properties', () => {tests/src/eth/util/index.tsdiffbeforeafterbothno changes
tests/src/eth/util/playgrounds/index.tsdiffbeforeafterbothno changes
tests/src/fungible.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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920const U128_MAX = (1n << 128n) - 1n;20const U128_MAX = (1n << 128n) - 1n;2121tests/src/getPropertiesRpc.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 {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';202021const collectionProps = [21const collectionProps = [tests/src/inflation.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 {expect, itSub, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, usingPlaygrounds} from './util';191920// todo:playgrounds requires sudo, look into on the later stage20// todo:playgrounds requires sudo, look into on the later stage21describe('integration test: Inflation', () => {21describe('integration test: Inflation', () => {tests/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 {expect, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util';191920describe('Number of tokens per address (NFT)', () => {20describe('Number of tokens per address (NFT)', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/nesting/collectionProperties.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 {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';202021describe('Integration Test: Collection Properties', () => {21describe('Integration Test: Collection Properties', () => {tests/src/nesting/graphs.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 {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';202021/**21/**tests/src/nesting/nest.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 {expect, itSub, Pallets, usingPlaygrounds} from '../util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from '../util';191920describe('Integration Test: Composite nesting tests', () => {20describe('Integration Test: Composite nesting tests', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/nesting/propertyPermissions.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 {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';202021describe('Integration Test: Access Rights to Token Properties', () => {21describe('Integration Test: Access Rights to Token Properties', () => {tests/src/nesting/tokenProperties.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 {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';202021describe('Integration Test: Token Properties', () => {21describe('Integration Test: Token Properties', () => {tests/src/nesting/unnest.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 {expect, itSub, Pallets, usingPlaygrounds} from '../util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from '../util';191920describe('Integration Test: Unnesting', () => {20describe('Integration Test: Unnesting', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/nextSponsoring.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 {expect, itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {expect, itSub, Pallets, usingPlaygrounds} from './util';191920const SPONSORING_TIMEOUT = 5;20const SPONSORING_TIMEOUT = 5;2121tests/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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';17import {itSub, usingPlaygrounds, expect} from './util';181819// Pallets that must always be present19// Pallets that must always be present20const requiredPallets = [20const requiredPallets = [tests/src/refungible.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 {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util';191920const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;20const MAX_REFUNGIBLE_PIECES = 1_000_000_000_000_000_000_000n;2121tests/src/removeCollectionAdmin.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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {20describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/removeCollectionSponsor.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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920describe('integration test: ext. removeCollectionSponsor():', () => {20describe('integration test: ext. removeCollectionSponsor():', () => {21 let donor: IKeyringPair;21 let donor: IKeyringPair;tests/src/rpc.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 {usingPlaygrounds, itSub, expect} from './util/playgrounds';18import {usingPlaygrounds, itSub, expect} from './util';19import {CrossAccountId} from './util/playgrounds/unique';19import {CrossAccountId} from './util/playgrounds/unique';202021describe('integration test: RPC methods', () => {21describe('integration test: RPC methods', () => {tests/src/setCollectionLimits.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util';202021const accountTokenOwnershipLimit = 0;21const accountTokenOwnershipLimit = 0;22const sponsoredDataSize = 0;22const sponsoredDataSize = 0;tests/src/setCollectionSponsor.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 {itSub, usingPlaygrounds, expect, Pallets} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect, Pallets} from './util';191920describe('integration test: ext. setCollectionSponsor():', () => {20describe('integration test: ext. setCollectionSponsor():', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/setPermissions.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 {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920describe('Integration Test: Set Permissions', () => {20describe('Integration Test: Set Permissions', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/transfer.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 {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';202021describe('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;tests/src/transferFrom.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 {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, Pallets, usingPlaygrounds, expect} from './util';191920describe('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;tests/src/tx-version-presence.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 {Metadata} from '@polkadot/types';17import {Metadata} from '@polkadot/types';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util';191920let metadata: Metadata;20let metadata: Metadata;2121tests/src/util/globalSetup.tsdiffbeforeafterbothno changes
tests/src/util/index.tsdiffbeforeafterbothno changes
tests/src/util/playgrounds/globalSetup.tsdiffbeforeafterbothno changes
tests/src/util/playgrounds/index.tsdiffbeforeafterbothno changes
tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth245 return balance;245 return balance;246 }246 }247247248 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 }