This article applies to:
- BNB Smart Chain
Hardhat can run a local simulated EVM node based on EthereumJS. See also Hardhat Network.
For testing purposes, you can connect to the local Hardhat network in MetaMask. This is especially useful when you are testing with a forked network. See also Forking EVM-compatible mainnet with Hardhat.
Run a Hardhat network fork
See Forking EVM-compatible mainnet with Hardhat.
Connect to the Hardhat network fork in MetaMask
1. Open your MetaMask and click the network selector:
2. In the network selector, click Custom RPC:
3. Enter the following:
- New RPC URL: http://127.0.0.1:8545/
- ChainID: 31337
4. Click Save.
Article is closed for comments.