Preparation of (virtually) Forking the Ethereum Network

Published by Mario Oettler on

Get Access to an Archive Node

As we need access to an archive node, you can get a free account with alchemy:

Set Up MetaMask

This is only for demonstration purposes. Create two Goerli testnet accounts in MetaMask and get some Goerli Test-Ether.

Set Up Hardhat

You need to install node.js first. Follow the instructions here to install it:

In case you want to dive deeper into hardhat, here is the hardhat documentation:

Open your terminal, create a folder called hardhatTest, and navigate to that folder.

Install hardhat via

npm install --save-dev hardhat

Install the hardhat toolbox via

npm install @nomicfoundation/hardhat-toolbox

Run hardhat via

npx hardhat

Choose Create a JavaScript Project.

Screen you will se when starting Hardhat for the first time.

This walks you through some configuration steps. You can check all of them with yes. This installs the dependencies waffle and ethers. Particularly ethers is important for us. Of course, you could also create an empty hardhat.config.js and install all dependencies manually, if you choose this option. But we take the convenient way.