METAL L2 Mainnet
Getting Started: Metal L2

Getting Started Developing for Metal L2

This guide explains the basics of Metal L2 development. Metal L2 is EVM equivalent (opens in a new tab), meaning we run a slightly modified version of the same geth you run on mainnet. Therefore, the differences between Metal L2 development and Ethereum development are minor. But a few differences do exist.

Metal L2 and Metal L2 Testnet Endpoint URLs

To access any Ethereum type network you need an endpoint. These providers support our networks.

Network Choice

For development purposes we recommend you use either a local development node or Metal L2 Testnet (opens in a new tab). That way you don't need to spend real money. If you need ETH on Metal L2 Testnet for testing purposes, you can use this faucet (opens in a new tab).

Interacting with Contracts on Metal L2 or Metal L2 Testnet

We have Hardhat's Greeter contract on Metal L2 Testnet at address 0xacc0cAB1F524F34012fb766f582e3AB2049f2bC5 (opens in a new tab). You can verify your development stack configuration by interacting with it.

Development Stacks

As you can see in the different development stacks below, the way you deploy contracts and interact with them on Metal L2 or Metal L2 Testnet is almost identical to the way you do it with L1 Ethereum. The most visible difference is that you have to specify a different endpoint (of course). The list of other differences is here.

Best Practices

Use Provided EVM

It is best to start development with the EVM provided by the development stack. Not only is it faster, but such EVMs often have extra features, such as the ability to log messages from Solidity (opens in a new tab) or a graphical user interface (opens in a new tab).

Debug Before Deploying

After you are done with that development, debug your decentralized application using either a development node or the Sepolia test network. This lets you debug parts that are Metal L2 specific such as calls to bridges to transfer ETH or tokens between layers.

Only when you have a version that works well on a test network should you deploy to the production network, where every transaction has a cost.

Contract Source Verification

You don't have to upload your source code to block explorers, but it is a good idea. On the test network, it lets you issue queries and transactions from the explorer's user interface. On the production network, it lets users know exactly what your contract does, which is conducive to trust.

You can find the explorer API for testnet here: https://testnet.explorer.metall2.com/api-docs (opens in a new tab)