Skip to content

Commit

Permalink
feat: enable Hardhat interval mining mode
Browse files Browse the repository at this point in the history
- This change enables interval-mining mode on Hardhat network.
Without this, tx.wait(2) doesn't work(block waiting forever), as Hardhat won't mine new blocks when no new transactions sending.

  Ref: https://hardhat.org/hardhat-network/docs/explanation/mining-modes
  • Loading branch information
keroro520 committed Jul 14, 2022
1 parent c616ee0 commit 219fb5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ module.exports = {
accounts: [`0x${TEST_PK1}`]
},
hardhat: {
hardfork: "berlin"
hardfork: "berlin",
mining: {
auto: true,
interval: 1000
}
}
},
mocha: {
Expand Down

0 comments on commit 219fb5f

Please sign in to comment.