Skip to main content
The SuperchainERC20 standard is ready for production deployments. However, the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.

Overview

This guide explains how to issue new assets with the SuperchainERC20 contract. Those assets can then be bridged quickly and safely using the SuperchainTokenBridge contract (once interop is operational). For more information on how it works, see the explainer. Note that bridging assets through the Superchain using SuperchainTokenBridge never affects the total supply of your asset. The supply remains fixed, bridging only changes the chain on which the asset is located. The token’s total amount across all networks always remains the same, ensuring value stability. To ensure fungibility across chains, SuperchainERC20 assets must have the same contract address on all chains. This requirement abstracts away the complexity of cross-chain validation. Achieving this requires deterministic deployment methods. There are multiple ways to do this. Here we will use the SuperchainERC20 Starter Kit.

What you’ll do

Step by step explanation

1

Install the prerequisites and the SuperchainERC20 Starter Kit

Follow the setup steps in the SuperchainERC20 Starter Kit.
2

Prepare for deployment

The Starter Kit already deploys a SuperchainERC20 token to Supersim. Here are the required changes to deploy it to the Interop devnet.
  1. Edit packages/contracts/foundry.toml to add the RPC endpoints for the devnet (add the bottom two rows).
    [rpc_endpoints]
    op_chain_a = "http://127.0.0.1:9545"
    op_chain_b = "http://127.0.0.1:9546"
    devnet0 = "https://interop-alpha-0.optimism.io"
    devnet1 = "https://interop-alpha-1.optimism.io"
    
    You can import most RPC endpoints with this command, but it does not include the Interop devnet.
    pnpm contracts:update:rpcs
    
  2. Edit packages/contracts/configs/deploy-config.toml for the deployment settings.
    • Set these parameters in the [deploy-config] section:
      ParameterMeaningExample
      saltA unique identifierCarthage
      chainsThe chains to deploy the contract1[“devnet0”,“devnet1”]
      (1) These names must correspond to the chain names in the [rpc-endpoints] section of foundry.toml you updated in the previous step.
    • Set these parameters in the [token] section:
      ParameterMeaningExample
      owner_addressOwner of the tokenYour address1
      nameToken nameQuick Transfer Token
      symbolToken symbolQTT
      decimalsNumber of decimal places18
      (1) This should be an address you control (for which you know the private key), which has some ETH on the devnets. See here to add ETH to the devnets.
    Here is a sample packages/contracts/configs/deploy-config.toml file you can use, as long as you update owner_address.
    [deploy_config]
    salt = "is the source of our word salary"
    chains = ["devnet0","devnet1"]
    
    [token]
    owner_address = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
    name = "Quick Transfer Token"
    symbol = "QTT"
    decimals = 18
    
  3. Set the private key. Edit packages/contracts/.env to set DEPLOYER_PRIVATE_KEY to the private key of an account that has ETH on both devnet blockchains.
    DEPLOYER_PRIVATE_KEY= <private key goes here>
    
3

Deploy the contracts

Run the deployment script.
pnpm contracts:deploy:token

Next steps