Skip to content

Commit f29e271

Browse files
Merge pull request #1050 from ethereum-optimism/SERC20-deploy-assets
Deploy assets using Superchain ERC20
2 parents 64ac48c + 18cd436 commit f29e271

File tree

5 files changed

+64
-8
lines changed

5 files changed

+64
-8
lines changed

pages/stack/interop/assets.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ Documentation covering SuperchainERC20, Superchain WETH, Supersim, and how to tr
1616
<Card title="SuperchainWETH (Interoperable ETH)" href="/stack/interop/assets/superchain-weth" />
1717

1818
<Card title="How to transfer a SuperchainERC20" href="/stack/interop/assets/transfer-superchainERC20" />
19+
20+
<Card title="How to deploy assets using SuperchainERC20" href="/stack/interop/assets/deploy-superchain-erc20" />
1921
</Cards>

pages/stack/interop/assets/_meta.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"superchain-erc20": "SuperchainERC20",
33
"superchain-weth": "SuperchainWETH (Interoperable ETH)",
4-
"transfer-superchainERC20": "How to transfer a SuperchainERC20"
4+
"transfer-superchainERC20": "How to transfer a SuperchainERC20",
5+
"deploy-superchain-erc20": "Deploy assets using SuperchainERC20"
56
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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.

pages/stack/interop/assets/superchain-erc20.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Application developers must do two things to make their tokens `SuperchainERC20`
8181

8282
For now, application developers should view `SuperchainERC20`as ERC20 tokens with additional built-in functions that allow cross-chain asset movement that will be enabled once Interop goes live.
8383

84+
For step-by-step information on implementing SuperchainERC20, see [Deploy assets using SuperchainERC20](/stack/interop/deploy-superchain-erc20)
85+
8486
<Callout type="warning">
8587
To enable asset interoperability, `SuperchainERC20` must give access to the address where the future `SuperchainERC20Bridge` will live.
8688
</Callout>

words.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Ankr
2+
Immunefi
3+
Mitigations
4+
Pyth
5+
Pyth's
6+
Sepolia
7+
voxel
18
ACCOUNTQUEUE
29
accountqueue
310
ACCOUNTSLOTS
@@ -10,7 +17,6 @@ Allnodes
1017
Allocs
1118
allocs
1219
ANDI
13-
Ankr
1420
Apeworx
1521
Arweave
1622
authrpc
@@ -146,10 +152,10 @@ historicalrpctimeout
146152
HOLESKY
147153
Holesky
148154
holesky
155+
IERC
149156
IGNOREPRICE
150157
ignoreprice
151158
implicity
152-
Immunefi
153159
Inator
154160
inator
155161
INFLUXDBV
@@ -197,7 +203,6 @@ minsuggestedpriorityfee
197203
Mintable
198204
Mintplex
199205
MIPSEVM
200-
Mitigations
201206
Monitorism
202207
Moralis
203208
Mordor
@@ -292,8 +297,6 @@ Proxied
292297
Proxyd
293298
proxyd
294299
pseudorandomly
295-
Pyth
296-
Pyth's
297300
QRNG
298301
Quicknode
299302
quicknode
@@ -328,7 +331,6 @@ safedb
328331
Schnorr
329332
secp
330333
SELFDESTRUCT
331-
Sepolia
332334
seqnr
333335
SEQUENCERHTTP
334336
sequencerhttp
@@ -394,7 +396,6 @@ vhosts
394396
Viem
395397
viem
396398
Viem's
397-
voxel
398399
VMDEBUG
399400
vmdebug
400401
VMODULE

0 commit comments

Comments
 (0)