Ganache is a personal blockchain for rapid Ethereum and Corda distributed application development. Ganache can be used for the entire development cycle. enabling you to develop, deploy, and test your dApps in a safe and deterministic environment.
Read more about in doc.
Complete the Ganache Quick Start before move on.
- After installed ganache, create a new ethereum workspace.
- On the server tab, change the port number to
8545
.
this step is important to run the deploy script successfully.
- On Ganache Home, choose one wallet and copy the private key.
- Go to Metamask, click on
Import account
and fill in the Private Key.
- Then click on
Add network
and fill in with ganache info.
Don't forget to update your .ENV file with ganache info.
# .env
# Create a new infura provider (or anyother web3 provider) and add the id here
NEXT_PUBLIC_WEB3_CONNECTION=HTTP://localhost:8545
# MetaMask Network Configs
NEXT_PUBLIC_NATIVE_TOKEN_NAME=ETH
NEXT_PUBLIC_NEEDS_CHAIN_ID=1337
NEXT_PUBLIC_NEEDS_CHAIN_NAME=localhost
NEXT_PUBLIC_BLOCKSCAN_LINK=