mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-04 22:33:11 +00:00
Update prettier to the last version
This commit is contained in:
parent
de58989edf
commit
7f42ec577c
46
package-lock.json
generated
46
package-lock.json
generated
@ -14,7 +14,7 @@
|
||||
"chai": "^4.3.7",
|
||||
"ethers": "6.14.3",
|
||||
"hardhat": "^2.24.2",
|
||||
"prettier": "^2.8.2",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-solidity": "^1.4.2",
|
||||
"solhint": "^5.0.5"
|
||||
}
|
||||
@ -13370,15 +13370,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
|
||||
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
@ -14298,6 +14298,23 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/solhint/node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/solhint/node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
@ -15106,6 +15123,23 @@
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/typechain/node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/typechain/node_modules/ts-essentials": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz",
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
"fuzz": "hardhat compile && fuzzing/fuzz.sh",
|
||||
"start": "hardhat node",
|
||||
"compile": "hardhat compile",
|
||||
"format": "prettier --write contracts/*.sol contracts/**/*.sol test/**/*.js",
|
||||
"format:check": "prettier --check contracts/*.sol contracts/**/*.sol test/**/*.js",
|
||||
"format": "prettier --write test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol ",
|
||||
"format:check": "prettier --check test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol",
|
||||
"lint": "solhint contracts/**.sol",
|
||||
"deploy": "npx hardhat run scripts/deploy.js",
|
||||
"verify": "npm run verify:marketplace && npm run verify:state_changes",
|
||||
@ -24,7 +24,7 @@
|
||||
"chai": "^4.3.7",
|
||||
"ethers": "6.14.3",
|
||||
"hardhat": "^2.24.2",
|
||||
"prettier": "^2.8.2",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-solidity": "^1.4.2",
|
||||
"solhint": "^5.0.5"
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ describe("Periods", function () {
|
||||
.to.have.property("message")
|
||||
.that.contains(
|
||||
expectedError,
|
||||
`Expected error ${expectedError}, but got ${error.message}`
|
||||
`Expected error ${expectedError}, but got ${error.message}`,
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@ -212,14 +212,14 @@ describe("Proofs", function () {
|
||||
it("fails proof submission when proof is incorrect", async function () {
|
||||
let invalid = exampleProof()
|
||||
await expect(
|
||||
proofs.proofReceived(slotId, invalid, pubSignals)
|
||||
proofs.proofReceived(slotId, invalid, pubSignals),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_InvalidProof")
|
||||
})
|
||||
|
||||
it("fails proof submission when public input is incorrect", async function () {
|
||||
let invalid = [1, 2, 3]
|
||||
await expect(
|
||||
proofs.proofReceived(slotId, proof, invalid)
|
||||
proofs.proofReceived(slotId, proof, invalid),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_InvalidProof")
|
||||
})
|
||||
|
||||
@ -232,7 +232,7 @@ describe("Proofs", function () {
|
||||
it("fails proof submission when already submitted", async function () {
|
||||
await proofs.proofReceived(slotId, proof, pubSignals)
|
||||
await expect(
|
||||
proofs.proofReceived(slotId, proof, pubSignals)
|
||||
proofs.proofReceived(slotId, proof, pubSignals),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_ProofAlreadySubmitted")
|
||||
})
|
||||
|
||||
@ -249,7 +249,7 @@ describe("Proofs", function () {
|
||||
await waitUntilProofIsRequired(slotId)
|
||||
let currentPeriod = periodOf(await currentTime())
|
||||
await expect(
|
||||
proofs.markProofAsMissing(slotId, currentPeriod)
|
||||
proofs.markProofAsMissing(slotId, currentPeriod),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_PeriodNotEnded")
|
||||
})
|
||||
|
||||
@ -258,7 +258,7 @@ describe("Proofs", function () {
|
||||
let currentPeriod = periodOf(await currentTime())
|
||||
await advanceTimeTo(periodEnd(currentPeriod) + timeout + 1)
|
||||
await expect(
|
||||
proofs.markProofAsMissing(slotId, currentPeriod)
|
||||
proofs.markProofAsMissing(slotId, currentPeriod),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_ValidationTimedOut")
|
||||
})
|
||||
|
||||
@ -268,7 +268,7 @@ describe("Proofs", function () {
|
||||
await proofs.proofReceived(slotId, proof, pubSignals)
|
||||
await advanceTimeTo(periodEnd(receivedPeriod) + 1)
|
||||
await expect(
|
||||
proofs.markProofAsMissing(slotId, receivedPeriod)
|
||||
proofs.markProofAsMissing(slotId, receivedPeriod),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_ProofNotMissing")
|
||||
})
|
||||
|
||||
@ -279,7 +279,7 @@ describe("Proofs", function () {
|
||||
let currentPeriod = periodOf(await currentTime())
|
||||
await advanceTimeTo(periodEnd(currentPeriod) + 1)
|
||||
await expect(
|
||||
proofs.markProofAsMissing(slotId, currentPeriod)
|
||||
proofs.markProofAsMissing(slotId, currentPeriod),
|
||||
).to.be.revertedWithCustomError(proofs, "Proofs_ProofNotRequired")
|
||||
})
|
||||
|
||||
@ -289,10 +289,10 @@ describe("Proofs", function () {
|
||||
await advanceTimeTo(periodEnd(missedPeriod) + 1)
|
||||
await proofs.markProofAsMissing(slotId, missedPeriod)
|
||||
await expect(
|
||||
proofs.markProofAsMissing(slotId, missedPeriod)
|
||||
proofs.markProofAsMissing(slotId, missedPeriod),
|
||||
).to.be.revertedWithCustomError(
|
||||
proofs,
|
||||
"Proofs_ProofAlreadyMarkedMissing"
|
||||
"Proofs_ProofAlreadyMarkedMissing",
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ describe("SlotReservations", function () {
|
||||
configuration: config.reservations,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
reservations = testSlotReservations
|
||||
@ -86,10 +86,10 @@ describe("SlotReservations", function () {
|
||||
it("cannot reserve a slot more than once", async function () {
|
||||
await reservations.reserveSlot(reqId, slotIndex)
|
||||
await expect(
|
||||
reservations.reserveSlot(reqId, slotIndex)
|
||||
reservations.reserveSlot(reqId, slotIndex),
|
||||
).to.be.revertedWithCustomError(
|
||||
reservations,
|
||||
"SlotReservations_ReservationNotAllowed"
|
||||
"SlotReservations_ReservationNotAllowed",
|
||||
)
|
||||
expect(await reservations.length(id)).to.equal(1)
|
||||
})
|
||||
@ -108,10 +108,10 @@ describe("SlotReservations", function () {
|
||||
await reservations.reserveSlot(reqId, slotIndex)
|
||||
switchAccount(provider)
|
||||
await expect(
|
||||
reservations.reserveSlot(reqId, slotIndex)
|
||||
reservations.reserveSlot(reqId, slotIndex),
|
||||
).to.be.revertedWithCustomError(
|
||||
reservations,
|
||||
"SlotReservations_ReservationNotAllowed"
|
||||
"SlotReservations_ReservationNotAllowed",
|
||||
)
|
||||
expect(await reservations.length(id)).to.equal(3)
|
||||
expect(await reservations.contains(id, provider.address)).to.be.false
|
||||
@ -131,10 +131,10 @@ describe("SlotReservations", function () {
|
||||
it("cannot reserve a slot if not free or not in repair", async function () {
|
||||
await reservations.setSlotState(id, SlotState.Filled)
|
||||
await expect(
|
||||
reservations.reserveSlot(reqId, slotIndex)
|
||||
reservations.reserveSlot(reqId, slotIndex),
|
||||
).to.be.revertedWithCustomError(
|
||||
reservations,
|
||||
"SlotReservations_ReservationNotAllowed"
|
||||
"SlotReservations_ReservationNotAllowed",
|
||||
)
|
||||
expect(await reservations.length(id)).to.equal(0)
|
||||
})
|
||||
@ -157,7 +157,7 @@ describe("SlotReservations", function () {
|
||||
it("should not emit an event when reservations are not full", async function () {
|
||||
await expect(reservations.reserveSlot(reqId, slotIndex)).to.not.emit(
|
||||
reservations,
|
||||
"SlotReservationsFull"
|
||||
"SlotReservationsFull",
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@ -22,7 +22,7 @@ async function waitUntilSlotsFilled(contract, request, proof, token, slots) {
|
||||
payouts[slotIndex] = payoutForDuration(
|
||||
request,
|
||||
await currentTime(),
|
||||
requestEnd
|
||||
requestEnd,
|
||||
)
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ async function waitUntilStarted(contract, request, proof, token) {
|
||||
request,
|
||||
proof,
|
||||
token,
|
||||
Array.from({ length: request.ask.slots }, (_, i) => i)
|
||||
Array.from({ length: request.ask.slots }, (_, i) => i),
|
||||
)
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ function patchOverloads(contract) {
|
||||
if (logicalXor(rewardRecipient, collateralRecipient)) {
|
||||
// XOR, if exactly one is truthy
|
||||
throw new Error(
|
||||
"Invalid freeSlot overload, you must specify both `rewardRecipient` and `collateralRecipient` or neither."
|
||||
"Invalid freeSlot overload, you must specify both `rewardRecipient` and `collateralRecipient` or neither.",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -28,21 +28,21 @@ function enableRequestAssertions() {
|
||||
"expected request #{this} to have client #{exp} but got #{act}",
|
||||
"expected request #{this} to not have client #{act}, expected #{exp}",
|
||||
request.client, // expected
|
||||
actual.client // actual
|
||||
actual.client, // actual
|
||||
)
|
||||
this.assert(
|
||||
actual.expiry == request.expiry,
|
||||
"expected request #{this} to have expiry #{exp} but got #{act}",
|
||||
"expected request #{this} to not have expiry #{act}, expected #{exp}",
|
||||
request.expiry, // expected
|
||||
actual.expiry // actual
|
||||
actual.expiry, // actual
|
||||
)
|
||||
this.assert(
|
||||
actual.nonce === request.nonce,
|
||||
"expected request #{this} to have nonce #{exp} but got #{act}",
|
||||
"expected request #{this} to not have nonce #{act}, expected #{exp}",
|
||||
request.nonce, // expected
|
||||
actual.nonce // actual
|
||||
actual.nonce, // actual
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user