Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasMSg committed Oct 6, 2023
1 parent d7215e5 commit 48eec94
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions packages/marketplace/test/exchange/Exchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ describe('Exchange.sol', function () {
0,
0
);
let tx = await ExchangeContractAsUser.matchOrders([
const tx = await ExchangeContractAsUser.matchOrders([
{
orderLeft: left1,
signatureLeft: await signOrder(left1, maker, OrderValidatorAsAdmin),
Expand All @@ -1712,7 +1712,7 @@ describe('Exchange.sol', function () {
},
]);

let receipt = await tx.wait();
const receipt = await tx.wait();
console.log('Gas used for 2 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
Expand Down Expand Up @@ -1758,9 +1758,9 @@ describe('Exchange.sol', function () {

const takerAsset = await AssetERC20(ERC20Contract, totalPayment / 3);

let leftOrders = [];
const leftOrders = [];
for (let i = 0; i < 3; i++) {
let leftorder = await OrderDefault(
const leftorder = await OrderDefault(
maker,
await AssetERC721(ERC721Contract, i),
ZeroAddress,
Expand All @@ -1772,9 +1772,9 @@ describe('Exchange.sol', function () {
leftOrders.push(leftorder);
}

let rightOrders = [];
const rightOrders = [];
for (let i = 0; i < 3; i++) {
let rightorder = {
const rightorder = {
orderLeft: leftOrders[i],
signatureLeft: await signOrder(
leftOrders[i],
Expand All @@ -1787,9 +1787,9 @@ describe('Exchange.sol', function () {
rightOrders.push(rightorder);
}

let tx = await ExchangeContractAsUser.matchOrders(rightOrders);
const tx = await ExchangeContractAsUser.matchOrders(rightOrders);

let receipt = await tx.wait();
const receipt = await tx.wait();
console.log('Gas used for 3 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
Expand Down Expand Up @@ -1835,9 +1835,9 @@ describe('Exchange.sol', function () {

const takerAsset = await AssetERC20(ERC20Contract, totalPayment / 20);

let leftOrders = [];
const leftOrders = [];
for (let i = 0; i < 20; i++) {
let leftorder = await OrderDefault(
const leftorder = await OrderDefault(
maker,
await AssetERC721(ERC721Contract, i),
ZeroAddress,
Expand All @@ -1849,9 +1849,9 @@ describe('Exchange.sol', function () {
leftOrders.push(leftorder);
}

let rightOrders = [];
const rightOrders = [];
for (let i = 0; i < 20; i++) {
let rightorder = {
const rightorder = {
orderLeft: leftOrders[i],
signatureLeft: await signOrder(
leftOrders[i],
Expand All @@ -1864,9 +1864,9 @@ describe('Exchange.sol', function () {
rightOrders.push(rightorder);
}

let tx = await ExchangeContractAsUser.matchOrders(rightOrders);
const tx = await ExchangeContractAsUser.matchOrders(rightOrders);

let receipt = await tx.wait();
const receipt = await tx.wait();
console.log('Gas used for 20 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
Expand Down Expand Up @@ -1913,9 +1913,9 @@ describe('Exchange.sol', function () {

const takerAsset = await AssetERC20(ERC20Contract, totalPayment / 100);

let leftOrders = [];
const leftOrders = [];
for (let i = 0; i < 100; i++) {
let leftorder = await OrderDefault(
const leftorder = await OrderDefault(
maker,
await AssetERC721(ERC721Contract, i),
ZeroAddress,
Expand All @@ -1927,9 +1927,9 @@ describe('Exchange.sol', function () {
leftOrders.push(leftorder);
}

let rightOrders = [];
const rightOrders = [];
for (let i = 0; i < 100; i++) {
let rightorder = {
const rightorder = {
orderLeft: leftOrders[i],
signatureLeft: await signOrder(
leftOrders[i],
Expand All @@ -1942,9 +1942,9 @@ describe('Exchange.sol', function () {
rightOrders.push(rightorder);
}

let tx = await ExchangeContractAsUser.matchOrders(rightOrders);
const tx = await ExchangeContractAsUser.matchOrders(rightOrders);

let receipt = await tx.wait();
const receipt = await tx.wait();
console.log('Gas used for 100 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
Expand Down Expand Up @@ -1990,9 +1990,9 @@ describe('Exchange.sol', function () {

const takerAsset = await AssetERC20(ERC20Contract, totalPayment / 150);

let leftOrders = [];
const leftOrders = [];
for (let i = 0; i < 150; i++) {
let leftorder = await OrderDefault(
const leftorder = await OrderDefault(
maker,
await AssetERC721(ERC721Contract, i),
ZeroAddress,
Expand All @@ -2004,9 +2004,9 @@ describe('Exchange.sol', function () {
leftOrders.push(leftorder);
}

let rightOrders = [];
const rightOrders = [];
for (let i = 0; i < 150; i++) {
let rightorder = {
const rightorder = {
orderLeft: leftOrders[i],
signatureLeft: await signOrder(
leftOrders[i],
Expand All @@ -2019,9 +2019,9 @@ describe('Exchange.sol', function () {
rightOrders.push(rightorder);
}

let tx = await ExchangeContractAsUser.matchOrders(rightOrders);
const tx = await ExchangeContractAsUser.matchOrders(rightOrders);

let receipt = await tx.wait();
const receipt = await tx.wait();
console.log('Gas used for 150 tokens: ' + receipt.gasUsed);

expect(await ERC20Contract.balanceOf(taker)).to.be.equal(0);
Expand Down

1 comment on commit 48eec94

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

87.07%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   Exchange.sol79.71%70%87.50%86.96%174, 63, 79, 89, 89, 89, 89–90, 90, 90–91, 98
   ExchangeCore.sol84.81%61.54%100%95.45%118–119, 119, 119, 122, 188, 190, 194, 215–216, 64, 94
   OrderValidator.sol89.29%84.62%100%92%41, 71–72, 72, 72, 76
   WhiteList.sol97.67%93.75%100%100%63
packages/marketplace/contracts/exchange/libraries
   LibFill.sol60.87%33.33%75%69.23%32–33, 58, 68–69, 69, 69–70
   LibMath.sol27.50%18.75%50%30%100–103, 17–18, 33–34, 50, 50, 50–51, 72, 72, 72–73, 75, 88, 88, 88–89, 93, 93, 93, 93, 93, 97
packages/marketplace/contracts/interfaces
   IOrderValidator.sol100%100%100%100%
   IRoyaltiesProvider.sol100%100%100%100%
   IWhiteList.sol100%100%100%100%
packages/marketplace/contracts/lib-asset
   LibAsset.sol100%100%100%100%
packages/marketplace/contracts/lib-bp
   BpLibrary.sol100%100%100%100%
packages/marketplace/contracts/lib-order
   LibOrder.sol73.33%50%100%100%64, 64, 66, 66
packages/marketplace/contracts/lib-part
   LibPart.sol0%100%0%0%21
packages/marketplace/contracts/royalties
   IERC2981.sol100%100%100%100%
   LibRoyalties2981.sol78.57%50%100%88.89%19–20, 23
packages/marketplace/contracts/royalties-registry
   IMultiRoyaltyRecipients.sol100%100%100%100%
   RoyaltiesRegistry.sol90.40%85.29%100%90.79%166–167, 170–171, 212, 216, 247, 250, 256, 259, 276, 60
packages/marketplace/contracts/transfer-manager
   TransferExecutor.sol90.48%75%100%100%24, 30
   TransferManager.sol81.65%68.97%100%87.50%137, 190, 199, 206–207, 207, 207–208, 212, 220, 227–228, 252, 269, 273–275, 275, 275–277, 282–283, 306, 310–311, 62, 82–83
packages/marketplace/contracts/transfer-manager/interfaces
   IRoyaltyUGC.sol100%100%100%100%
   ITransferExecutor.sol100%100%100%100%
   ITransferManager.sol100%100%100%100%

Please sign in to comment.