Skip to main content

Use Remix to Deploy Smart Contracts

Remix's web-based IDE supports writing, testing, debugging, and deploying smart contracts written in Solidity, Yul, and other popular contract development languages.



If you want to get some testnet tokens, please refer to the Faucet page

Deploy your contract

  1. Start by opening Remix in your browser. Create a new .sol file under the "Contracts" folder and start writing your code. This tutorial will use the initial example contract Storage.sol.

  2. Once ready, you can proceed with compiling the contract by either clicking the Compile button on the top, or clicking on the blue button that says "Compile <file_name>", which you can access by navigating to the "Solidity Compiler" tab by clicking on the left.

  3. If the compilation was successful (A green checkmark will appear on the left side), you'll be able to deploy the contract from the "Deploy & run transactions" tab, which can be accessed by clicking on the left.

  4. Switch to Mantle Network in your MetaMask wallet and select "Injected Provider - MetaMask" from the "Environment" dropdown list and select a wallet account that will be used to pay the gas fees. Remix will automatically connect to the network that the wallet is currently connected to. Click on the Deploy button to send the deploy transaction.

  5. Upon successful deployment, you'll be able to see the transaction and contract info in the terminal at the bottom, like so:

Now you can head over to Mantle blockchain explorer to check the contract details.