difftreelog
fix(rft) fractionalizer tests run only when rft pallet is on
in: master
2 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);