Deploying Contracts
To deploy a contract on AltLayer:
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.
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.
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.
warning
Do not change the Bridge address! This is the default bridge contract we have deployed for developers.
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.
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.
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).
- Choose rinkeby from the Network dropdown list.
- Without modifying any other input, click Deploy to L1.
Finally you should see something similar to the following. Click on Save Token.
With the ERC20 token contracts deployed on both networks, you can now check them on the My Tokens page.