update openzeppelin contracts to 5.2.0

This commit is contained in:
Mark Spanbroek 2025-02-12 11:23:02 +01:00
parent 81032965f4
commit 79c127b80e
4 changed files with 13 additions and 11 deletions

14
package-lock.json generated
View File

@ -9,7 +9,7 @@
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@openzeppelin/contracts": "^4.8.0",
"@openzeppelin/contracts": "^5.2.0",
"@stdlib/stats-binomial-test": "^0.0.7",
"chai": "^4.3.7",
"ethereum-waffle": "^3.4.4",
@ -1764,9 +1764,9 @@
}
},
"node_modules/@openzeppelin/contracts": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz",
"integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.2.0.tgz",
"integrity": "sha512-bxjNie5z89W1Ea0NZLZluFh8PrFNn9DH8DQlujEok2yjsOlraUPKID5p1Wk3qdNbf6XkQ1Os2RvfiHrrXLHWKA==",
"dev": true
},
"node_modules/@pnpm/config.env-replace": {
@ -24578,9 +24578,9 @@
}
},
"@openzeppelin/contracts": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz",
"integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.2.0.tgz",
"integrity": "sha512-bxjNie5z89W1Ea0NZLZluFh8PrFNn9DH8DQlujEok2yjsOlraUPKID5p1Wk3qdNbf6XkQ1Os2RvfiHrrXLHWKA==",
"dev": true
},
"@pnpm/config.env-replace": {

View File

@ -17,7 +17,7 @@
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@openzeppelin/contracts": "^4.8.0",
"@openzeppelin/contracts": "^5.2.0",
"@stdlib/stats-binomial-test": "^0.0.7",
"chai": "^4.3.7",
"ethereum-waffle": "^3.4.4",

View File

@ -215,7 +215,7 @@ describe("Marketplace", function () {
let insufficient = maxPrice(request) - 1
await token.approve(marketplace.address, insufficient)
await expect(marketplace.requestStorage(request)).to.be.revertedWith(
"ERC20: insufficient allowance"
"ERC20InsufficientAllowance"
)
})
@ -455,7 +455,7 @@ describe("Marketplace", function () {
await marketplace.reserveSlot(slot.request, slot.index)
await expect(
marketplace.fillSlot(slot.request, slot.index, proof)
).to.be.revertedWith("ERC20: insufficient allowance")
).to.be.revertedWith("ERC20InsufficientAllowance")
})
it("collects only requested collateral and not more", async function () {

View File

@ -134,7 +134,9 @@ describe("Vault", function () {
it("deposit fails when tokens cannot be transferred", async function () {
await token.connect(controller).approve(vault.address, amount - 1)
const depositing = vault.deposit(fund, account.address, amount)
await expect(depositing).to.be.revertedWith("insufficient allowance")
await expect(depositing).to.be.revertedWith(
"ERC20InsufficientAllowance"
)
})
it("adds multiple deposits to the balance", async function () {