|
| 1 | +--- |
| 2 | +title: Deploy assets using SuperchainERC20 |
| 3 | +lang: en-US |
| 4 | +description: Learn about the basic details of deploying assets on SuperchainERC20 |
| 5 | +--- |
| 6 | + |
| 7 | +import { Callout } from 'nextra/components' |
| 8 | +import { Steps } from 'nextra/components' |
| 9 | + |
| 10 | +# Issuing new assets with SuperchainERC20 |
| 11 | + |
| 12 | +<Callout> |
| 13 | + Interop is currently in active development and not yet ready for production use. The information provided here may change. Check back regularly for the most up-to-date information. |
| 14 | +</Callout> |
| 15 | + |
| 16 | +This guide explains how to issue new assets with the `SuperchainERC20` and bridge them effectively using the `SuperchainERC20Bridge`. If you want more information about the `SuperchainERC20 standard`, see our [`SuperchainERC20` standard explainer](/stack/interop/superchain-erc20) |
| 17 | + |
| 18 | +Note that bridging assets through the Superchain using `SuperchainERC20` never affects the total supply of your asset. The supply remains fixed, and bridging only changes the chain on which your asset is located. This keeps the token's total amount the same across all networks, ensuring its value stays stable during the move and that the `SuperchainERC20` retains a unified, global supply count. |
| 19 | + |
| 20 | +## Steps to issue and bridge assets |
| 21 | + |
| 22 | +<Steps> |
| 23 | + ### Deploy the `SuperchainERC20` Token Contract |
| 24 | + |
| 25 | + To ensure fungibility across chains, the SuperchainERC20 assets need to have the same contract address on all chains. Achieving this requires deterministic deployment methods, such as: |
| 26 | + |
| 27 | + * `Create2Deployer`: A smart contract that enables deploying contracts with predictable addresses. |
| 28 | + * `OptimismSuperchainERC20Factory`: A factory contract designed for L1-native tokens to ensure uniform deployments across chains. |
| 29 | + |
| 30 | + There are [many ways to do this](https://github.com/Arachnid/deterministic-deployment-proxy), but [here's an example smart contract to start](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/packages/contracts/src/L2NativeSuperchainERC20.sol) |
| 31 | + |
| 32 | + By deploying assets at identical addresses across multiple chains, we abstract away the complexity of cross-chain validation. |
| 33 | + |
| 34 | + ### Implement the IERC7802 interface |
| 35 | + |
| 36 | + Implementations of `SuperchainERC20` will be required to implement the [IERC7802](https://specs.optimism.io/interop/token-bridging.html#ierc7802) interface, that includes two external functions and two events. |
| 37 | + |
| 38 | + The interface defines two functions for bridging: |
| 39 | + |
| 40 | + * `sendERC20`: Initializes a cross-chain transfer of a `SuperchainERC20` by burning the tokens locally and sending a message to the `SuperchainERC20Bridge` on the target chain using the `L2toL2CrossDomainMessenger`. This ensures that asset supply remains constant, as sending an asset moves it from one chain to another without creating additional supply. |
| 41 | + * `relayERC20`: Processes incoming messages from the L2toL2CrossDomainMessenger and mints the corresponding amount of the SuperchainERC20. |
| 42 | + |
| 43 | + [Here's an example implementation of the `SuperchainERC20Bridge`](https://specs.optimism.io/interop/token-bridging.html#implementation) |
| 44 | +</Steps> |
| 45 | + |
| 46 | +## Next steps |
| 47 | + |
| 48 | +* Explore the [SuperchainERC20 specifications](https://specs.optimism.io/interop/token-bridging.html) for in-depth implementation details. |
| 49 | +* Watch the [Superchain interop design video walkthrough](https://www.youtube.com/watch?v=FKc5RgjtGes) for a visual explanation of the concepts. |
| 50 | +* Review the [Superchain Interop Explainer](explainer) for answers to common questions about interoperability. |
0 commit comments