Beginner's guide on how to add Klaytn to Metamask

Beginner's guide on how to add Klaytn to Metamask

Learn how to add Klaytn networks, set fixed gas price on Metamask

·

5 min read

Introduction

If you have been building on Ethereum, you would be familiar with the core gateway to bApps - Metamask. Metamask! One of the most commonly used crypto wallets in the emerging decentralized economy helps us explore blockchain applications in seconds. Klaytn is a Layer 1 EVM solution with recent support with metamask thus giving us the liberty to sign and send transactions to the Klaytn Blockchain.

In this tutorial, we are going to look at a step-by-step guide on how to set up a MetaMask wallet. Also, i’ll show you how to add Klaytn networks to Metamask both Cypress and Baobab. Finally, we would be able to set the gas field when making transaction to conform to Klaytn fixed gas price model.

Understanding MetaMask

MetaMask is the most used Web3 browser wallet with over 30 million users worldwide. It was developed by ConsenSys in 2016 to interact with the Ethereum blockchain. As of now, it now meets a range of blockchains that are compatible with EVM such as Klaytn etc.

MetaMask equips you with a key vault, secure login, token wallet, and token exchange—everything you need to manage your digital assets. It provides us the simplest yet most secure way to connect to blockchain-based applications.

This powerful application is available as a browser extension and as a mobile app. Part of the ease of use is that it is supported across different browsers such Chrome, Brave, Edge, Firefox.

How to Set Up a MetaMask Wallet on a Desktop

  • STEP 1

The first step to setting up Metamask is to visit MetaMask website. Here we get to see different browsers and how to install them. For this guide we would be installing Metamask on our Chrome browser. To get it installed, visit this site and click on the "Add to Chrome" button which looks like this below:

addToChrome.png

  • STEP 2

After Clicking the "Add to Chrome" button, it request for it to be added to chrome, it gets downloaded and then opens a "gets started" page like this:

getStarted.png

  • STEP 3

Click on the "Get Started" button which then opens this tab below

newToMM.png

In this tab, we have two choices; the first is “import wallet”, while the second is “create a wallet.”

The first option lets you access an existing cryptocurrency wallet by entering a secret recovery phrase. On the other hand, the second option will allow you to create a new crypto wallet entirely, which suits the purposes of this guide.

  • STEP 4

To create a new account, click on the "Create Account" button which navigates to a new tab to agree to MetaMask condtions, click on the agree button move to create your wallet password as seen below.

MMPassword.png

  • STEP 5

After creating your password, it takes you to the seed-phrase tab. Here you're expected to copy and keep your seed phrase safely.

seedPhrase.png

  • STEP 6

The next step is to confirm your seed phrase as seen below

cSeedPhrase.png

  • STEP 7

After duly following all these steps, a congratulation message is shown and your account is ready

conMM.png

MMAcct.png

Yay! Now that we have our wallet ready, lets's add the Klaytn networks(Cypress and Boabab) so we can interact with the Klaytn blockchain using metamask.

How to add Klaytn Networks to Metamask

Now that the Klaytn network is now officially supported by Metamask, storing and transferring of KLAY with MetaMask is absolutely now possible. Lets add our networks in the following steps

  • STEP 1

Navigate to and click on the "Add Networks" button as seen below:

addNetwork.png

  • STEP 2

After clicking the "Add Networks" button, it brings you to a tab to fill your network details such as Network Name, RPC URL, Chain Id, Currency Symbol and Block Explorer URL. Looks exactly like this:

networkMM.png

  • STEP 3

Fill in your network details accordingly using the following:

A. Cypress

Network Name: Klaytn Mainnet

RPC URL: public-node-api.klaytnapi.com/v1/cypress

Chain ID: 8217

Currency Symbol: KLAY

Block Explorer URL: scope.klaytn.com

B. Baobab

Network Name: Klaytn Baobab

RPC URL: api.baobab.klaytn.net:8651

Chain ID: 1001

Currency Symbol: KLAY

Block Explorer URL: baobab.scope.klaytn.com

Now we have our network details, lets fill it in the fields required as seen below

baobabNet.png

baobabAdded.png

Congratulations, you just added the Klaytn Mainnet (Cypress) to Metamask. As an exercise, you can add the Baobab Network yourself.

How to change gas fees to conform to Klaytn fixed gas price model

In order to sign and send successful transactions on the Klaytn blockchain with Metamask, one needs to put in mind the fixed gas price model. This is important because Klaytn makes use of the fixed gas price model (Baobab 250 ston, Cypress 250 ston). So lets implement this!

Lets perform a simple transaction of sending KLAY to another user on Baobab. In other to do this, we need KLAY in our account. To request for test KLAY, you can visit this site.

After requesting for KLAY, you should have 150 test KLAY. Now lets's perform our simple transaction without setting the gas price. It is expected that the transaction fails with the following error message below:

txError.png

To send some KLAY, click on the send icon as seen below:

sendMM.png

After clicking the send button, you re required to insert the beneficiary address and watch the guide below to set the gas price to conform to Klaytn's fixed gas price model.

ezgif.com-gif-maker.gif

Conclusion

Metamask is a chrome browser extension that helps users access the decentralized web. It is an easy-to-use extension that most people can easily navigate.

This was a very comprehensive guide on installing metamask, adding the Klaytn networks, and adjusting the gas price on Metamask considering Klaytn fixed gas price model.

That would be all for this guide. If you have any questions, suggestions or comments, drop them below, or reach out to me on Twitter

Happy Buidling!!!!