How to connect Ganache with Metamask and deploy Smart contracts on remix without
Set up your development environment with (Metamask + Ganache + Remix) and skip truffle :)
ritesh agrawal

Set up your development environment with (Metamask + Ganache + Remix) and skip truffle :)

Some blockchain beginners are not comfortable with using truffle for deployment of smart contracts , but using remix feels easy for them. Test networks like Ropsten, Rinkeby, etc are somewhat slow when compared with Ganache; Therefore in this article I am going to show you how you can deploy smart contract on remix without truffle and still use Ganache as your test network, just follow along

Connection of Ganache with Metamask :

Download and Install Ganache and Metamask browser extension. Open Ganache , you will find your test accounts and 100 ETH test etheres.

Open Metamask and go to settings -> networks. Click on Add Network.

Give your network name(anything is fine), then for new RPC URL go to ganache , there you can find RPC server url copy it and paste in Metamask. then Chain ID for ganache is 1337. You can give currency symbol as "ETH". Click on save. That's it ! you are connected with Ganache now.

Now you will find a key in front of addresses in Ganache just click on it and copy private key for that account. In metamask click on import account and paste that private key there, this will import Ganache test accounts in Metamask , you will see that 100 ETH are there in your account.


Now open remix

Open you smart contract file and compile it

In deployment section, select Injected Web3 as environment, also keep connected with ganache in metamask, this will ask you to connect with Remix, connect it.

You will see your Ganache (imported account in metamask)account and balance in Account section on Remix. now click on deploy. Metamask popu will occur, confirm it .

That's it ! your contract is deployed on Ganache test network without truffle.


Also you can confirm that transaction is happened or not in Ganache ,

Go to transactions in Ganache you will see the same contract address as in remix.


There are two basic advantages by setting this type of workspace for development

  1. You can test your smart contract on remix itself , as the same contract will be used in dapp front end building, this will also help you find errors very fast.
  2. You don't have to use the public test networks , this will fasten the development.

If you have any doubts , drop a comment below. Thank you.

More by author