- Download this repo:
git clone https://github.com/coin-artist-project/chess-hardhat-fork
- Enter the directory:
cd ./chess-hardhat-fork
- Install the dependencies:
npm install
- Copy
.env.SAMPLE
into.env
and add your Alchemy API key (can get a free one at alchemyapi.io) - Open
scripts/send-chess-pieces.js
and update the variableSEND_TO_DEST_ADDRESS
to point to your Metamask address
- Open a second terminal window
- In the first terminal window, start up a local Ethereum fork of mainnet:
npm run fork
- In the second window, transfer chess pieces to you (fork must be running, takes around 5-10 seconds to finish):
npm run sendBatchItems
- Add the hardhat local configuration to your Networks in Metamask
- Configuration:
- Network Name:
Hardhat Local
- RPC URL:
http://127.0.0.1:8545
- Chain ID:
31337
- Currency Symbol:
ETH
- Network Name: