chore(hardhat): bumping hardhat to v2.24.2 (#245)

* bumping hardhat to v2.24.2

* Ensure to get the next block timestamp

---------

Co-authored-by: Arnaud <arnaud@status.im>
This commit is contained in:
Dmitriy Ryajov
2025-06-09 11:25:00 -07:00
committed by GitHub
co-authored by Arnaud
parent 4b2fc07ca9
commit 08e91c2443
3 changed files with 1082 additions and 2029 deletions
+1076 -2027
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -22,7 +22,7 @@
"chai": "^4.3.7",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.7.2",
"hardhat": "^2.17.1",
"hardhat": "^2.24.2",
"hardhat-deploy": "^0.11.34",
"hardhat-deploy-ethers": "^0.3.0-beta.13",
"prettier": "^2.8.2",
+5 -1
View File
@@ -12,7 +12,11 @@ async function snapshot() {
async function revert() {
const { id, time, automine } = snapshots.pop()
await ethers.provider.send("evm_revert", [id])
await ethers.provider.send("evm_setNextBlockTimestamp", [time])
const current = await currentTime()
const nextTime = Math.max(time + 1, current + 1)
await ethers.provider.send("evm_setNextBlockTimestamp", [nextTime])
await ethers.provider.send("evm_setAutomine", [automine])
}