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 12:25:00 -06:00 committed by GitHub
parent 4b2fc07ca9
commit 08e91c2443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1082 additions and 2029 deletions

3103
package-lock.json generated

File diff suppressed because it is too large Load Diff

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",

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])
}