From 34c4122013ee185f2597a994f021fa7c937ae612 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 19 Jan 2023 09:48:53 -0330 Subject: [PATCH] Update forking-mainnet-for-testing.md (#16235) * Update forking-mainnet-for-testing.md Add missing important piece of documentation * Update docs/forking-mainnet-for-testing.md Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> * Update docs/forking-mainnet-for-testing.md Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> * Update for yarn 3 Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> --- docs/forking-mainnet-for-testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/forking-mainnet-for-testing.md b/docs/forking-mainnet-for-testing.md index b6db1e18f..b08a50f8f 100644 --- a/docs/forking-mainnet-for-testing.md +++ b/docs/forking-mainnet-for-testing.md @@ -3,9 +3,9 @@ If you want to test out mainnet functionality without having to actually use mainnet, you can use Ganache's forking feature and then import ganache network and its generated accounts into MetaMask 1. Get your local dev build running and have MetaMask open in your browser -2. Run `$(yarn bin)/ganache --fork https://mainnet.infura.io/v3/INFURA_PROJECT_ID` with `INFURA_PROJECT_ID` replaced by your own infura project id +2. Run `$(yarn bin ganache) --fork https://mainnet.infura.io/v3/INFURA_PROJECT_ID --chain.chainId 1` with `INFURA_PROJECT_ID` replaced by your own Infura project id 3. Ganache will output a list of account addresses, private keys and an "Mnemonic" (aka SRP, aka Secret Recovery Phrase) 4. Import either the private keys or the SRP into MetaMask 5. Add the ganache network as a custom network in MetaMask. The "New RPC URL" will need to be http://127.0.0.1:8545, set the Chain Id as 1, and the currency symbol to ETH -You should now be able to use MetaMask, and many dapps, as if you were using mainnet. Your accounts should have 1000 ETH which you can use on this simulated local fork. Note that after significant time ellapses since when you forked mainnet (i.e. ran step 2 above), interactions with many dapps and smart contracts may begin to have inconsistent behaviour or failures. \ No newline at end of file +You should now be able to use MetaMask, and many dapps, as if you were using mainnet. Your accounts should each have 1000 ETH which you can use on this simulated local fork. Note that after significant time elapses since when you forked mainnet (i.e. ran step 2 above), interactions with many dapps and smart contracts may begin to have inconsistent behavior or failures.