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.tsdiffbeforeafterboth--- 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);
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
+});