Developing smart contracts on Optimism


This guide shows you the ropes of developing smart contracts for Optimism. With Optimism, all your favourite developer tools work out the box, no special set up required. They work because Optimism is EVM Equivalent (opens new window) with some small exceptions. We have made this guide to make it that much easier to get started!

Optimism supports Solidity (opens new window) as well as Vyper (opens new window). If you have never written a smart contract before, we have a more step by step guide for developers using Remix and recommend reading the Solidity docs getting started section (opens new window).

# Local Development

To get started we need to get a local environment set up for testing and development. Then you can follow the getting started tutorial (opens new window). After that we have lots of tutorials for you to follow (opens new window). If you think we need more, you can ask for a specific topic on our Discord (opens new window) in the #doc-requests channel.

# Deploying on Testnet

So you've written your contracts and are ready to deploy them to the testnet! First things first you are going to need some test ETH on Optimism Goerli or Optimism Kovan. Head to the faucet (opens new window) for some test ETH on Goerli.

Next you will need to connect to the Optimism test network to deploy your contracts. You can find all the required network information as well as PRC endpoints in our networks page. Additionally we have a helpful page of debugging tools you can make use of while working out those final bugs.

Please read through our known issues if you run into any unexpected behaviors before you deploy to mainnet.

# Mainnet Deployments

Ready for mainnet? Fantastic! Just like with the testnet, you are going to need ETH on the Optimism network in order to deploy.

There are three ways you can do this:

  1. Bridge ETH from mainnet to Optimism using the Optimism Gateway (opens new window).
  2. Use a fiat onramp (opens new window) directly onto Optimism.
  3. Bridge ETH from another chain to Optimism using a third party bridge (opens new window).

Now that your deployer address has ETH, you will need to point to the right network to deploy. You can find the required network information as well as RPC provider information in our networks page.

If you run into any trouble don't hesitate to ask for help on our Discord (opens new window)!