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.tsdiffbeforeafterboth--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -87,20 +87,20 @@
const caller = await helper.eth.createAccountWithBalance(donor);
const bruh = await helper.eth.createAccountWithBalance(donor);
- const BASE_URI = 'base/'
- const SUFFIX = 'suffix1'
- const URI = 'uri1'
+ const BASE_URI = 'base/';
+ const SUFFIX = 'suffix1';
+ const URI = 'uri1';
const collectionHelpers = helper.ethNativeContract.collectionHelpers(caller);
- const creatorMethod = mode === 'rft' ? 'createRFTCollection' : 'createNFTCollection'
+ const creatorMethod = mode === 'rft' ? 'createRFTCollection' : 'createNFTCollection';
- const {collectionId, collectionAddress} = await helper.eth[creatorMethod](caller, 'n', 'd', 'p')
+ const {collectionId, collectionAddress} = await helper.eth[creatorMethod](caller, 'n', 'd', 'p');
const contract = helper.ethNativeContract.collectionById(collectionId, mode, caller);
await contract.methods.addCollectionAdmin(bruh).send(); // to check that admin will work too
const collection1 = await helper.nft.getCollectionObject(collectionId);
- const data1 = await collection1.getData()
+ const data1 = await collection1.getData();
expect(data1?.raw.flags.erc721metadata).to.be.false;
expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.false;
@@ -110,36 +110,36 @@
expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.true;
const collection2 = await helper.nft.getCollectionObject(collectionId);
- const data2 = await collection2.getData()
+ const data2 = await collection2.getData();
expect(data2?.raw.flags.erc721metadata).to.be.true;
- const TPPs = data2?.raw.tokenPropertyPermissions
+ const TPPs = data2?.raw.tokenPropertyPermissions;
expect(TPPs?.length).to.equal(2);
expect(TPPs.find((tpp: ITokenPropertyPermission) => {
- return tpp.key === "URI" && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner
- })).to.be.not.null
+ return tpp.key === 'URI' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;
+ })).to.be.not.null;
expect(TPPs.find((tpp: ITokenPropertyPermission) => {
- return tpp.key === "URISuffix" && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner
- })).to.be.not.null
+ return tpp.key === 'URISuffix' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner;
+ })).to.be.not.null;
expect(data2?.raw.properties?.find((property: IProperty) => {
- return property.key === "baseURI" && property.value === BASE_URI
- })).to.be.not.null
+ return property.key === 'baseURI' && property.value === BASE_URI;
+ })).to.be.not.null;
const token1Result = await contract.methods.mint(bruh).send();
const tokenId1 = token1Result.events.Transfer.returnValues.tokenId;
expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI);
- await contract.methods.setProperty(tokenId1, "URISuffix", Buffer.from(SUFFIX)).send();
+ await contract.methods.setProperty(tokenId1, 'URISuffix', Buffer.from(SUFFIX)).send();
expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);
- await contract.methods.setProperty(tokenId1, "URI", Buffer.from(URI)).send();
+ await contract.methods.setProperty(tokenId1, 'URI', Buffer.from(URI)).send();
expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(URI);
- await contract.methods.deleteProperty(tokenId1, "URI").send();
+ await contract.methods.deleteProperty(tokenId1, 'URI').send();
expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX);
const token2Result = await contract.methods.mintWithTokenURI(bruh, URI).send();
@@ -147,12 +147,12 @@
expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(URI);
- await contract.methods.deleteProperty(tokenId2, "URI").send();
+ await contract.methods.deleteProperty(tokenId2, 'URI').send();
expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI);
- await contract.methods.setProperty(tokenId2, "URISuffix", Buffer.from(SUFFIX)).send();
+ await contract.methods.setProperty(tokenId2, 'URISuffix', Buffer.from(SUFFIX)).send();
expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI + SUFFIX);
- }
+ };
itEth('ERC721Metadata property can be set for NFT collection', async({helper}) => {
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.tsdiffbeforeafterboth189 async createERC721MetadataCompatibleNFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {189 async createERC721MetadataCompatibleNFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {190 const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);190 const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);191191192 const {collectionId, collectionAddress} = await this.createNFTCollection(signer, name, description, tokenPrefix)192 const {collectionId, collectionAddress} = await this.createNFTCollection(signer, name, description, tokenPrefix);193193194 await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();194 await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();195195211 async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {211 async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string}> {212 const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);212 const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer);213213214 const {collectionId, collectionAddress} = await this.createRFTCollection(signer, name, description, tokenPrefix)214 const {collectionId, collectionAddress} = await this.createRFTCollection(signer, name, description, tokenPrefix);215215216 await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();216 await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();217217