difftreelog
refactor js-packages structure
in: master
111 files changed
Makefilediffbeforeafterboth7 @echo " bench-unique"7 @echo " bench-unique"889NATIVE_FUNGIBLE_EVM_STUBS=./pallets/balances-adapter/src/stubs9NATIVE_FUNGIBLE_EVM_STUBS=./pallets/balances-adapter/src/stubs10NATIVE_FUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/nativeFungible.json10NATIVE_FUNGIBLE_EVM_ABI=./js-packages/evm-abi/abi/nativeFungible.json111112FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs12FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs13FUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/fungible.json13FUNGIBLE_EVM_ABI=./js-packages/evm-abi/abi/fungible.json141415NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs15NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs16NONFUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/nonFungible.json16NONFUNGIBLE_EVM_ABI=./js-packages/evm-abi/abi/nonFungible.json171718REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs18REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs19REFUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/reFungible.json19REFUNGIBLE_EVM_ABI=./js-packages/evm-abi/abi/reFungible.json20REFUNGIBLE_TOKEN_EVM_ABI=./js-packages/tests/eth/abi/reFungibleToken.json20REFUNGIBLE_TOKEN_EVM_ABI=./js-packages/evm-abi/abi/reFungibleToken.json212122CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/22CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/23CONTRACT_HELPERS_ABI=./js-packages/tests/eth/abi/contractHelpers.json23CONTRACT_HELPERS_ABI=./js-packages/evm-abi/abi/contractHelpers.json242425COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/25COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/26COLLECTION_HELPER_ABI=./js-packages/tests/eth/abi/collectionHelpers.json26COLLECTION_HELPER_ABI=./js-packages/evm-abi/abi/collectionHelpers.json272728TESTS_API=./js-packages/tests/eth/api/28TESTS_API=./js-packages/evm-abi/api/292930.PHONY: regenerate_solidity30.PHONY: regenerate_solidity31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.soljs-packages/evm-abi/abi/collectionHelpers.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/contractHelpers.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/fungible.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/fungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/nativeFungible.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/nonFungible.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/nonFungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/reFungible.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/reFungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/reFungibleToken.jsondiffbeforeafterbothno changes
js-packages/evm-abi/abi/reFungibleTokenDeprecated.jsondiffbeforeafterbothno changes
js-packages/evm-abi/api/CollectionHelpers.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/ContractHelpers.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/UniqueFungible.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/UniqueNFT.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/UniqueNativeFungible.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/UniqueRefungible.soldiffbeforeafterbothno changes
js-packages/evm-abi/api/UniqueRefungibleToken.soldiffbeforeafterbothno changes
js-packages/evm-abi/package.jsondiffbeforeafterbothno changes
js-packages/package.jsondiffbeforeafterboth26 "@types/node": "^20.8.10",26 "@types/node": "^20.8.10",27 "@typescript-eslint/eslint-plugin": "^6.10.0",27 "@typescript-eslint/eslint-plugin": "^6.10.0",28 "@typescript-eslint/parser": "^6.10.0",28 "@typescript-eslint/parser": "^6.10.0",29 "@unique-nft/evm-abi": "workspace:*",29 "@unique-nft/opal-testnet-types": "workspace:*",30 "@unique-nft/opal-testnet-types": "workspace:*",30 "@unique-nft/playgrounds": "workspace:*",31 "@unique-nft/playgrounds": "workspace:*",31 "@unique/test-utils": "workspace:*",32 "@unique/test-utils": "workspace:*",58 "packageManager": "yarn@3.6.1",59 "packageManager": "yarn@3.6.1",59 "workspaces": [60 "workspaces": [60 "types",61 "types",62 "evm-abi",61 "playgrounds",63 "playgrounds",62 "scripts",64 "scripts",63 "test-utils",65 "test-utils",js-packages/scripts/benchmarks/mintFee/index.tsdiffbeforeafterboth1import {usingEthPlaygrounds} from '@unique/tests/eth/util/index.js';1import {usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';2import {EthUniqueHelper} from '@unique/tests/eth/util/playgrounds/unique.dev.js';2import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';3import {readFile} from 'fs/promises';3import {readFile} from 'fs/promises';4import type {ICrossAccountId} from '@unique-nft/playgrounds/types.js';4import type {ICrossAccountId} from '@unique-nft/playgrounds/types.js';5import type {IKeyringPair} from '@polkadot/types/types';5import type {IKeyringPair} from '@polkadot/types/types';8import {createObjectCsvWriter} from 'csv-writer';8import {createObjectCsvWriter} from 'csv-writer';9import {convertToTokens, createCollectionForBenchmarks, PERMISSIONS, PROPERTIES} from '../utils/common.js';9import {convertToTokens, createCollectionForBenchmarks, PERMISSIONS, PROPERTIES} from '../utils/common.js';10import {makeNames} from '@unique/test-utils/util.js';10import {makeNames} from '@unique/test-utils/util.js';11import type {ContractImports} from '@unique/tests/eth/util/playgrounds/types.js';11import type {ContractImports} from '@unique/test-utils/eth/types.js';121213const {dirname} = makeNames(import.meta.url);13const {dirname} = makeNames(import.meta.url);1415const EVM_ABI_DIR = `${dirname}/../../../evm-abi`;141615export const CONTRACT_IMPORT: ContractImports[] = [17export const CONTRACT_IMPORT: ContractImports[] = [16 {18 {17 fsPath: `${dirname}/../../../tests/eth/api/CollectionHelpers.sol`,19 fsPath: `${EVM_ABI_DIR}/api/CollectionHelpers.sol`,18 solPath: 'eth/api/CollectionHelpers.sol',20 solPath: 'eth/api/CollectionHelpers.sol',19 },21 },20 {22 {21 fsPath: `${dirname}/../../../tests/eth/api/ContractHelpers.sol`,23 fsPath: `${EVM_ABI_DIR}/api/ContractHelpers.sol`,22 solPath: 'eth/api/ContractHelpers.sol',24 solPath: 'eth/api/ContractHelpers.sol',23 },25 },24 {26 {25 fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungibleToken.sol`,27 fsPath: `${EVM_ABI_DIR}/api/UniqueRefungibleToken.sol`,26 solPath: 'eth/api/UniqueRefungibleToken.sol',28 solPath: 'eth/api/UniqueRefungibleToken.sol',27 },29 },28 {30 {29 fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungible.sol`,31 fsPath: `${EVM_ABI_DIR}/api/UniqueRefungible.sol`,30 solPath: 'eth/api/UniqueRefungible.sol',32 solPath: 'eth/api/UniqueRefungible.sol',31 },33 },32 {34 {33 fsPath: `${dirname}/../../../tests/eth/api/UniqueNFT.sol`,35 fsPath: `${EVM_ABI_DIR}/api/UniqueNFT.sol`,34 solPath: 'eth/api/UniqueNFT.sol',36 solPath: 'eth/api/UniqueNFT.sol',35 },37 },36];38];js-packages/scripts/benchmarks/nesting/index.tsdiffbeforeafterboth1import {usingEthPlaygrounds} from '@unique/tests/eth/util/index.js';1import {usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';2import {EthUniqueHelper} from '@unique/tests/eth/util/playgrounds/unique.dev.js';2import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';3import {readFile} from 'fs/promises';3import {readFile} from 'fs/promises';4import type {IKeyringPair} from '@polkadot/types/types';4import type {IKeyringPair} from '@polkadot/types/types';5import {Contract} from 'web3-eth-contract';5import {Contract} from 'web3-eth-contract';6import {convertToTokens} from '../utils/common.js';6import {convertToTokens} from '../utils/common.js';7import {makeNames} from '@unique/test-utils/util.js';7import {makeNames} from '@unique/test-utils/util.js';8import type {ContractImports} from '@unique/tests/eth/util/playgrounds/types.js';8import type {ContractImports} from '@unique/test-utils/eth/types.js';9import type {RMRKNestableMintable} from './ABIGEN/index.js';9import type {RMRKNestableMintable} from './ABIGEN/index.js';101011const {dirname} = makeNames(import.meta.url);11const {dirname} = makeNames(import.meta.url);1213const NODE_MODULES = `${dirname}/../../../../node_modules`;121413export const CONTRACT_IMPORT: ContractImports[] = [15export const CONTRACT_IMPORT: ContractImports[] = [14 {16 {15 fsPath: `${dirname}/../../../../node_modules/@rmrk-team/evm-contracts/contracts/RMRK/nestable/RMRKNestable.sol`,17 fsPath: `${NODE_MODULES}/@rmrk-team/evm-contracts/contracts/RMRK/nestable/RMRKNestable.sol`,16 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/nestable/RMRKNestable.sol',18 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/nestable/RMRKNestable.sol',17 },19 },18 {20 {19 fsPath: `${dirname}/../../../../node_modules/@rmrk-team/evm-contracts/contracts/RMRK/nestable/IERC6059.sol`,21 fsPath: `${NODE_MODULES}/@rmrk-team/evm-contracts/contracts/RMRK/nestable/IERC6059.sol`,20 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/nestable/IERC6059.sol',22 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/nestable/IERC6059.sol',21 },23 },22 {24 {23 fsPath: `${dirname}/../../../../node_modules/@rmrk-team/evm-contracts/contracts/RMRK/core/RMRKCore.sol`,25 fsPath: `${NODE_MODULES}/@rmrk-team/evm-contracts/contracts/RMRK/core/RMRKCore.sol`,24 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/core/RMRKCore.sol',26 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/core/RMRKCore.sol',25 },27 },26 {28 {27 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol`,29 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol`,28 solPath: '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol',30 solPath: '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol',29 },31 },30 {32 {31 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/token/ERC721/IERC721.sol`,33 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/token/ERC721/IERC721.sol`,32 solPath: '@openzeppelin/contracts/token/ERC721/IERC721.sol',34 solPath: '@openzeppelin/contracts/token/ERC721/IERC721.sol',33 },35 },34 {36 {35 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol`,37 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol`,36 solPath: '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol',38 solPath: '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol',37 },39 },38 {40 {39 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/utils/Address.sol`,41 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/utils/Address.sol`,40 solPath: '@openzeppelin/contracts/utils/Address.sol',42 solPath: '@openzeppelin/contracts/utils/Address.sol',41 },43 },42 {44 {43 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/utils/Context.sol`,45 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/utils/Context.sol`,44 solPath: '@openzeppelin/contracts/utils/Context.sol',46 solPath: '@openzeppelin/contracts/utils/Context.sol',45 },47 },46 {48 {47 fsPath: `${dirname}/../../../../node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol`,49 fsPath: `${NODE_MODULES}/@openzeppelin/contracts/utils/introspection/IERC165.sol`,48 solPath: '@openzeppelin/contracts/utils/introspection/IERC165.sol',50 solPath: '@openzeppelin/contracts/utils/introspection/IERC165.sol',49 },51 },50 {52 {51 fsPath: `${dirname}/../../../../node_modules/@rmrk-team/evm-contracts/contracts/RMRK/library/RMRKErrors.sol`,53 fsPath: `${NODE_MODULES}/@rmrk-team/evm-contracts/contracts/RMRK/library/RMRKErrors.sol`,52 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/library/RMRKErrors.sol',54 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/library/RMRKErrors.sol',53 },55 },54 {56 {55 fsPath: `${dirname}/../../../../node_modules/@rmrk-team/evm-contracts/contracts/RMRK/core/IRMRKCore.sol`,57 fsPath: `${NODE_MODULES}/@rmrk-team/evm-contracts/contracts/RMRK/core/IRMRKCore.sol`,56 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/core/IRMRKCore.sol',58 solPath: '@rmrk-team/evm-contracts/contracts/RMRK/core/IRMRKCore.sol',57 },59 },58 {60 {js-packages/scripts/benchmarks/opsFee/index.tsdiffbeforeafterboth1import {usingEthPlaygrounds} from '@unique/tests/eth/util/index.js';1import {usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';2import {EthUniqueHelper} from '@unique/tests/eth/util/playgrounds/unique.dev.js';2import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';3import {readFile} from 'fs/promises';3import {readFile} from 'fs/promises';4import {CollectionLimitField, CreateCollectionData, TokenPermissionField} from '@unique/tests/eth/util/playgrounds/types.js';4import {CollectionLimitField, CreateCollectionData, TokenPermissionField} from '@unique/test-utils/eth/types.js';5import type {IKeyringPair} from '@polkadot/types/types';5import type {IKeyringPair} from '@polkadot/types/types';6import {UniqueFTCollection, UniqueNFTCollection} from '@unique-nft/playgrounds/unique.js';6import {UniqueFTCollection, UniqueNFTCollection} from '@unique-nft/playgrounds/unique.js';7import {Contract} from 'web3-eth-contract';7import {Contract} from 'web3-eth-contract';76 PERMISSIONS,76 PERMISSIONS,77 )) as UniqueNFTCollection;77 )) as UniqueNFTCollection;787879 const helperContract = await helper.ethNativeContract.collectionHelpers(ethSigner);79 const helperContract = helper.ethNativeContract.collectionHelpers(ethSigner);80 let zeppelelinContract: Contract | null = null;80 let zeppelelinContract: Contract | null = null;81 const ZEPPELIN_OBJECT = '0x' + (await readFile(`${dirname}/../utils/openZeppelin/ERC721/bin/ZeppelinContract.bin`)).toString();81 const ZEPPELIN_OBJECT = '0x' + (await readFile(`${dirname}/../utils/openZeppelin/ERC721/bin/ZeppelinContract.bin`)).toString();82 const ZEPPELIN_ABI = JSON.parse((await readFile(`${dirname}/../utils/openZeppelin/ERC721/bin/ZeppelinContract.abi`)).toString());82 const ZEPPELIN_ABI = JSON.parse((await readFile(`${dirname}/../utils/openZeppelin/ERC721/bin/ZeppelinContract.abi`)).toString());js-packages/scripts/benchmarks/utils/common.tsdiffbeforeafterboth1import {EthUniqueHelper} from '@unique/tests/eth/util/playgrounds/unique.dev.js';1import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';2import {UniqueNFTCollection, UniqueRFTCollection} from '@unique-nft/playgrounds/unique.js';2import {UniqueNFTCollection, UniqueRFTCollection} from '@unique-nft/playgrounds/unique.js';3import type {ITokenPropertyPermission, TCollectionMode} from '@unique-nft/playgrounds/types.js';3import type {ITokenPropertyPermission, TCollectionMode} from '@unique-nft/playgrounds/types.js';4import type {IKeyringPair} from '@polkadot/types/types';4import type {IKeyringPair} from '@polkadot/types/types';js-packages/scripts/calibrate.tsdiffbeforeafterboth1import type {IKeyringPair} from '@polkadot/types/types';1import type {IKeyringPair} from '@polkadot/types/types';2import {usingEthPlaygrounds} from '@unique/tests/eth/util/index.js';2import {usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';3import {EthUniqueHelper} from '@unique/tests//eth/util/playgrounds/unique.dev.js';3import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';445class Fract {5class Fract {6 static ZERO = new Fract(0n);6 static ZERO = new Fract(0n);js-packages/scripts/correctStateAfterMaintenance.tsdiffbeforeafterbothno changes
js-packages/scripts/runCheckState.tsdiffbeforeafterbothno changes
js-packages/test-utils/eth/index.tsdiffbeforeafterbothno changes
js-packages/test-utils/eth/types.tsdiffbeforeafterbothno changes
js-packages/test-utils/eth/util.tsdiffbeforeafterbothno changes
js-packages/tests/eth/abi/collectionHelpers.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/contractHelpers.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/fungible.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/fungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/nativeFungible.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/nonFungible.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/nonFungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/reFungible.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/reFungibleDeprecated.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/reFungibleToken.jsondiffbeforeafterbothno changes
js-packages/tests/eth/abi/reFungibleTokenDeprecated.jsondiffbeforeafterbothno changes
js-packages/tests/eth/allowlist.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Pallets} from '@unique/test-utils/util.js';18import {Pallets} from '@unique/test-utils/util.js';19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from './util/index.js';19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from '@unique/test-utils/eth/util.js';20import {CreateCollectionData} from './util/playgrounds/types.js';20import {CreateCollectionData} from '@unique/test-utils/eth/types.js';212122describe('EVM contract allowlist', () => {22describe('EVM contract allowlist', () => {23 let donor: IKeyringPair;23 let donor: IKeyringPair;js-packages/tests/eth/api/CollectionHelpers.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/ContractHelpers.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/UniqueFungible.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/UniqueNFT.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/UniqueNativeFungible.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/UniqueRefungible.soldiffbeforeafterbothno changes
js-packages/tests/eth/api/UniqueRefungibleToken.soldiffbeforeafterbothno changes
js-packages/tests/eth/base.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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, usingEthPlaygrounds, expect} from './util/index.js';18import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';19import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';19import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';2020212122describe('Contract calls', () => {22describe('Contract calls', () => {js-packages/tests/eth/collectionAdmin.test.tsdiffbeforeafterboth17import {expect} from 'chai';17import {expect} from 'chai';18import {Pallets} from '@unique/test-utils/util.js';18import {Pallets} from '@unique/test-utils/util.js';19import type {IEthCrossAccountId} from '@unique-nft/playgrounds/types.js';19import type {IEthCrossAccountId} from '@unique-nft/playgrounds/types.js';20import {usingEthPlaygrounds, itEth} from './util/index.js';20import {usingEthPlaygrounds, itEth} from '@unique/test-utils/eth/util.js';21import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';21import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';22import {CreateCollectionData} from './util/playgrounds/types.js';22import {CreateCollectionData} from '@unique/test-utils/eth/types.js';232324async function recordEthFee(helper: EthUniqueHelper, userAddress: string, call: () => Promise<any>) {24async function recordEthFee(helper: EthUniqueHelper, userAddress: string, call: () => Promise<any>) {25 const before = await helper.balance.getSubstrate(helper.address.ethToSubstrate(userAddress));25 const before = await helper.balance.getSubstrate(helper.address.ethToSubstrate(userAddress));js-packages/tests/eth/collectionHelperAddress.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/index.js';17import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {COLLECTION_HELPER, Pallets} from '@unique/test-utils/util.js';19import {COLLECTION_HELPER, Pallets} from '@unique/test-utils/util.js';2020js-packages/tests/eth/collectionLimits.test.tsdiffbeforeafterboth1import type {IKeyringPair} from '@polkadot/types/types';1import type {IKeyringPair} from '@polkadot/types/types';2import {Pallets} from '@unique/test-utils/util.js';2import {Pallets} from '@unique/test-utils/util.js';3import {expect, itEth, usingEthPlaygrounds} from './util/index.js';3import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';4import {CollectionLimitField, CreateCollectionData} from './util/playgrounds/types.js';4import {CollectionLimitField, CreateCollectionData} from '@unique/test-utils/eth/types.js';55667describe('Can set collection limits', () => {7describe('Can set collection limits', () => {js-packages/tests/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/index.js';17import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';18import {Pallets} from '@unique/test-utils/util.js';18import {Pallets} from '@unique/test-utils/util.js';19import type {IProperty, ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';19import type {IProperty, ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';20import type {IKeyringPair} from '@polkadot/types/types';20import type {IKeyringPair} from '@polkadot/types/types';js-packages/tests/eth/collectionSponsoring.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Pallets, requirePalletsOrSkip, usingPlaygrounds} from '@unique/test-utils/util.js';18import {Pallets, requirePalletsOrSkip, usingPlaygrounds} from '@unique/test-utils/util.js';19import {itEth, expect} from './util/index.js';19import {itEth, expect} from '@unique/test-utils/eth/util.js';20import {CollectionLimitField, TokenPermissionField} from './util/playgrounds/types.js';20import {CollectionLimitField, TokenPermissionField} from '@unique/test-utils/eth/types.js';212122describe('evm nft collection sponsoring', () => {22describe('evm nft collection sponsoring', () => {23 let donor: IKeyringPair;23 let donor: IKeyringPair;js-packages/tests/eth/contractSponsoring.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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';18import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';19import {itEth, expect, SponsoringMode, usingEthPlaygrounds} from './util/index.js';19import {itEth, expect, SponsoringMode, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {usingPlaygrounds} from '@unique/test-utils/util.js';20import {usingPlaygrounds} from '@unique/test-utils/util.js';21import type {CompiledContract} from './util/playgrounds/types.js';21import type {CompiledContract} from '@unique/test-utils/eth/types.js';222223describe('Sponsoring EVM contracts', () => {23describe('Sponsoring EVM contracts', () => {24 let donor: IKeyringPair;24 let donor: IKeyringPair;js-packages/tests/eth/createCollection.test.tsdiffbeforeafterboth17import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {evmToAddress} from '@polkadot/util-crypto';18import {evmToAddress} from '@polkadot/util-crypto';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';20import {expect, itEth, usingEthPlaygrounds} from './util/index.js';20import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';21import {CREATE_COLLECTION_DATA_DEFAULTS, CollectionLimitField, CollectionMode, CreateCollectionData, TokenPermissionField, emptyAddress} from './util/playgrounds/types.js';21import {CREATE_COLLECTION_DATA_DEFAULTS, CollectionLimitField, CollectionMode, CreateCollectionData, TokenPermissionField, emptyAddress} from '@unique/test-utils/eth/types.js';22import {CollectionFlag} from '@unique-nft/playgrounds/types.js';22import {CollectionFlag} from '@unique-nft/playgrounds/types.js';23import type {IEthCrossAccountId, TCollectionMode} from '@unique-nft/playgrounds/types.js';23import type {IEthCrossAccountId, TCollectionMode} from '@unique-nft/playgrounds/types.js';2424js-packages/tests/eth/createFTCollection.seqtest.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';18import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';19import {expect, itEth, usingEthPlaygrounds} from './util/index.js';19import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';202021const DECIMALS = 18;21const DECIMALS = 18;2222js-packages/tests/eth/createFTCollection.test.tsdiffbeforeafterboth17import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {evmToAddress} from '@polkadot/util-crypto';18import {evmToAddress} from '@polkadot/util-crypto';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';20import {expect, itEth, usingEthPlaygrounds} from './util/index.js';20import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';21import {CollectionLimitField} from './util/playgrounds/types.js';21import {CollectionLimitField} from '@unique/test-utils/eth/types.js';222223const DECIMALS = 18;23const DECIMALS = 18;2424js-packages/tests/eth/createNFTCollection.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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {expect, itEth, usingEthPlaygrounds} from './util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';1919202021describe('Create NFT collection from EVM', () => {21describe('Create NFT collection from EVM', () => {js-packages/tests/eth/createNFTCollection.test.tsdiffbeforeafterboth161617import {evmToAddress} from '@polkadot/util-crypto';17import {evmToAddress} from '@polkadot/util-crypto';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {expect, itEth, usingEthPlaygrounds} from './util/index.js';19import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {CollectionLimitField} from './util/playgrounds/types.js';20import {CollectionLimitField} from '@unique/test-utils/eth/types.js';2121222223describe('Create NFT collection from EVM', () => {23describe('Create NFT collection from EVM', () => {js-packages/tests/eth/createRFTCollection.test.tsdiffbeforeafterboth17import {evmToAddress} from '@polkadot/util-crypto';17import {evmToAddress} from '@polkadot/util-crypto';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';19import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';20import {expect, itEth, usingEthPlaygrounds} from './util/index.js';20import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';21import {CollectionLimitField} from './util/playgrounds/types.js';21import {CollectionLimitField} from '@unique/test-utils/eth/types.js';2222232324describe('Create RFT collection from EVM', () => {24describe('Create RFT collection from EVM', () => {js-packages/tests/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/index.js';17import {itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import {CrossAccountId} from '@unique-nft/playgrounds/unique.js';18import {CrossAccountId} from '@unique-nft/playgrounds/unique.js';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';2020js-packages/tests/eth/destroyCollection.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Pallets} from '@unique/test-utils/util.js';18import {Pallets} from '@unique/test-utils/util.js';19import {expect, itEth, usingEthPlaygrounds} from './util/index.js';19import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import type {TCollectionMode} from '@unique-nft/playgrounds/types.js';20import type {TCollectionMode} from '@unique-nft/playgrounds/types.js';21import {CreateCollectionData} from './util/playgrounds/types.js';21import {CreateCollectionData} from '@unique/test-utils/eth/types.js';222223describe('Destroy Collection from EVM', function() {23describe('Destroy Collection from EVM', function() {24 let donor: IKeyringPair;24 let donor: IKeyringPair;js-packages/tests/eth/ethFeesAreCorrect.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://witww.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://witww.gnu.org/licenses/>.161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, usingEthPlaygrounds, expect} from './util/index.js';18import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';191920describe('Eth fees are correct', () => {20describe('Eth fees are correct', () => {21 let donor: IKeyringPair;21 let donor: IKeyringPair;js-packages/tests/eth/events.test.tsdiffbeforeafterboth161617import {expect} from 'chai';17import {expect} from 'chai';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {itEth, usingEthPlaygrounds} from './util/index.js';19import {itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';20import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';21import type {IEvent, TCollectionMode} from '@unique-nft/playgrounds/types.js';21import type {IEvent, TCollectionMode} from '@unique-nft/playgrounds/types.js';22import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';22import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';23import {CollectionLimitField, TokenPermissionField, CreateCollectionData} from './util/playgrounds/types.js';23import {CollectionLimitField, TokenPermissionField, CreateCollectionData} from '@unique/test-utils/eth/types.js';24import type {NormalizedEvent} from './util/playgrounds/types.js';24import type {NormalizedEvent} from '@unique/test-utils/eth/types.js';252526let donor: IKeyringPair;26let donor: IKeyringPair;2727js-packages/tests/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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, expect, usingEthPlaygrounds} from './util/index.js';18import {itEth, expect, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';191920const getContractSource = (collectionAddress: string, contractAddress: string): string => `20const getContractSource = (collectionAddress: string, contractAddress: string): string => `21 // SPDX-License-Identifier: MIT21 // SPDX-License-Identifier: MITjs-packages/tests/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth222223import {Contract} from 'web3-eth-contract';23import {Contract} from 'web3-eth-contract';242425import {usingEthPlaygrounds, expect, itEth} from '../util/index.js';25import {usingEthPlaygrounds, expect, itEth} from '@unique/test-utils/eth/util.js';26import {EthUniqueHelper} from '../util/playgrounds/unique.dev.js';26import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';27import type {CompiledContract} from '../util/playgrounds/types.js';27import type {CompiledContract} from '@unique/test-utils/eth/types.js';28import {requirePalletsOrSkip, Pallets, makeNames} from '@unique/test-utils/util.js';28import {requirePalletsOrSkip, Pallets, makeNames} from '@unique/test-utils/util.js';292930const {dirname} = makeNames(import.meta.url);30const {dirname} = makeNames(import.meta.url);313132let compiledFractionalizer: CompiledContract;32let compiledFractionalizer: CompiledContract;3334const EVM_ABI_DIR = `${dirname}/../../../evm-abi`;333534const compileContract = async (helper: EthUniqueHelper): Promise<CompiledContract> => {36const compileContract = async (helper: EthUniqueHelper): Promise<CompiledContract> => {35 if(!compiledFractionalizer) {37 if(!compiledFractionalizer) {36 compiledFractionalizer = await helper.ethContract.compile('Fractionalizer', (await readFile(`${dirname}/Fractionalizer.sol`)).toString(), [38 compiledFractionalizer = await helper.ethContract.compile('Fractionalizer', (await readFile(`${dirname}/Fractionalizer.sol`)).toString(), [37 {solPath: 'api/CollectionHelpers.sol', fsPath: `${dirname}/../api/CollectionHelpers.sol`},39 {solPath: 'api/CollectionHelpers.sol', fsPath: `${EVM_ABI_DIR}/api/CollectionHelpers.sol`},38 {solPath: 'api/ContractHelpers.sol', fsPath: `${dirname}/../api/ContractHelpers.sol`},40 {solPath: 'api/ContractHelpers.sol', fsPath: `${EVM_ABI_DIR}/api/ContractHelpers.sol`},39 {solPath: 'api/UniqueRefungibleToken.sol', fsPath: `${dirname}/../api/UniqueRefungibleToken.sol`},41 {solPath: 'api/UniqueRefungibleToken.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueRefungibleToken.sol`},40 {solPath: 'api/UniqueRefungible.sol', fsPath: `${dirname}/../api/UniqueRefungible.sol`},42 {solPath: 'api/UniqueRefungible.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueRefungible.sol`},41 {solPath: 'api/UniqueNFT.sol', fsPath: `${dirname}/../api/UniqueNFT.sol`},43 {solPath: 'api/UniqueNFT.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueNFT.sol`},42 ]);44 ]);43 }45 }44 return compiledFractionalizer;46 return compiledFractionalizer;js-packages/tests/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/index.js';17import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';191920describe('Fungible: Plain calls', () => {20describe('Fungible: Plain calls', () => {js-packages/tests/eth/getCode.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/index.js';17import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {COLLECTION_HELPER, CONTRACT_HELPER} from '@unique/test-utils/util.js';19import {COLLECTION_HELPER, CONTRACT_HELPER} from '@unique/test-utils/util.js';2020js-packages/tests/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/index.js';17import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';191920describe('Helpers sanity check', () => {20describe('Helpers sanity check', () => {js-packages/tests/eth/marketplace-v2/marketplace.test.tsdiffbeforeafterboth17import * as web3 from 'web3';17import * as web3 from 'web3';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {readFile} from 'fs/promises';19import {readFile} from 'fs/promises';20import {SponsoringMode, itEth, usingEthPlaygrounds} from '../util/index.js';20import {SponsoringMode, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';21import {EthUniqueHelper} from '../util/playgrounds/unique.dev.js';21import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';22import {makeNames, expect} from '@unique/test-utils/util.js';22import {makeNames, expect} from '@unique/test-utils/util.js';232324const {dirname} = makeNames(import.meta.url);24const {dirname} = makeNames(import.meta.url);404041 async function deployMarket(helper: EthUniqueHelper, marketOwner: string) {41 async function deployMarket(helper: EthUniqueHelper, marketOwner: string) {42 const nodeModulesDir = `${dirname}/../../../node_modules`;42 const nodeModulesDir = `${dirname}/../../../node_modules`;43 const solApiDir = `${dirname}/../api`;43 const solApiDir = `${dirname}/../../../evm-abi/api`;44 return await helper.ethContract.deployByCode(44 return await helper.ethContract.deployByCode(45 marketOwner,45 marketOwner,46 'Market',46 'Market',js-packages/tests/eth/marketplace/marketplace.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {readFile} from 'fs/promises';18import {readFile} from 'fs/promises';19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from '../util/index.js';19import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from '@unique/test-utils/eth/util.js';20import {makeNames} from '@unique/test-utils/util.js';20import {makeNames} from '@unique/test-utils/util.js';212122const {dirname} = makeNames(import.meta.url);22const {dirname} = makeNames(import.meta.url);23const EVM_ABI_DIR = `${dirname}/../../../evm-abi`;232424describe('Matcher contract usage', () => {25describe('Matcher contract usage', () => {25 const PRICE = 2000n;26 const PRICE = 2000n;505151 itEth('With UNQ', async ({helper}) => {52 itEth('With UNQ', async ({helper}) => {52 const matcherOwner = await helper.eth.createAccountWithBalance(donor);53 const matcherOwner = await helper.eth.createAccountWithBalance(donor);53 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${dirname}/../api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);54 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);545555 const sponsor = await helper.eth.createAccountWithBalance(donor);56 const sponsor = await helper.eth.createAccountWithBalance(donor);56 const helpers = await helper.ethNativeContract.contractHelpers(matcherOwner);57 const helpers = await helper.ethNativeContract.contractHelpers(matcherOwner);102103103 itEth('With escrow', async ({helper}) => {104 itEth('With escrow', async ({helper}) => {104 const matcherOwner = await helper.eth.createAccountWithBalance(donor);105 const matcherOwner = await helper.eth.createAccountWithBalance(donor);105 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${dirname}/../api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);106 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);106107107 const sponsor = await helper.eth.createAccountWithBalance(donor);108 const sponsor = await helper.eth.createAccountWithBalance(donor);108 const escrow = await helper.eth.createAccountWithBalance(donor);109 const escrow = await helper.eth.createAccountWithBalance(donor);166167167 itEth('Sell tokens from substrate user via EVM contract', async ({helper}) => {168 itEth('Sell tokens from substrate user via EVM contract', async ({helper}) => {168 const matcherOwner = await helper.eth.createAccountWithBalance(donor);169 const matcherOwner = await helper.eth.createAccountWithBalance(donor);169 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${dirname}/../api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);170 const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${EVM_ABI_DIR}/api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2);170171171 await helper.eth.transferBalanceFromSubstrate(donor, matcher.options.address);172 await helper.eth.transferBalanceFromSubstrate(donor, matcher.options.address);172173js-packages/tests/eth/migration.seqtest.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/index.js';17import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {Struct} from '@polkadot/types';19import {Struct} from '@polkadot/types';2020js-packages/tests/eth/nativeFungible.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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {expect, itEth, usingEthPlaygrounds} from './util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import {UniqueHelper} from '@unique-nft/playgrounds/unique.js';19import {UniqueHelper} from '@unique-nft/playgrounds/unique.js';202021describe('NativeFungible: ERC20 calls', () => {21describe('NativeFungible: ERC20 calls', () => {js-packages/tests/eth/nativeRpc/estimateGas.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/index.js';17import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19192020js-packages/tests/eth/nesting/nest.test.tsdiffbeforeafterboth1import type {IKeyringPair} from '@polkadot/types/types';1import type {IKeyringPair} from '@polkadot/types/types';2import {Contract} from 'web3-eth-contract';2import {Contract} from 'web3-eth-contract';334import {itEth, usingEthPlaygrounds, expect} from '../util/index.js';4import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';5import {EthUniqueHelper} from '../util/playgrounds/unique.dev.js';5import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';667const createNestingCollection = async (7const createNestingCollection = async (8 helper: EthUniqueHelper,8 helper: EthUniqueHelper,js-packages/tests/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} from './util/index.js';17import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';18import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';18import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';20import {Contract} from 'web3-eth-contract';20import {Contract} from 'web3-eth-contract';21import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';21import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';22import {CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField} from './util/playgrounds/types.js';22import {CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField} from '@unique/test-utils/eth/types.js';232324describe('Check ERC721 token URI for NFT', () => {24describe('Check ERC721 token URI for NFT', () => {25 let donor: IKeyringPair;25 let donor: IKeyringPair;js-packages/tests/eth/payable.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';181819import {itEth, expect, usingEthPlaygrounds} from './util/index.js';19import {itEth, expect, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';20import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';21import {makeNames} from '@unique/test-utils/util.js';21import {makeNames} from '@unique/test-utils/util.js';222223const {dirname} = makeNames(import.meta.url);23const {dirname} = makeNames(import.meta.url);261 [261 [262 {262 {263 solPath: 'api/CollectionHelpers.sol',263 solPath: 'api/CollectionHelpers.sol',264 fsPath: `${dirname}/api/CollectionHelpers.sol`,264 fsPath: `${dirname}/../../evm-abi/api/CollectionHelpers.sol`,265 },265 },266 {266 {267 solPath: 'api/UniqueNFT.sol',267 solPath: 'api/UniqueNFT.sol',268 fsPath: `${dirname}/api/UniqueNFT.sol`,268 fsPath: `${dirname}/../../evm-abi/api/UniqueNFT.sol`,269 },269 },270 ],270 ],271 );271 );js-packages/tests/eth/precompile.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';181819import {expect, itEth, usingEthPlaygrounds} from './util/index.js';19import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';202021describe('Precompiles', () => {21describe('Precompiles', () => {22 let donor: IKeyringPair;22 let donor: IKeyringPair;js-packages/tests/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth17import {expect} from 'chai';17import {expect} from 'chai';18import {readFile} from 'fs/promises';18import {readFile} from 'fs/promises';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';20import {itEth, usingEthPlaygrounds} from '../util/index.js';20import {itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';21import {EthUniqueHelper} from '../util/playgrounds/unique.dev.js';21import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';22import {makeNames} from '@unique/test-utils/util.js';22import {makeNames} from '@unique/test-utils/util.js';232324const {dirname} = makeNames(import.meta.url);24const {dirname} = makeNames(import.meta.url);js-packages/tests/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth161617import {readFile} from 'fs/promises';17import {readFile} from 'fs/promises';18import type {IKeyringPair} from '@polkadot/types/types';18import type {IKeyringPair} from '@polkadot/types/types';19import {itEth, usingEthPlaygrounds, expect} from '../util/index.js';19import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';20import {EthUniqueHelper} from '../util/playgrounds/unique.dev.js';20import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';21import {makeNames} from '@unique/test-utils/util.js';21import {makeNames} from '@unique/test-utils/util.js';222223const {dirname} = makeNames(import.meta.url);23const {dirname} = makeNames(import.meta.url);js-packages/tests/eth/proxyContract.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';181819import {itEth, expect, usingEthPlaygrounds} from './util/index.js';19import {itEth, expect, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';20import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';212122describe('EVM payable contracts', () => {22describe('EVM payable contracts', () => {23 let donor: IKeyringPair;23 let donor: IKeyringPair;js-packages/tests/eth/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 {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';17import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';18import {expect, itEth, usingEthPlaygrounds} from './util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';20import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';20import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';21import {CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField} from './util/playgrounds/types.js';21import {CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField} from '@unique/test-utils/eth/types.js';222223describe('Refungible: Plain calls', () => {23describe('Refungible: Plain calls', () => {24 let donor: IKeyringPair;24 let donor: IKeyringPair;js-packages/tests/eth/reFungibleToken.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 {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';17import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';18import {expect, itEth, usingEthPlaygrounds} from './util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';19import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';20import type {IKeyringPair} from '@polkadot/types/types';20import type {IKeyringPair} from '@polkadot/types/types';21import {Contract} from 'web3-eth-contract';21import {Contract} from 'web3-eth-contract';2222js-packages/tests/eth/scheduling.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 {expect} from 'chai';17import {expect} from 'chai';18import {itSchedEth} from './util/index.js';18import {itSchedEth} from '@unique/test-utils/eth/util.js';19import {EthUniqueHelper} from './util/playgrounds/unique.dev.js';19import {EthUniqueHelper} from '@unique/test-utils/eth/index.js';20import {Pallets, usingPlaygrounds} from '@unique/test-utils/util.js';20import {Pallets, usingPlaygrounds} from '@unique/test-utils/util.js';212122describe('Scheduing EVM smart contracts', () => {22describe('Scheduing EVM smart contracts', () => {js-packages/tests/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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, expect, SponsoringMode} from './util/index.js';18import {itEth, expect, SponsoringMode} from '@unique/test-utils/eth/util.js';19import {usingPlaygrounds} from '@unique/test-utils/util.js';19import {usingPlaygrounds} from '@unique/test-utils/util.js';202021describe('EVM sponsoring', () => {21describe('EVM sponsoring', () => {js-packages/tests/eth/tokenProperties.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Contract} from 'web3-eth-contract';18import {Contract} from 'web3-eth-contract';19import {itEth, usingEthPlaygrounds, expect} from './util/index.js';19import {itEth, usingEthPlaygrounds, expect} from '@unique/test-utils/eth/util.js';20import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';20import type {ITokenPropertyPermission} from '@unique-nft/playgrounds/types.js';21import {Pallets} from '@unique/test-utils/util.js';21import {Pallets} from '@unique/test-utils/util.js';22import {UniqueNFTCollection, UniqueNFToken, UniqueRFTCollection} from '@unique-nft/playgrounds/unique.js';22import {UniqueNFTCollection, UniqueNFToken, UniqueRFTCollection} from '@unique-nft/playgrounds/unique.js';23import {CreateCollectionData, TokenPermissionField} from './util/playgrounds/types.js';23import {CreateCollectionData, TokenPermissionField} from '@unique/test-utils/eth/types.js';242425describe('EVM token properties', () => {25describe('EVM token properties', () => {26 let donor: IKeyringPair;26 let donor: IKeyringPair;js-packages/tests/eth/tokens/callMethodsERC20.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 {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';17import {Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';18import {expect, itEth, usingEthPlaygrounds} from '../util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';20import {CreateCollectionData} from '../util/playgrounds/types.js';20import {CreateCollectionData} from '@unique/test-utils/eth/types.js';212122[22[23 {mode: 'ft' as const, requiredPallets: []},23 {mode: 'ft' as const, requiredPallets: []},js-packages/tests/eth/tokens/callMethodsERC721.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 {Pallets} from '@unique/test-utils/util.js';17import {Pallets} from '@unique/test-utils/util.js';18import {expect, itEth, usingEthPlaygrounds} from '../util/index.js';18import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import type {IKeyringPair} from '@polkadot/types/types';19import type {IKeyringPair} from '@polkadot/types/types';20import {CreateCollectionData} from '../util/playgrounds/types.js';20import {CreateCollectionData} from '@unique/test-utils/eth/types.js';2121222223describe('ERC-721 call methods', () => {23describe('ERC-721 call methods', () => {js-packages/tests/eth/tokens/minting.test.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {Pallets} from '@unique/test-utils/util.js';18import {Pallets} from '@unique/test-utils/util.js';19import {expect, itEth, usingEthPlaygrounds} from '../util/index.js';19import {expect, itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';20import {CreateCollectionData} from '../util/playgrounds/types.js';20import {CreateCollectionData} from '@unique/test-utils/eth/types.js';2121222223describe('Minting tokens', () => {23describe('Minting tokens', () => {js-packages/tests/eth/transferValue.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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, usingEthPlaygrounds} from './util/index.js';18import {itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import {expect} from 'chai';19import {expect} from 'chai';202021describe('Send value to contract', () => {21describe('Send value to contract', () => {js-packages/tests/eth/util/index.tsdiffbeforeafterbothno changes
js-packages/tests/eth/util/playgrounds/types.tsdiffbeforeafterbothno changes
js-packages/tests/eth/util/playgrounds/unique.dev.tsdiffbeforeafterbothno changes
js-packages/tests/maintenance.seqtest.tsdiffbeforeafterboth17import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {ApiPromise} from '@polkadot/api';18import {ApiPromise} from '@polkadot/api';19import {expect, itSched, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from '@unique/test-utils/util.js';19import {expect, itSched, itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from '@unique/test-utils/util.js';20import {itEth} from './eth/util/index.js';20import {itEth} from '@unique/test-utils/eth/util.js';21import {main as correctState} from './migrations/correctStateAfterMaintenance.js';21import {main as correctState} from '@unique/scripts/correctStateAfterMaintenance.js';22import type {PalletBalancesIdAmount} from '@polkadot/types/lookup';22import type {PalletBalancesIdAmount} from '@polkadot/types/lookup';23import type {Vec} from '@polkadot/types-codec';23import type {Vec} from '@polkadot/types-codec';2424js-packages/tests/migrations/942057-appPromotion/README.mddiffbeforeafterbothno changes
js-packages/tests/migrations/942057-appPromotion/collectData.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/942057-appPromotion/executeMigration.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/942057-appPromotion/index.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/942057-appPromotion/stakersParser.jsonnetdiffbeforeafterbothno changes
js-packages/tests/migrations/correctStateAfterMaintenance.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/index.tsdiffbeforeafterbothno changes
js-packages/tests/migrations/runCheckState.tsdiffbeforeafterbothno changes
js-packages/tests/sub/appPromotion/appPromotion.seqtest.tsdiffbeforeafterboth161617import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from '@unique/test-utils/util.js';19import {expect} from '../../eth/util/index.js';19import {expect} from '@unique/test-utils/eth/util.js';202021let superuser: IKeyringPair;21let superuser: IKeyringPair;22let donor: IKeyringPair;22let donor: IKeyringPair;js-packages/tests/sub/appPromotion/appPromotion.test.tsdiffbeforeafterboth19 itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip, LOCKING_PERIOD, UNLOCKING_PERIOD,19 itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip, LOCKING_PERIOD, UNLOCKING_PERIOD,20} from '@unique/test-utils/util.js';20} from '@unique/test-utils/util.js';21import {DevUniqueHelper} from '@unique/test-utils';21import {DevUniqueHelper} from '@unique/test-utils';22import {itEth, expect, SponsoringMode} from '../../eth/util/index.js';22import {itEth, expect, SponsoringMode} from '@unique/test-utils/eth/util.js';232324let donor: IKeyringPair;24let donor: IKeyringPair;25let palletAdmin: IKeyringPair;25let palletAdmin: IKeyringPair;js-packages/tests/sub/nesting/nesting.negative.test.tsdiffbeforeafterboth17import type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {expect, itSub, Pallets, usingPlaygrounds} from '@unique/test-utils/util.js';18import {expect, itSub, Pallets, usingPlaygrounds} from '@unique/test-utils/util.js';19import {UniqueFTCollection, UniqueNFTCollection, UniqueNFToken, UniqueRFTCollection, UniqueRFToken} from '@unique-nft/playgrounds/unique.js';19import {UniqueFTCollection, UniqueNFTCollection, UniqueNFToken, UniqueRFTCollection, UniqueRFToken} from '@unique-nft/playgrounds/unique.js';20import {itEth} from '../../eth/util/index.js';20import {itEth} from '@unique/test-utils/eth/util.js';212122let alice: IKeyringPair;22let alice: IKeyringPair;23let bob: IKeyringPair;23let bob: IKeyringPair;js-packages/tests/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 type {IKeyringPair} from '@polkadot/types/types';17import type {IKeyringPair} from '@polkadot/types/types';18import {itEth, usingEthPlaygrounds} from './eth/util/index.js';18import {itEth, usingEthPlaygrounds} from '@unique/test-utils/eth/util.js';19import {itSub, Pallets, usingPlaygrounds, expect} from '@unique/test-utils/util.js';19import {itSub, Pallets, usingPlaygrounds, expect} from '@unique/test-utils/util.js';20import {NON_EXISTENT_COLLECTION_ID} from '@unique-nft/playgrounds/types.js';20import {NON_EXISTENT_COLLECTION_ID} from '@unique-nft/playgrounds/types.js';2121js-packages/yarn.lockdiffbeforeafterboth1242 languageName: node1242 languageName: node1243 linkType: hard1243 linkType: hard12441245"@unique-nft/evm-abi@workspace:*, @unique-nft/evm-abi@workspace:evm-abi":1246 version: 0.0.0-use.local1247 resolution: "@unique-nft/evm-abi@workspace:evm-abi"1248 languageName: unknown1249 linkType: soft124412501245"@unique-nft/opal-testnet-types@workspace:*, @unique-nft/opal-testnet-types@workspace:types":1251"@unique-nft/opal-testnet-types@workspace:*, @unique-nft/opal-testnet-types@workspace:types":1246 version: 0.0.0-use.local1252 version: 0.0.0-use.local6011 "@types/node": ^20.8.106017 "@types/node": ^20.8.106012 "@typescript-eslint/eslint-plugin": ^6.10.06018 "@typescript-eslint/eslint-plugin": ^6.10.06013 "@typescript-eslint/parser": ^6.10.06019 "@typescript-eslint/parser": ^6.10.06020 "@unique-nft/evm-abi": "workspace:*"6014 "@unique-nft/opal-testnet-types": "workspace:*"6021 "@unique-nft/opal-testnet-types": "workspace:*"6015 "@unique-nft/playgrounds": "workspace:*"6022 "@unique-nft/playgrounds": "workspace:*"6016 "@unique/test-utils": "workspace:*"6023 "@unique/test-utils": "workspace:*"