difftreelog
Fix eslint errors
in: master
5 files changed
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -44,7 +44,7 @@
from: userA,
to: userB,
value: '1000000',
- gas: helper.eth.DEFAULT_GAS
+ gas: helper.eth.DEFAULT_GAS,
}));
const balanceB = await helper.balance.getEthereum(userB);
expect(cost - balanceB < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))).to.be.true;
tests/src/eth/collectionProperties.test.tsdiffbeforeafterboth87 const caller = await helper.eth.createAccountWithBalance(donor);87 const caller = await helper.eth.createAccountWithBalance(donor);88 const bruh = await helper.eth.createAccountWithBalance(donor);88 const bruh = await helper.eth.createAccountWithBalance(donor);898990 const BASE_URI = 'base/'90 const BASE_URI = 'base/';91 const SUFFIX = 'suffix1'91 const SUFFIX = 'suffix1';92 const URI = 'uri1'92 const URI = 'uri1';939394 const collectionHelpers = helper.ethNativeContract.collectionHelpers(caller);94 const collectionHelpers = helper.ethNativeContract.collectionHelpers(caller);95 const creatorMethod = mode === 'rft' ? 'createRFTCollection' : 'createNFTCollection'95 const creatorMethod = mode === 'rft' ? 'createRFTCollection' : 'createNFTCollection';969697 const {collectionId, collectionAddress} = await helper.eth[creatorMethod](caller, 'n', 'd', 'p')97 const {collectionId, collectionAddress} = await helper.eth[creatorMethod](caller, 'n', 'd', 'p');989899 const contract = helper.ethNativeContract.collectionById(collectionId, mode, caller);99 const contract = helper.ethNativeContract.collectionById(collectionId, mode, caller);100 await contract.methods.addCollectionAdmin(bruh).send(); // to check that admin will work too100 await contract.methods.addCollectionAdmin(bruh).send(); // to check that admin will work too101101102 const collection1 = await helper.nft.getCollectionObject(collectionId);102 const collection1 = await helper.nft.getCollectionObject(collectionId);103 const data1 = await collection1.getData()103 const data1 = await collection1.getData();104 expect(data1?.raw.flags.erc721metadata).to.be.false;104 expect(data1?.raw.flags.erc721metadata).to.be.false;105 expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.false;105 expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.false;106106110 expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.true;110 expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.true;111111112 const collection2 = await helper.nft.getCollectionObject(collectionId);112 const collection2 = await helper.nft.getCollectionObject(collectionId);113 const data2 = await collection2.getData()113 const data2 = await collection2.getData();114 expect(data2?.raw.flags.erc721metadata).to.be.true;114 expect(data2?.raw.flags.erc721metadata).to.be.true;115115116 const TPPs = data2?.raw.tokenPropertyPermissions116 const TPPs = data2?.raw.tokenPropertyPermissions;117 expect(TPPs?.length).to.equal(2);117 expect(TPPs?.length).to.equal(2);118118119 expect(TPPs.find((tpp: ITokenPropertyPermission) => {119 expect(TPPs.find((tpp: ITokenPropertyPermission) => {120 return tpp.key === "URI" && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner120 return tpp.key === 'URI' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;121 })).to.be.not.null121 })).to.be.not.null;122122123 expect(TPPs.find((tpp: ITokenPropertyPermission) => {123 expect(TPPs.find((tpp: ITokenPropertyPermission) => {124 return tpp.key === "URISuffix" && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner124 return tpp.key === 'URISuffix' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;125 })).to.be.not.null125 })).to.be.not.null;126126127 expect(data2?.raw.properties?.find((property: IProperty) => {127 expect(data2?.raw.properties?.find((property: IProperty) => {128 return property.key === "baseURI" && property.value === BASE_URI128 return property.key === 'baseURI' && property.value === BASE_URI;129 })).to.be.not.null129 })).to.be.not.null;130130131 const token1Result = await contract.methods.mint(bruh).send();131 const token1Result = await contract.methods.mint(bruh).send();132 const tokenId1 = token1Result.events.Transfer.returnValues.tokenId;132 const tokenId1 = token1Result.events.Transfer.returnValues.tokenId;133133134 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI);134 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI);135135136 await contract.methods.setProperty(tokenId1, "URISuffix", Buffer.from(SUFFIX)).send();136 await contract.methods.setProperty(tokenId1, 'URISuffix', Buffer.from(SUFFIX)).send();137 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);137 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);138138139 await contract.methods.setProperty(tokenId1, "URI", Buffer.from(URI)).send();139 await contract.methods.setProperty(tokenId1, 'URI', Buffer.from(URI)).send();140 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(URI);140 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(URI);141141142 await contract.methods.deleteProperty(tokenId1, "URI").send();142 await contract.methods.deleteProperty(tokenId1, 'URI').send();143 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);143 expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);144144145 const token2Result = await contract.methods.mintWithTokenURI(bruh, URI).send();145 const token2Result = await contract.methods.mintWithTokenURI(bruh, URI).send();146 const tokenId2 = token2Result.events.Transfer.returnValues.tokenId;146 const tokenId2 = token2Result.events.Transfer.returnValues.tokenId;147147148 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(URI);148 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(URI);149149150 await contract.methods.deleteProperty(tokenId2, "URI").send();150 await contract.methods.deleteProperty(tokenId2, 'URI').send();151 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI);151 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI);152152153 await contract.methods.setProperty(tokenId2, "URISuffix", Buffer.from(SUFFIX)).send();153 await contract.methods.setProperty(tokenId2, 'URISuffix', Buffer.from(SUFFIX)).send();154 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI + SUFFIX);154 expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI + SUFFIX);155 }155 };156156157 itEth('ERC721Metadata property can be set for NFT collection', async({helper}) => {157 itEth('ERC721Metadata property can be set for NFT collection', async({helper}) => {158 await checkERC721Metadata(helper, 'nft');158 await checkERC721Metadata(helper, 'nft');tests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -247,7 +247,7 @@
const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', user);
- let result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI',).send();
+ const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
const tokenId = result.events.Transfer.returnValues.tokenId;
const events = helper.eth.normalizeEvents(result.events);
tests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -111,7 +111,7 @@
await collectionEvmOwned.methods.addCollectionAdmin(contract.options.address).send();
{
- const nextTokenId = await contract.methods.nextTokenId().call()
+ const nextTokenId = await contract.methods.nextTokenId().call();
const result = await contract.methods.mintWithTokenURI(receiver, nextTokenId, 'Test URI').send({from: caller});
const tokenId = result.events.Transfer.returnValues.tokenId;
expect(tokenId).to.be.equal('1');
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -189,7 +189,7 @@
async createERC721MetadataCompatibleNFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {
const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);
- const {collectionId, collectionAddress} = await this.createNFTCollection(signer, name, description, tokenPrefix)
+ const {collectionId, collectionAddress} = await this.createNFTCollection(signer, name, description, tokenPrefix);
await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();
@@ -211,7 +211,7 @@
async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {
const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);
- const {collectionId, collectionAddress} = await this.createRFTCollection(signer, name, description, tokenPrefix)
+ const {collectionId, collectionAddress} = await this.createRFTCollection(signer, name, description, tokenPrefix);
await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();