Skip to main content

Deploying Contracts

To deploy a contract on AltLayer:

  1. Go to the dApp Portal (for our publicly accessible flash layer, you can use this one). On the top right corner, connect to your Metamask wallet.

    Metamask wallet

  2. Make sure your wallet has enough funds for deploying contracts. To operate on the AltLayer testnet, for example, you can follow the guide here to obtain test tokens.

    tip

    For Rinkeby network, use rinkebyfaucet.com, or faucet.rinkeby.io.

  3. Once you have gotten the test tokens, go to the Deploy > ERC20 page (or the Deploy > ERC721 page, whichever is needed) and type in your Token Name and Symbol.

    deploy-erc20

    warning

    Do not change the Bridge address! This is the default bridge contract we have deployed for developers.

  4. Select the alt network in the Network dropdown list, and click Deploy to L2. You will get a prompt from Metamask to confirm the transaction.

  5. In a few seconds, the newly deployed token contract address will be shown. Click Save Token to save the information in your browser local storage.

  6. If you want to bridge the asset between L1 and L2, you will also need to deploy the same token/contract on the target L1 network (e.g., Rinkeby).

    1. Choose rinkeby from the Network dropdown list.
    2. Without modifying any other input, click Deploy to L1.
  7. Finally you should see something similar to the following. Click on Save Token.

    Two Token Addresses

  8. With the ERC20 token contracts deployed on both networks, you can now check them on the My Tokens page.

    My Tokens page