Skip to Content
Courses

Connect with MetaMask

What We Do

In this section we want to connect our React App with MetaMask and use MetaMask as a Keystore to sign transactions. It will also be a proxy to the correct blockchain.

Steps to follow

First, connect with MetaMask to the right network:

ethereum-blockchain-developer-image

When we migrate the smart contracts with Truffle Developer console, then the first account in the truffle developer console is the ā€œownerā€. So, either we disable MetaMask in the Browser to interact with the app or we add in the private key from truffle developer console to MetaMask.

In the Terminal/Powershell where Truffle Developer Console is running scroll to the private keys on top:

ethereum-blockchain-developer-image

Copy the Private Key and add it into MetaMask:

ethereum-blockchain-developer-image

ethereum-blockchain-developer-image

Then your new Account should appear here with ~100 Ether in it.

Now let’s add a new Item to our Smart Contract. You should be presented with the popup to send the message to an end-user.

ethereum-blockchain-developer-image

Last updated on