Skip to content

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:

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:

Copy the Private Key and add it into MetaMask:

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.

Last update: March 28, 2022