difftreelog
Merge pull request #506 from UniqueNetwork/fix/rft-tests-quartz-unique
in: master
Fix/rft tests quartz unique
3 files changed
tests/src/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth20import {evmToAddress} from '@polkadot/util-crypto';20import {evmToAddress} from '@polkadot/util-crypto';21import {readFile} from 'fs/promises';21import {readFile} from 'fs/promises';22import {executeTransaction, submitTransactionAsync} from '../../substrate/substrate-api';22import {executeTransaction, submitTransactionAsync} from '../../substrate/substrate-api';23import {getCreateCollectionResult, getCreateItemResult, UNIQUE} from '../../util/helpers';23import {getCreateCollectionResult, getCreateItemResult, UNIQUE, requirePallets, Pallets} from '../../util/helpers';24import {collectionIdToAddress, CompiledContract, createEthAccountWithBalance, createNonfungibleCollection, createRefungibleCollection, GAS_ARGS, itWeb3, tokenIdFromAddress, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from '../util/helpers';24import {collectionIdToAddress, CompiledContract, createEthAccountWithBalance, createNonfungibleCollection, createRefungibleCollection, GAS_ARGS, itWeb3, tokenIdFromAddress, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from '../util/helpers';25import {Contract} from 'web3-eth-contract';25import {Contract} from 'web3-eth-contract';26import * as solc from 'solc';26import * as solc from 'solc';116}116}117117118describe('Fractionalizer contract usage', () => {118describe('Fractionalizer contract usage', () => {119 before(async function() {120 await requirePallets(this, [Pallets.ReFungible]);121 });122119 itWeb3('Set RFT collection', async ({api, web3, privateKeyWrapper}) => {123 itWeb3('Set RFT collection', async ({api, web3, privateKeyWrapper}) => {120 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);124 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);224228225229226describe('Negative Integration Tests for fractionalizer', () => {230describe('Negative Integration Tests for fractionalizer', () => {231 before(async function() {232 await requirePallets(this, [Pallets.ReFungible]);233 });234227 itWeb3('call setRFTCollection twice', async ({api, web3, privateKeyWrapper}) => {235 itWeb3('call setRFTCollection twice', async ({api, web3, privateKeyWrapper}) => {228 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);236 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);tests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth651});651});652652653describe('ERC 1633 implementation', () => {653describe('ERC 1633 implementation', () => {654 before(async function() {655 await requirePallets(this, [Pallets.ReFungible]);656 });657654 itWeb3('Parent NFT token address and id', async ({api, web3, privateKeyWrapper}) => {658 itWeb3('Parent NFT token address and id', async ({api, web3, privateKeyWrapper}) => {655 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);659 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);tests/src/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 Web3 from 'web3';17import Web3 from 'web3';18import {createEthAccountWithBalance, createRefungibleCollection, GAS_ARGS, itWeb3} from './eth/util/helpers';18import {createEthAccountWithBalance, createNonfungibleCollection, GAS_ARGS, itWeb3} from './eth/util/helpers';19import * as solc from 'solc';19import * as solc from 'solc';202021import chai from 'chai';21import chai from 'chai';92describe('Evm Coder tests', () => {92describe('Evm Coder tests', () => {93 itWeb3('Call non-existing function', async ({api, web3, privateKeyWrapper}) => {93 itWeb3('Call non-existing function', async ({api, web3, privateKeyWrapper}) => {94 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);94 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);95 const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner);95 const {collectionIdAddress} = await createNonfungibleCollection(api, web3, owner);96 const contract = await deployTestContract(web3, owner, collectionIdAddress, '0x1bfed5D614b886b9Ab2eA4CBAc22A96B7EC29c9c');96 const contract = await deployTestContract(web3, owner, collectionIdAddress, '0x1bfed5D614b886b9Ab2eA4CBAc22A96B7EC29c9c');97 const testContract = await deployTestContract(web3, owner, collectionIdAddress, contract.options.address);97 const testContract = await deployTestContract(web3, owner, collectionIdAddress, contract.options.address);98 {98 {