I am making a Voting Dapp, learning from the tutorial given here

In Which all the transactions are happening from the single account but as ganache given 10 accounts, I want to change the account and perform the transaction.

Is there any way I can use MetaMask to do it ?


2 Answers 2

  1. Go To Profile Section -> Import Account
  2. From Ganache-Cli or Ganache Gui Copy Private KEy Of any One Account and Paste In Private Key Option menu
  3. Hit Enter And Boom You Are Done (Check You are Running On localhost :8545 if using ganache-cli and if using gui the


  • Configure your DApp to work with MetaMask
  • Choose custom RPC in the list of blockchains in MetaMask
  • Enter RPC URL of ganache-cli. By default Ganache-cli is started at http://localhost:8545
  • Import all unlocked accounts from Ganache to MetaMask. You can see private keys of those accounts in the console.

That's it. You are connected to Ganache through Metamask. And you control Ganache accounts from MetaMask.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.