difftreelog
rename: WhiteList to AllowList
in: master
1 file changed
tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth1import {readFile} from 'fs/promises';1import {readFile} from 'fs/promises';2import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';2import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';3import privateKey from '../../substrate/privateKey';3import privateKey from '../../substrate/privateKey';4import {addToWhiteListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers';4import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers';5import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, subToEth, subToEthLowercase} from '../util/helpers';5import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, subToEth, subToEthLowercase} from '../util/helpers';6import {evmToAddress} from '@polkadot/util-crypto';6import {evmToAddress} from '@polkadot/util-crypto';7import nonFungibleAbi from '../nonFungibleAbi.json';7import nonFungibleAbi from '../nonFungibleAbi.json';29 await confirmSponsorshipExpectSuccess(collectionId);29 await confirmSponsorshipExpectSuccess(collectionId);303031 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});31 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});32 await addToWhiteListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));32 await addAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));333334 const seller = privateKey('//Bob');34 const seller = privateKey('//Bob');35 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});35 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});36 await addToWhiteListExpectSuccess(alice, collectionId, evmToAddress(subToEth(seller.address)));36 await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(seller.address)));373738 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);38 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);3939156 await confirmSponsorshipExpectSuccess(collectionId);156 await confirmSponsorshipExpectSuccess(collectionId);157157158 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});158 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});159 await addToWhiteListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));159 await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));160160161 const seller = privateKey('//Bob');161 const seller = privateKey('//Bob');162 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});162 await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});163 await addToWhiteListExpectSuccess(alice, collectionId, evmToAddress(subToEth(seller.address)));163 await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(seller.address)));164164165 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);165 const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);166166