Quick start

Update for Shagnhai EVM features

1. PUSH0 opcode

You can use shanghai evm version in your project.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
contract MetisShanghaiUpgradeExample {
    uint256 public num;
    function push0(uint256 _n) public {
        num = _n;
    }
}

2. More user-friendly error from the rpc

The RPC can return encoded custom errors and solidity panic errors

Custom errors

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
error MyError();
contract MetisShanghaiUpgradeExample {
    function customError() public pure {
        revert MyError();
    }
}
curl https://l2rpc.devnet.metisdevops.link -X POST -H "Content-Type: application/json" \
  --data '{"method":"eth_call","params":[{"to":"0x2e07967571dB8896178A65039b4Dd13Be354B002","input":"0xdda3a7bd"}, "latest"],"id":1,"jsonrpc":"2.0"}'

The error data 0xdd6c951c is for the custom error MyError

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": { "code": 3, "message": "execution reverted", "data": "0xdd6c951c" }
}

Solidity panic errors

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
contract MetisShanghaiUpgradeExample {
    function panicError(uint256 _x) public pure returns (uint256){
        return _x / 0;
    }
}
curl https://l2rpc.devnet.metisdevops.link -X POST -H "Content-Type: application/json" \
  --data '{"method":"eth_call","params":[{"to":"0x2e07967571dB8896178A65039b4Dd13Be354B002","input":"0x67c9d7930000000000000000000000000000000000000000000000000000000000000001"}, "latest"],"id":1,"jsonrpc":"2.0"}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": 3,
    "message": "execution reverted: division or modulo by zero",
    "data": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012"
  }
}
Basic infoMainnetTestnet

Add network to your wallet

Solidity version

0.8.26

Same as mainnet

RPC

https://andromeda.metis.io/?owner=1088

https://sepolia.metisdevops.link

Fork of EVM

Berlin

Same as mainnet

Unsupported EIPs

EIPs from Shanghai update are not supported for now (check the notice at the top)

Also 1559, 4337 arent supported.

Same as mainnet

Unsupported infra

Same as mainnet

Gas fee formula

50 / METIS token price (in gwei)

Same as mainnet

Gas limit

1.1bn

Same as mainnet

Faucet for test tokens

Nope

Canonical contract addresses of tokens

TokenAddressDecimals

METIS

0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000

18

m.USDC

0xEA32A96608495e54156Ae48931A7c20f0dcc1a21

6

m.USDT

0xbB06DCA3AE6887fAbF931640f67cab3e3a16F4dC

6

wETH

0x420000000000000000000000000000000000000A

18

wMETIS

0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481

18

m.wBTC

0x433E43047B95cB83517abd7c9978Bdf7005E9938

8

Last updated