diff --git a/package-lock.json b/package-lock.json index 702aea9..1b83a12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 062aa3b..31ca3b9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/Marketplace.test.js b/test/Marketplace.test.js index 073dcd4..b93b21a 100644 --- a/test/Marketplace.test.js +++ b/test/Marketplace.test.js @@ -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 () { diff --git a/test/Vault.tests.js b/test/Vault.tests.js index dd9561e..807a29f 100644 --- a/test/Vault.tests.js +++ b/test/Vault.tests.js @@ -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 () {