Search…
⌃K
🍫

Setting up Ganache with Metamask

Having trouble getting test ETH? Might be time to try Ganache.
Ganache is a development tool in the Truffle Suite and is used for setting up a personal Ethereum Blockchain to deploy contracts, develop your applications, and run tests. MetaMask is a software cryptocurrency wallet used to interact with the Ethereum blockchain. Getting test ETH is a nightmare these days so we recommend using local network for development. In a local network, there is no ETH limitation, and you don't have to wait for transactions to complete. In this tutorial we will install and setup Ganache and import your Ganache account to Metamask. When you are done you can:
  • Sign Ganache transactions from Metamask
  • Check your (Ganache) assets in Metamask
  • Check every (Ganache) transaction which affected your wallet in Metamask

Steps

  1. 1.
    Download Ganache from: https://trufflesuite.com/ganache/
  2. 2.
    Install Ganache
  3. 3.
    Run Ganache
  4. 4.
    Select QUICKSTART ETHEREUM as workspace
  5. 5.
    Goto setting
  6. 6.
    Select SERVER tab
  7. 7.
    Select 127.0.0.1 as HOSTNAME
  8. 8.
    Switch off AUTOMINE toggle
  9. 9.
    Set MINING BLOCK TIME to 10
  10. 10.
    Click on SAVE AND RESTART
  11. 11.
    Setting up ganache network in Metamask
    1. 1.
      Open Metamask
    2. 2.
      Select Settings
    3. 3.
      Select Networks
    4. 4.
      Click on Add Network
      1. 1.
        Set the Network Name e.g ganache
      2. 2.
        The RPC URL value comes from ganache
        i.
      3. 3.
        Set the Chain ID
        1. 1.
          Type e.g 1 and a hint appears about the exact Chain ID so use that.
        2. 2.
          Type the suggested chain id which is 1337.
      4. 4.
        Set the Currency symbol
      5. 5.
        Click on Save
    5. 5.
      Open My accounts
    6. 6.
      Import your Ganache account
      1. 1.
        Click on Show keys of the account to import in Ganache
      2. 2.
        Copy the PRIVATE KEY
      3. 3.
        Open Metamask
      4. 4.
        Open My Accounts
      5. 5.
        Select Import Account
      6. 6.
        Enter your private key and import