From c75690d0253757a2d95e5d70b56cd7dd14821187 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 16 Jan 2025 13:08:25 -0600 Subject: [PATCH 1/6] Moved tutorials to their own directory Also, removed the assets directory, it is no longer needed --- pages/stack/interop/_meta.json | 5 ++++- pages/stack/interop/assets/_meta.json | 7 ------- pages/stack/interop/{assets => }/superchain-erc20.mdx | 0 pages/stack/interop/{assets => }/superchain-weth.mdx | 0 pages/stack/interop/tutorials/_meta.json | 4 ++++ .../{assets => tutorials}/deploy-superchain-erc20.mdx | 0 .../superchainerc20-best-practices.mdx | 0 .../transfer-superchainERC20.mdx | 0 public/_redirects | 11 +++++++---- 9 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 pages/stack/interop/assets/_meta.json rename pages/stack/interop/{assets => }/superchain-erc20.mdx (100%) rename pages/stack/interop/{assets => }/superchain-weth.mdx (100%) create mode 100644 pages/stack/interop/tutorials/_meta.json rename pages/stack/interop/{assets => tutorials}/deploy-superchain-erc20.mdx (100%) rename pages/stack/interop/{assets => tutorials}/superchainerc20-best-practices.mdx (100%) rename pages/stack/interop/{assets => tutorials}/transfer-superchainERC20.mdx (100%) diff --git a/pages/stack/interop/_meta.json b/pages/stack/interop/_meta.json index 79b57c20b..627c66d93 100644 --- a/pages/stack/interop/_meta.json +++ b/pages/stack/interop/_meta.json @@ -3,7 +3,10 @@ "predeploy": "Interop predeploys", "message-passing": "Interop message passing", "op-supervisor": "OP Supervisor", - "assets": "Assets", + "superchain-weth": "SuperchainWETH (Interoperable ETH)", + "superchain-erc20": "SuperchainERC20", + "superchainerc20-best-practices": "SuperchainERC20 best practices", "security": "Cross-chain security", "tools": "Tools" + "tutorials": "Tutorials" } diff --git a/pages/stack/interop/assets/_meta.json b/pages/stack/interop/assets/_meta.json deleted file mode 100644 index 1db8c901e..000000000 --- a/pages/stack/interop/assets/_meta.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "superchain-erc20": "SuperchainERC20", - "transfer-superchainERC20": "How to transfer a SuperchainERC20", - "deploy-superchain-erc20": "Deploy assets using SuperchainERC20", - "superchainerc20-best-practices": "SuperchainERC20 best practices", - "superchain-weth": "SuperchainWETH (Interoperable ETH)" -} \ No newline at end of file diff --git a/pages/stack/interop/assets/superchain-erc20.mdx b/pages/stack/interop/superchain-erc20.mdx similarity index 100% rename from pages/stack/interop/assets/superchain-erc20.mdx rename to pages/stack/interop/superchain-erc20.mdx diff --git a/pages/stack/interop/assets/superchain-weth.mdx b/pages/stack/interop/superchain-weth.mdx similarity index 100% rename from pages/stack/interop/assets/superchain-weth.mdx rename to pages/stack/interop/superchain-weth.mdx diff --git a/pages/stack/interop/tutorials/_meta.json b/pages/stack/interop/tutorials/_meta.json new file mode 100644 index 000000000..3fc4e5b0b --- /dev/null +++ b/pages/stack/interop/tutorials/_meta.json @@ -0,0 +1,4 @@ +{ + "transfer-superchainERC20": "How to transfer a SuperchainERC20", + "deploy-superchain-erc20": "Deploy assets using SuperchainERC20", +} diff --git a/pages/stack/interop/assets/deploy-superchain-erc20.mdx b/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx similarity index 100% rename from pages/stack/interop/assets/deploy-superchain-erc20.mdx rename to pages/stack/interop/tutorials/deploy-superchain-erc20.mdx diff --git a/pages/stack/interop/assets/superchainerc20-best-practices.mdx b/pages/stack/interop/tutorials/superchainerc20-best-practices.mdx similarity index 100% rename from pages/stack/interop/assets/superchainerc20-best-practices.mdx rename to pages/stack/interop/tutorials/superchainerc20-best-practices.mdx diff --git a/pages/stack/interop/assets/transfer-superchainERC20.mdx b/pages/stack/interop/tutorials/transfer-superchainERC20.mdx similarity index 100% rename from pages/stack/interop/assets/transfer-superchainERC20.mdx rename to pages/stack/interop/tutorials/transfer-superchainERC20.mdx diff --git a/public/_redirects b/public/_redirects index 2beb892c7..d425765bc 100644 --- a/public/_redirects +++ b/public/_redirects @@ -112,10 +112,13 @@ /builders/cex-wallet-developers/cex-support /builders/app-developers/overview /builders/cex-wallet-developers/wallet-support /builders/app-developers/overview /builders/cex-wallet-developers /builders/app-developers/overview -/stack/interop/superchain-erc20 /stack/interop/assets/superchain-erc20 -/stack/interop/superchain-weth /stack/interop/assets/superchain-weth -/stack/interop/transfer-superchainERC20 /stack/interop/assets/transfer-superchainERC20 -/builders/app-developers/contracts/superchain-erc20 /stack/interop/assets/superchain-erc20 +/stack/interop/assets/superchain-erc20 /stack/interop/superchain-erc20 +/stack/interop/assets/superchain-weth /stack/interop/superchain-weth +/stack/interop/assets/superchainerc20-best-practices /stack/interop/superchainerc20-best-practices +/stack/interop/transfer-superchainERC20 /stack/interop/tutorials/transfer-superchainERC20 +/stack/interop/assets/transfer-superchainERC20 /stack/interop/tutorials/transfer-superchainERC20 +/stack/interop/assets/deploy-superchain-erc20 /stack/interop/tutorials/deploy-superchain-erc20 +/builders/app-developers/contracts/superchain-erc20 /stack/interop/superchain-erc20 /builders/chain-operators/tutorials/sdk /builders/app-developers/overview /stack/explainer /superchain/superchain-explainer /stack/interop/architecture /stack/interop/explainer#interoperability-architecture From 2ad3f7f150ebe508c98e1539f0a04200f43f9a5f Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 16 Jan 2025 13:13:38 -0600 Subject: [PATCH 2/6] Fix JSONs --- pages/stack/interop/_meta.json | 2 +- pages/stack/interop/tutorials/_meta.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/stack/interop/_meta.json b/pages/stack/interop/_meta.json index 627c66d93..a02792035 100644 --- a/pages/stack/interop/_meta.json +++ b/pages/stack/interop/_meta.json @@ -7,6 +7,6 @@ "superchain-erc20": "SuperchainERC20", "superchainerc20-best-practices": "SuperchainERC20 best practices", "security": "Cross-chain security", - "tools": "Tools" + "tools": "Tools", "tutorials": "Tutorials" } diff --git a/pages/stack/interop/tutorials/_meta.json b/pages/stack/interop/tutorials/_meta.json index 3fc4e5b0b..6d2bdacfa 100644 --- a/pages/stack/interop/tutorials/_meta.json +++ b/pages/stack/interop/tutorials/_meta.json @@ -1,4 +1,4 @@ { "transfer-superchainERC20": "How to transfer a SuperchainERC20", - "deploy-superchain-erc20": "Deploy assets using SuperchainERC20", + "deploy-superchain-erc20": "Deploy assets using SuperchainERC20" } From 8791d39d31ff515cc0f5675efc966c59d2fd3f95 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 16 Jan 2025 15:51:31 -0600 Subject: [PATCH 3/6] Moved best practices to where it belongs --- .../interop/{tutorials => }/superchainerc20-best-practices.mdx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pages/stack/interop/{tutorials => }/superchainerc20-best-practices.mdx (100%) diff --git a/pages/stack/interop/tutorials/superchainerc20-best-practices.mdx b/pages/stack/interop/superchainerc20-best-practices.mdx similarity index 100% rename from pages/stack/interop/tutorials/superchainerc20-best-practices.mdx rename to pages/stack/interop/superchainerc20-best-practices.mdx From 1b7cb11333bdf102bef27bde1c7aadbe23fc1b0a Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 16 Jan 2025 20:21:54 -0600 Subject: [PATCH 4/6] Removed `assets.mdx` --- pages/stack/interop/assets.mdx | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 pages/stack/interop/assets.mdx diff --git a/pages/stack/interop/assets.mdx b/pages/stack/interop/assets.mdx deleted file mode 100644 index 87950ceb6..000000000 --- a/pages/stack/interop/assets.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Assets -description: Documentation covering Cross Chain Message, Explainer, Message Passing, Op Supervisor, Superchain Erc20, Superchain Weth, Supersim, Transfer Superchainerc20 in the Interop section of the OP Stack ecosystem. -lang: en-US ---- - -import { Card, Cards } from 'nextra/components' - -# Interop - -Documentation covering SuperchainERC20, Superchain WETH, Supersim, and how to transfer a SuperchainERC20. - - - - - - - - - - - - From f0cea1a31da22ae353df0b06f665e1d437e6e819 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Fri, 17 Jan 2025 09:24:14 -0600 Subject: [PATCH 5/6] Removed best practices The one relevant best practice moved to the erc20 explainer --- pages/stack/interop/_meta.json | 1 - pages/stack/interop/superchain-erc20.mdx | 6 ++++ .../superchainerc20-best-practices.mdx | 31 ------------------- public/_redirects | 1 - 4 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 pages/stack/interop/superchainerc20-best-practices.mdx diff --git a/pages/stack/interop/_meta.json b/pages/stack/interop/_meta.json index a02792035..2a45aa447 100644 --- a/pages/stack/interop/_meta.json +++ b/pages/stack/interop/_meta.json @@ -5,7 +5,6 @@ "op-supervisor": "OP Supervisor", "superchain-weth": "SuperchainWETH (Interoperable ETH)", "superchain-erc20": "SuperchainERC20", - "superchainerc20-best-practices": "SuperchainERC20 best practices", "security": "Cross-chain security", "tools": "Tools", "tutorials": "Tutorials" diff --git a/pages/stack/interop/superchain-erc20.mdx b/pages/stack/interop/superchain-erc20.mdx index 20fcfc0d0..08cfca44a 100644 --- a/pages/stack/interop/superchain-erc20.mdx +++ b/pages/stack/interop/superchain-erc20.mdx @@ -71,6 +71,12 @@ This diagram illustrates the process where tokens are burned on the source chain Projects moving from other token implementations may need to adapt to the `SuperchainERC20` specification. +## Consistent addresses across chains + +It is besty to Use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the SuperchainERC20Bridge would need a way to verify if the tokens they mint on destination correspond to the tokens that were burned on source. + +Consider using `Create2Deployer` or one of our [predeploys](https://specs.optimism.io/interop/predeploys.html) to ensure this. + ## Implementation details Application developers must do two things to make their tokens `SuperchainERC20` compatible. Doing this setup now ensures that tokens can benefit from Interop once the Interop upgrade happens. diff --git a/pages/stack/interop/superchainerc20-best-practices.mdx b/pages/stack/interop/superchainerc20-best-practices.mdx deleted file mode 100644 index d1127a305..000000000 --- a/pages/stack/interop/superchainerc20-best-practices.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Best practices for managing SuperchainERC20 tokens -lang: en-US -description: Essential best practices for deploying and managing SuperchainERC20 assets across Superchain networks. ---- - -# Best practices for managing SuperchainERC20 tokens - -The following best practices are essential for deploying and managing `SuperchainERC20` assets across the Superchain. These guidelines help ensure optimal cross-chain functionality. - -Note that the total supply of your tokens never fluctuates across the Superchain. Cross-chain burning and minting only affects the location of a token across the Superchain. - -## Consistent addresses across chains - -Use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the SuperchainERC20Bridge would need a way to verify if the tokens they mint on destination correspond to the tokens that were burned on source. - -Consider using `Create2Deployer` or one of our [predeploys](https://specs.optimism.io/interop/predeploys.html) to ensure this. - -## Testing before mainnet deployment - -Test with production-like conditions: Deploy to staging environments that simulate mainnet conditions, especially for functions like `crosschainBurn` and `crosschainMint`. Test under realistic transaction loads to validate performance. - -We recommend using [Supersim](https://supersim.pages.dev/introduction) as an easy way to simulate the Superchain and test your SuperchainERC20 deployment. - -Test edge cases such as maximum balance transfers and interchain latency to ensure asset reliability across different scenarios. - -## Next steps - -* Explore the [SuperchainERC20 specifications](https://specs.optimism.io/interop/token-bridging.html) for in-depth implementation details. -* Watch the [Superchain interop design video walkthrough](https://www.youtube.com/watch?v=FKc5RgjtGes) for a visual explanation of the concepts. -* Review the [Superchain Interop Explainer](../explainer) for answers to common questions about interoperability. diff --git a/public/_redirects b/public/_redirects index d425765bc..a8fa339dc 100644 --- a/public/_redirects +++ b/public/_redirects @@ -114,7 +114,6 @@ /builders/cex-wallet-developers /builders/app-developers/overview /stack/interop/assets/superchain-erc20 /stack/interop/superchain-erc20 /stack/interop/assets/superchain-weth /stack/interop/superchain-weth -/stack/interop/assets/superchainerc20-best-practices /stack/interop/superchainerc20-best-practices /stack/interop/transfer-superchainERC20 /stack/interop/tutorials/transfer-superchainERC20 /stack/interop/assets/transfer-superchainERC20 /stack/interop/tutorials/transfer-superchainERC20 /stack/interop/assets/deploy-superchain-erc20 /stack/interop/tutorials/deploy-superchain-erc20 From 6209934c031e6202d95fdf473bebc431763a6823 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Fri, 17 Jan 2025 19:52:04 +0100 Subject: [PATCH 6/6] Update pages/stack/interop/superchain-erc20.mdx --- pages/stack/interop/superchain-erc20.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/interop/superchain-erc20.mdx b/pages/stack/interop/superchain-erc20.mdx index 08cfca44a..2e2f652e4 100644 --- a/pages/stack/interop/superchain-erc20.mdx +++ b/pages/stack/interop/superchain-erc20.mdx @@ -73,7 +73,7 @@ This diagram illustrates the process where tokens are burned on the source chain ## Consistent addresses across chains -It is besty to Use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the SuperchainERC20Bridge would need a way to verify if the tokens they mint on destination correspond to the tokens that were burned on source. +It is best to use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the `SuperchainERC20Bridge` would need a way to verify if the tokens they mint on destination, correspond to the tokens that were burned on source. Consider using `Create2Deployer` or one of our [predeploys](https://specs.optimism.io/interop/predeploys.html) to ensure this.