0

The ganache local node implements a few debugging/test methods that the hardhat local node does not such as the following:

  • evm_mineBlockNumber, params: [blockNumber]
  • evm_setTime, params: [unixSeconds]
  • evm_freezeTime, params: [seconds]
  • miner_start
  • miner_stop

How can the behaviour of these methods be replicated in hardhat?

1 Answer 1

0

You can take a look at this hardhat doc to find some of the corresponding methods and their helpers here:

https://hardhat.org/hardhat-network/docs/reference

https://hardhat.org/hardhat-network-helpers/docs/reference

1
  • Thanks for this, though I couldn't find any equivalents to evm_freezeTime, miner_start and miner_stop. evm_setTime can be emulated using increaseTo(newTimestamp), evm_mineBlockNumber can be using mineUpTo(blockNumber);
    – MShakeG
    Oct 14, 2022 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.