You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/stack/interop/explainer.mdx
+2
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,8 @@ flowchart LR
210
210
211
211
Each blockchain in the Superchain interop cluster shares the same security model to mitigate the weakest-link scenario. As outlined in the [Standard Rollup Charter](/superchain/blockspace-charter), these chains share the same L1 `ProxyAdmin` Owner. Any changes to the Superchain interop cluster must follow the standard Protocol Upgrade vote procedure—the established governance process for Superchain modifications.
212
212
213
+
The Superchain interop cluster will be rolled out iteratively, but to see a list of eligible chains that could join the cluster visit the [Superchain Index](https://www.superchain.eco/superchain-index) and look at chains that have a `Standard` charter.
Copy file name to clipboardExpand all lines: pages/stack/interop/superchain-erc20.mdx
+4
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,10 @@ The SuperchainERC20 standard is ready for production use with active Mainnet dep
11
11
Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.
12
12
</Callout>
13
13
14
+
<Callout>
15
+
SuperchainERC20s can be deployed on any chain, but will only be interoperable within the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster).
16
+
</Callout>
17
+
14
18
# SuperchainERC20
15
19
16
20
The [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) contract implements [ERC-7802](https://ethereum-magicians.org/t/erc-7802-crosschain-token-interface/21508) to enable asset interoperability within the Superchain.
Copy file name to clipboardExpand all lines: pages/stack/interop/tutorials/deploy-superchain-erc20.mdx
+147-17
Original file line number
Diff line number
Diff line change
@@ -8,43 +8,173 @@ import { Callout } from 'nextra/components'
8
8
import { Steps } from'nextra/components'
9
9
10
10
<Callout>
11
-
The SuperchainERC20 standard is ready for production use with active Mainnet deployments.
12
-
Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.
11
+
The SuperchainERC20 standard is ready for production deployments.
12
+
However, the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.
13
13
</Callout>
14
14
15
15
# Issuing new assets with SuperchainERC20
16
16
17
-
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
+
## Overview
18
18
19
-
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
+
This guide explains how to issue new assets with the [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) contract.
20
+
Those assets can then be bridged quickly and safely using the [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) contract (once interop is operational).
21
+
For more information on how it works, [see the explainer](/stack/interop/superchain-erc20).
20
22
21
-
## Steps to issue and bridge assets
23
+
Note that bridging assets through the Superchain using `SuperchainTokenBridge`*never* affects the total supply of your asset.
24
+
The supply remains fixed, bridging only changes the chain on which the asset is located.
25
+
The token's total amount across all network always remains the same, ensuring value stability.
26
+
27
+
To ensure fungibility across chains, `SuperchainERC20` assets *must* have the same contract address on all chains.
28
+
This requirement abstracts away the complexity of cross-chain validation.
29
+
Achieving this requires deterministic deployment methods. There are multiple ways to do this.
30
+
Here we will use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit).
31
+
32
+
### What you'll do
33
+
34
+
* Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy an `SuperchainERC20` token on the devnet.
35
+
36
+
### What you'll learn
37
+
38
+
* How to deploy `SuperchainERC20` tokens on different chains at the same address.
39
+
40
+
## Prerequisites
41
+
42
+
Before starting this tutorial, ensure your development environment meets the following requirements:
43
+
44
+
### Technical knowledge
45
+
46
+
* Understanding of smart contract development
47
+
* Familiarity with blockchain concepts
48
+
49
+
### Development environment
50
+
51
+
* Unix-like operating system (Linux, macOS, or WSL for Windows)
52
+
* Git for version control
53
+
54
+
### Required tools
55
+
56
+
The tutorial uses these primary tools:
57
+
58
+
* Foundry: For sending transactions to blockchains.
59
+
60
+
## Step by step explanation
22
61
23
62
<Steps>
24
-
### Deploy the `SuperchainERC20` Token Contract
63
+
### Install the prerequisites and the SuperchainERC20 Starter Kit
64
+
65
+
Follow the setup steps in the [SuperchainERC20 Starter Kit](/app-developers/starter-kit#setup).
66
+
67
+
### Prepare for deployment
68
+
69
+
The Starter Kit already deploys a `SuperchainERC20` token to [Supersim](../tools/supersim).
70
+
Here we will deploy it to the [Interop devnet](../tools/devnet).
71
+
72
+
1. Edit `packages/contracts/foundry.toml` to add the RPC endpoints for the devnet (add the bottom two rows).
25
73
26
-
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:
74
+
```toml
75
+
[rpc_endpoints]
76
+
op_chain_a = "http://127.0.0.1:9545"
77
+
op_chain_b = "http://127.0.0.1:9546"
78
+
devnet0 = "https://interop-alpha-0.optimism.io"
79
+
devnet1 = "https://interop-alpha-1.optimism.io"
80
+
```
27
81
28
-
*`Create2Deployer`: A smart contract that enables deploying contracts with predictable addresses.
29
-
*`OptimismSuperchainERC20Factory`: A factory contract designed for L1-native tokens to ensure uniform deployments across chains.
82
+
You can import most RPC endpoints with this command, but it does not include the Interop devnet.
30
83
31
-
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). For an in-depth guide on how to deploy a `SuperchainERC20` use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit).
84
+
```sh
85
+
pnpm contracts:update:rpcs
86
+
```
32
87
33
-
By deploying assets at identical addresses across multiple chains, we abstract away the complexity of cross-chain validation.
88
+
2. Edit `packages/contracts/configs/deploy-config.toml` for the deployment settings.
34
89
35
-
### Implement the IERC7802 interface
90
+
* Set these parameters in the `[deploy-config]` section:
36
91
37
-
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.
| chains | The chains to deploy the contract<sup>1</sup> |\["devnet0","devnet1"]|
38
96
39
-
The interface defines two functions for bridging:
97
+
(1) These names must correspond to the chain names in the `[rpc-endpoints]` section of `foundry.toml` you updated in the previous step.
40
98
41
-
*`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.
42
-
*`relayERC20`: Processes incoming messages from the L2toL2CrossDomainMessenger and mints the corresponding amount of the SuperchainERC20.
99
+
* Set these parameters in the `[token]` section:
43
100
44
-
[Here's an example implementation of the `SuperchainERC20Bridge`](https://specs.optimism.io/interop/token-bridging.html#implementation)
0 commit comments