Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Latest commit

 

History

History
30 lines (22 loc) · 615 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 615 Bytes

Hardhat Node

Hardhat config for running a hardhat node.

Usage

$ git clone https://github.com/ethereum-optimism/hardhat.git
$ cd hardhat
$ npm install
$ npx hardhat node

A very useful feature of Hardhat is forking from mainnet. This can be done with the command:

$ npx hardhat node --hostname 0.0.0.0 --fork <web 3 url>

Note that an archive node is required for this. Alchemy provides a free tier with archive nodes.

The mine.sh script calls evm_mine which will mine a block. To automine on an interval:

INTERVAL=5
while true; do ./mine.sh; sleep $INTERVAL; done