Using MetaMask with SKALE via the Custom Networks API

The purpose of this article is to point a developer to the documentation and code required to utilize MetaMask with SKALE.

The impetus for this article was,prompted by a great conversation with Christine Perry of SKALE Labs on Build with ConsenSys. As a reminder, a Layer 2 Solution can be generally thought of as protocols that optimize transactions that occur on mainnet Ethereum - which is the Layer 1. For example, the optimization may be increasing the speed of transactions, or reducing the gas cost. Each Layer 2 Solution may try to optimize a different parameter, and may use unique methods to do so. The SKALE Network specifically optimizes for [high-throughput, low-cost, low-latency transactions via sidechains] ( that are compatible with Ethereum. A deeper dive into Layer 2 Solutions can be found here.

If you are looking to integrate your dApp with SKALE using MetaMask, SKALE provides succinct documentation here on the code required to do that.

A few points to note. You will have to have the proper dependencies installed, in this case NodeJS, node package manager (npm), and specific to this tutorial, the JavaScript library web3. If you are new to dApp development, I suggest you go through the following tutorials, which will help you better understand how to setup your developer environment and tooling:

Ethereum Onboarding Step 2
Ethereum Onboarding Step 3

The supplied SKALE documentation also has a code sandbox, if you want to see a live example of the code working. The code is for a React application that, when the button is clicked, will prompt your MetaMask to connect to the SKALE network, utilizing the Custom Networks API.

If you are looking for further reference articles, check out the following: