Foundry is a fast and powerful framework for Ethereum development, written in Rust. It’s great for developers who prefer more control and speed in their development workflows.
Install Foundry: Install Foundry by running the following command in your terminal:
Then, initialize Foundry:
Create a Foundry Project: Start a new project:
Configure Foundry for Metis: You will need to edit the foundry.toml
file to include Metis network details:
Compile and Deploy: Compile your contracts:
Deploy using Foundry:
This section is for developers who are ready to deploy smart contracts or decentralized applications on the Metis network. The guides provided will walk you through deploying contracts via different tools like Remix, Hardhat, and Truffle, offering flexibility based on your preferred development environment.
Hardhat is a popular Ethereum development environment that enables you to compile, deploy, test, and debug your smart contracts easily.
Install Hardhat: First, make sure you have Node.js installed. Then, in your project directory, run:
Create a Hardhat Project: Initialize a new Hardhat project:
Choose "Create a basic sample project" and follow the prompts.
Configure Hardhat for Metis: Edit the hardhat.config.js
file to connect to the Metis network (either Andromeda Mainnet or Sepolia Testnet):
Compile and Deploy: Compile your contract:
Deploy it with a simple script:
Once you've connected to Metis and obtained your testnet tokens, you're ready to set up your development environment. Metis supports multiple frameworks for smart contract development, allowing you to choose the one that fits your workflow. Here, we’ll guide you through setting up Hardhat, Truffle, and Foundry for development on the Metis network.
The Metis protocol consists of several contracts that are deployed on some specific addresses. The contracts have been deployed on L2, L1, Andromeda, and Stardust testnet. You can use the etherscan explorer to see full details about deployed contract addresses. The Metis Github page shows all the deployed contract addresses.
Network
Andromeda (Mainnet)
Sepolia (Testnet)
Chain ID
1088
59902
0x595801b85628ec6979C420988b8843A40F850528
0xE0cDbb071144489b52Af578BDdea84dBDFd85576
0x56a76bcC92361f6DF8D75476feD8843EdC70e1C9
0x5435d351e0aCc874579eC67Ba46440ee6AC892b8
0x38473Feb3A6366757A249dB2cA4fBB2C663416B7
0x92F90779986C294A22DC43C8f6aE1F5d8B2728E4
0xA91Ea6F5d1EDA8e6686639d6C88b309cF35D2E57
0x10A493fFAc17DCc6Ea70d8c3BD19160ea0d3822B
0x10739F09f6e62689c0aA8A1878816de9e166d6f9
0x185AB4701DBf521B44838fa72af99880730d5CE6
0x101500214981e7A5Ad2334D8404eaF365C2c3113
0xd41bc137120BFcEd907093741ea402631d7616BE
0x918778e825747a892b17C66fe7D24C618262867d
0xa66Fa1eD0f1C1ee300893B4eb5493FeAD9a7e9c3
0x431e877E216714647a4DCcEFFC03d7B4Fd4B825E
0xFD98b95ad84f459697c29aFA75229e93F6D2B8A2
0xC8953ca384b4AdC8B1b11B030Afe2F05471664b0
0x4fd947DfF05a255F78E355C23c8B2E98bf029126
0x9E2E3be85df5Ca63DE7674BA64ffD564075f3B48
0x8c52c668A23970759F21Cbc274fd63C8e4Bdfd4D
0x4549292213D41CB62E94e7E2DDC4b468a4CDD16d
0xfaAd7fFe832775c66Fb3586f0AF3Ffc09B173ff2
0x9Ed4739afd706122591E75F215208ecF522C0Fd3
0xB2e2060A179e67cA4299Cc79fA337B98791DE069
0x88d98AfC2344F9554478C1CDf8062c7F32145176
0x8bF439ef7167023F009E24b21719Ca5f768Ecb36
0x22796245e27190cAFD7b50a93585f30f60a03f46
Proxy__MVM_CanonicalTransaction
0x6A1DB7d799FBA381F2a518cA859ED30cB8E1d41a
0x6281F34652359cfBa1781D84DAb939f99aaa0e29
Proxy__MVM_ChainManager
0xf3d58D1794f2634d6649a978f2dc093898FEEBc0
0xEf3375Fc36007a585Ee6e73BF95797273f4F9b49
Proxy__MVM_StateCommitmentChain
0xA2FaAAC9120c1Ff75814F0c6DdB119496a12eEA6
0x9DCC53737FcB3E86a17CF435ca3c15390D4FC7Ed
Proxy__MVM_Verifier
0xe70DD4dE81D282B3fa92A6700FEE8339d2d9b5cb
0x1B9B31E637278c207991F6e96074928728359A10
Proxy__OVM_L1CrossDomainMessenger
0x081D1101855bD523bA69A9794e0217F0DB6323ff
0x4542c621eEe9fC533c2e6bd80880C89990EE10cD
Proxy__OVM_L1StandardBridge
0x3980c9ed79d2c191A89E02Fa3529C60eD6e9c04b
0x9848dE505e6Aa301cEecfCf23A0a150140fc996e
0xf209815E595Cdf3ed0aAF9665b1772e608AB9380
0xA059B3307f534943Ee6c710D9582B42543847Eb1
Before you begin deploying smart contracts on Metis, you need to ensure that your development environment is properly configured.
MetaMask is the most commonly used wallet to interact with dApps on networks like Metis. Here’s how to set it up:
Install Metamask
Download and install the MetaMask extension for your browser.
Create a new wallet or import an existing wallet using your seed phrase.
Add Metis Network to MetaMask:
To connect to the Metis Andromeda (Mainnet) or Sepolia (Testnet) network, you’ll need to manually add it to MetaMask.
RPC URL
Chain ID
1088
59902
Currency Symbol
METIS
sMETIS
Block Explorer URL
MetaMask will now be connected to the Metis network.
If you’re developing on the Metis Sepolia Testnet, you’ll need sMetis tokens to test your transactions and smart contracts.
Visit the Metis Faucet:
You can get free testnet tokens by visiting the official Metis Sepolia Testnet Faucet
ChainStorageContainer-CTC-
ChainStorageContainer-CTC-
ChainStorageContainer-SCC-