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.tsdiffbeforeafterboth--- 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
+});
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.tsdiffbeforeafterboth--- a/tests/src/evmCoder.test.ts
+++ b/tests/src/evmCoder.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
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
+});