# MetaMask

Connect your Metamask wallet with Haqq

The MetaMask (opens new window) browser extension is a wallet for accessing Ethereum-enabled applications and managing user identities. It can be used to connect to Haqq through the official testnet or via a locally-running Haqq node.

If you are planning on developing on Haqq locally and you haven’t already set up your own local node, refer to the quickstart tutorial, or follow the instructions in the GitHub repository (opens new window).

# Adding a New Network

Open the MetaMask extension on your browser, you may have to log in to your MetaMask account if you are not already. Then click the top right circle and go to Settings > Networks > Add Network and fill the form as shown below.

You can also lookup the EIP155 (opens new window) Chain ID by referring to chainlist.org (opens new window). Alternatively, to get the full Chain ID from Genesis, check the Chain ID documentation page.

metamask networks settings

Here is the list of fields that you can use to paste on Metamask:

# Import Account to Metamask

# Manual Import

Close the Settings, go to My Accounts (top right circle) and select Import Account. You should see an image like the following one:

metamask manual import account page

Now you can export your private key from the terminal using the following command. Again, make sure to replace mykey with the name of the key that you want to export and use the correct keyring-backend:

Copy haqqd keys unsafe-export-eth-key mykey --keyring-backend test

Go back to the browser and select the Private Key option. Then paste the private key exported from the unsafe-export-eth-key command.

Your account balance should show up as 1 ISLM and do transfers as usual.

If it takes some time to load the balance of the account, change the network to Main Ethereum Network (or any other than Localhost 8545 or Haqq) and then switch back to Haqq.

# Reset Account

If you used your Metamask account for a legacy testnet/mainnet upgrade, you will need to reset your account in order to use it with the new network. This will clear your account's transaction history, but it won't change the balances in your accounts or require you to re-enter your Secret Recovery Phrase.

Make sure you download your account state to persist public account addresses and transactions before clearing your wallet accounts.

Go to Settings > Advanced and click the Reset Account button as shown below:

Metamask Account Reset

# Download Account State

To see your Metamask logs, click the top right circle and go to Settings > Advanced > State Logs. If you search through the JSON file for the account address you'll find the transaction history.