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

[Optimism] Hardhat Config for running a Hardhat Node

Notifications You must be signed in to change notification settings

ethereum-optimism/hardhat

Repository files navigation

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

About

[Optimism] Hardhat Config for running a Hardhat Node

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published