--- a/tests/src/eth/fractionalizer/fractionalizer.test.ts +++ b/tests/src/eth/fractionalizer/fractionalizer.test.ts @@ -20,7 +20,7 @@ import {evmToAddress} from '@polkadot/util-crypto'; import {readFile} from 'fs/promises'; import {executeTransaction, submitTransactionAsync} from '../../substrate/substrate-api'; -import {getCreateCollectionResult, getCreateItemResult, UNIQUE} from '../../util/helpers'; +import {getCreateCollectionResult, getCreateItemResult, UNIQUE, requirePallets, Pallets} from '../../util/helpers'; import {collectionIdToAddress, CompiledContract, createEthAccountWithBalance, createNonfungibleCollection, createRefungibleCollection, GAS_ARGS, itWeb3, tokenIdFromAddress, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from '../util/helpers'; import {Contract} from 'web3-eth-contract'; import * as solc from 'solc'; @@ -116,6 +116,10 @@ } describe('Fractionalizer contract usage', () => { + before(async function() { + await requirePallets(this, [Pallets.ReFungible]); + }); + itWeb3('Set RFT collection', async ({api, web3, privateKeyWrapper}) => { const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper); const fractionalizer = await deployFractionalizer(web3, owner); @@ -224,6 +228,10 @@ describe('Negative Integration Tests for fractionalizer', () => { + before(async function() { + await requirePallets(this, [Pallets.ReFungible]); + }); + itWeb3('call setRFTCollection twice', async ({api, web3, privateKeyWrapper}) => { const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper); const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner); @@ -467,4 +475,4 @@ await expect(fractionalizer.methods.nft2rft(nftCollectionAddress, nftTokenId, 100n).call()) .to.be.rejectedWith(/TransferNotAllowed$/g); }); -}); \ No newline at end of file +}); --- a/tests/src/eth/reFungibleToken.test.ts +++ b/tests/src/eth/reFungibleToken.test.ts @@ -651,6 +651,10 @@ }); describe('ERC 1633 implementation', () => { + before(async function() { + await requirePallets(this, [Pallets.ReFungible]); + }); + itWeb3('Parent NFT token address and id', async ({api, web3, privateKeyWrapper}) => { const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper); --- a/tests/src/evmCoder.test.ts +++ b/tests/src/evmCoder.test.ts @@ -15,7 +15,7 @@ // along with Unique Network. If not, see . import Web3 from 'web3'; -import {createEthAccountWithBalance, createRefungibleCollection, GAS_ARGS, itWeb3} from './eth/util/helpers'; +import {createEthAccountWithBalance, createNonfungibleCollection, GAS_ARGS, itWeb3} from './eth/util/helpers'; import * as solc from 'solc'; import chai from 'chai'; @@ -92,7 +92,7 @@ describe('Evm Coder tests', () => { itWeb3('Call non-existing function', async ({api, web3, privateKeyWrapper}) => { const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper); - const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner); + const {collectionIdAddress} = await createNonfungibleCollection(api, web3, owner); const contract = await deployTestContract(web3, owner, collectionIdAddress, '0x1bfed5D614b886b9Ab2eA4CBAc22A96B7EC29c9c'); const testContract = await deployTestContract(web3, owner, collectionIdAddress, contract.options.address); { @@ -114,4 +114,4 @@ .to.be.rejectedWith(/unrecognized selector: 0xd9f02b36$/g); } }); -}); \ No newline at end of file +});