Skip to content

Hardhat Fork of Mainnet for testing an account with Chess Pieces

Notifications You must be signed in to change notification settings

coin-artist-project/chess-hardhat-fork

Repository files navigation

Hardhat Fork for Testing Chess Pieces

Installing

  1. Download this repo: git clone https://github.com/coin-artist-project/chess-hardhat-fork
  2. Enter the directory: cd ./chess-hardhat-fork
  3. Install the dependencies: npm install

Set the config

  1. Copy .env.SAMPLE into .env and add your Alchemy API key (can get a free one at alchemyapi.io)
  2. Open scripts/send-chess-pieces.js and update the variable SEND_TO_DEST_ADDRESS to point to your Metamask address

Running

  1. Open a second terminal window
  2. In the first terminal window, start up a local Ethereum fork of mainnet: npm run fork
  3. In the second window, transfer chess pieces to you (fork must be running, takes around 5-10 seconds to finish): npm run sendBatchItems

Using in Metamask

  1. Add the hardhat local configuration to your Networks in Metamask
  2. Configuration:
    • Network Name: Hardhat Local
    • RPC URL: http://127.0.0.1:8545
    • Chain ID: 31337
    • Currency Symbol: ETH

Metamask instructions image

About

Hardhat Fork of Mainnet for testing an account with Chess Pieces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published