brock-ff / hardhat-mainnet-testbed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hardhat-mainnet-testbed

Clones the Ethereum mainnet starting at a specific block. Allows for Metamask to be used. Runs on http://localhost:8545.

Get started

First, install dependencies.

npm install

Next, copy .env.example into a new file .env.

cp .env.example .env
vim .env

Edit the variable(s) to use your own parameters.

The following script runs the accounts task from hardhat.config.js and starts a local node that emulates Ethereum mainnet.

./run.sh

You can now make transactions as if you were on mainnet. If you would like to reset the chain (erase your changes), just stop the node (CTRL-C or Cmd-C) and re-run ./run.sh.

About


Languages

Language:JavaScript 87.8%Language:Solidity 9.0%Language:Shell 3.2%