Created
July 7, 2022 16:30
-
-
Save alcuadrado/41f0b3c0a1665dc75fc975cfe1658b58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mine 100 blocks | |
await network.provider.send("hardhat_mine", ["0x64"]); | |
// mine a new block one hour in the future | |
await network.provider.send( | |
"evm_increaseTime", | |
"0xe10" | |
); | |
await network.provider.send("hardhat_mine"); | |
// take and revert a snapshot | |
const snapshotId = await network.provider.send("evm_snapshot"); | |
await network.provider.send("evm_revert", [snapshotId]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment