Skip to content

Instantly share code, notes, and snippets.

@donoso-eth
Created June 22, 2022 04:36
Show Gist options
  • Save donoso-eth/148d031bbc57e6a3b6708367a52b0069 to your computer and use it in GitHub Desktop.
Save donoso-eth/148d031bbc57e6a3b6708367a52b0069 to your computer and use it in GitHub Desktop.
//// Mine a block
await hre.network.provider.request({
method: "evm_mine",
params: [],
});
//// Increase block chain Time
await hre.network.provider.request({
method: "evm_increaseTime",
params: [INCREASE_PERIOD_IN_SEC],
});
//// set next block Timestamp
await hre.network.provider.request({
method: "evm_setNextBlockTimestamp",
params: [NEW_TIMESTAMP],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment