From 84c7433659dd740d630295e14f2fcdb53c3ddebe Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:18:17 -0700 Subject: [PATCH 01/10] Interop nav work --- pages/_meta.json | 11 ++++ pages/app-developers/get-started.mdx | 4 +- pages/app-developers/interop.mdx | 2 +- .../tools/build/ecosystem-overview.mdx | 2 +- pages/app-developers/tools/supersim.mdx | 2 +- .../interop/bridge-crosschain-eth.mdx | 2 +- .../tutorials/interop/contract-calls.mdx | 2 +- .../interop/deploy-superchain-erc20.mdx | 2 +- .../tutorials/interop/event-contests.mdx | 2 +- .../tutorials/interop/event-reads.mdx | 2 +- .../tutorials/interop/relay-messages-cast.mdx | 2 +- .../tutorials/interop/relay-messages-viem.mdx | 2 +- .../interop/transfer-superchainERC20.mdx | 2 +- pages/connect/contribute/style-guide.mdx | 2 +- pages/get-started/interop.mdx | 2 +- pages/index.mdx | 15 ++++- pages/{stack => }/interop/_meta.json | 0 .../{stack => }/interop/compatible-tokens.mdx | 12 ++-- pages/{stack => }/interop/explainer.mdx | 12 ++-- .../{stack => }/interop/interop-security.mdx | 4 +- pages/{stack => }/interop/message-passing.mdx | 6 +- pages/{stack => }/interop/op-supervisor.mdx | 4 +- pages/{stack => }/interop/predeploy.mdx | 4 +- pages/{stack => }/interop/reading-logs.mdx | 14 ++--- pages/{stack => }/interop/reorg.mdx | 0 .../{stack => }/interop/superchain-erc20.mdx | 10 ++-- pages/{stack => }/interop/superchain-weth.mdx | 10 ++-- pages/{stack => }/interop/tools.mdx | 6 +- pages/{stack => }/interop/tools/_meta.json | 0 pages/{stack => }/interop/tools/devnet.mdx | 6 +- pages/{stack => }/interop/tools/rc-alpha.mdx | 6 +- pages/{stack => }/interop/tools/supersim.mdx | 0 pages/interop/tutorials.mdx | 45 ++++++++++++++ .../{stack => }/interop/tutorials/_meta.json | 0 .../tutorials/bridge-crosschain-eth.mdx | 10 ++-- .../interop/tutorials/contract-calls.mdx | 0 .../tutorials/custom-superchain-erc20.mdx | 10 ++-- .../tutorials/deploy-superchain-erc20.mdx | 10 ++-- .../interop/tutorials/event-contests.mdx | 2 +- .../interop/tutorials/event-reads.mdx | 2 +- .../interop/tutorials/message-passing.mdx | 18 +++--- .../interop/tutorials/relay-messages-cast.mdx | 2 +- .../interop/tutorials/relay-messages-viem.mdx | 2 +- .../tutorials/transfer-superchainERC20.mdx | 8 +-- pages/stack/interop.mdx | 60 ------------------- pages/stack/interop/tutorials.mdx | 45 -------------- pages/superchain/superchain-explainer.mdx | 2 +- public/_redirects | 26 ++++++++ 48 files changed, 189 insertions(+), 203 deletions(-) rename pages/{stack => }/interop/_meta.json (100%) rename pages/{stack => }/interop/compatible-tokens.mdx (92%) rename pages/{stack => }/interop/explainer.mdx (96%) rename pages/{stack => }/interop/interop-security.mdx (98%) rename pages/{stack => }/interop/message-passing.mdx (94%) rename pages/{stack => }/interop/op-supervisor.mdx (97%) rename pages/{stack => }/interop/predeploy.mdx (95%) rename pages/{stack => }/interop/reading-logs.mdx (91%) rename pages/{stack => }/interop/reorg.mdx (100%) rename pages/{stack => }/interop/superchain-erc20.mdx (93%) rename pages/{stack => }/interop/superchain-weth.mdx (95%) rename pages/{stack => }/interop/tools.mdx (58%) rename pages/{stack => }/interop/tools/_meta.json (100%) rename pages/{stack => }/interop/tools/devnet.mdx (98%) rename pages/{stack => }/interop/tools/rc-alpha.mdx (95%) rename pages/{stack => }/interop/tools/supersim.mdx (100%) create mode 100644 pages/interop/tutorials.mdx rename pages/{stack => }/interop/tutorials/_meta.json (100%) rename pages/{stack => }/interop/tutorials/bridge-crosschain-eth.mdx (94%) rename pages/{stack => }/interop/tutorials/contract-calls.mdx (100%) rename pages/{stack => }/interop/tutorials/custom-superchain-erc20.mdx (96%) rename pages/{stack => }/interop/tutorials/deploy-superchain-erc20.mdx (94%) rename pages/{stack => }/interop/tutorials/event-contests.mdx (97%) rename pages/{stack => }/interop/tutorials/event-reads.mdx (96%) rename pages/{stack => }/interop/tutorials/message-passing.mdx (94%) rename pages/{stack => }/interop/tutorials/relay-messages-cast.mdx (98%) rename pages/{stack => }/interop/tutorials/relay-messages-viem.mdx (98%) rename pages/{stack => }/interop/tutorials/transfer-superchainERC20.mdx (95%) delete mode 100644 pages/stack/interop.mdx delete mode 100644 pages/stack/interop/tutorials.mdx diff --git a/pages/_meta.json b/pages/_meta.json index 81e46e2cc..67c8b4cdd 100644 --- a/pages/_meta.json +++ b/pages/_meta.json @@ -40,6 +40,17 @@ }, "display": "children" }, + "interop": { + "title": "Interoperability", + "type":"page", + "theme": { + "navbar": true, + "sidebar": true, + "toc": true, + "pagination": true + }, + "display": "children" + }, "app-developers": { "title": "App Devs", "type": "page", diff --git a/pages/app-developers/get-started.mdx b/pages/app-developers/get-started.mdx index b981fafad..3638c6980 100644 --- a/pages/app-developers/get-started.mdx +++ b/pages/app-developers/get-started.mdx @@ -23,7 +23,7 @@ import { Cards, Card, Callout } from 'nextra/components' Reimagine your app with Superchain Interop to deliver the unified UX your users expect. Hack on net-new, bold use cases on Interop devnet. - Explore the [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs&utm_medium=docs) to build, launch, and grow your app on the Superchain. + Explore the [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) to build, launch, and grow your app on the Superchain. ## Connect to Superchain Interop @@ -34,7 +34,7 @@ Select a network to build, test, and quickly iterate on interoperable apps. | :-------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | | Build and iterate on your apps with Supersim – a local multi-chain dev environment. | Deploy your app to devnet – a testnet developmental version – to conduct large-scale testing. | | | | -| [Supersim](tutorials/supersim) | [Devnet Docs](/stack/interop/tools/devnet) | +| [Supersim](tutorials/supersim) | [Devnet Docs](/interop/tools/devnet) | ## Deploy your app to devnet in minutes diff --git a/pages/app-developers/interop.mdx b/pages/app-developers/interop.mdx index 8f49c1b23..1788ab0b1 100644 --- a/pages/app-developers/interop.mdx +++ b/pages/app-developers/interop.mdx @@ -13,6 +13,6 @@ categories: is_imported_content: 'true' --- -import InteropExplainer from '@/pages/stack/interop/explainer.mdx' +import InteropExplainer from '@/pages/interop/explainer.mdx' diff --git a/pages/app-developers/tools/build/ecosystem-overview.mdx b/pages/app-developers/tools/build/ecosystem-overview.mdx index 4f688d728..b004e2030 100644 --- a/pages/app-developers/tools/build/ecosystem-overview.mdx +++ b/pages/app-developers/tools/build/ecosystem-overview.mdx @@ -24,7 +24,7 @@ The Superchain ecosystem repository was developed to help ease and expedite the ## Getting started -Our initial launch includes a [bridge tutorial](/stack/interop/tutorials/bridge-crosschain-eth) that demonstrates how to bridge ETH and any ERC20 tokens listed in the [Superchain Token List](/superchain/tokenlist). This tutorial serves as a reference for anyone looking to build their own bridge, providing a clearer understanding of how to interact with the protocol on both the L1 and L2 sides. +Our initial launch includes a [bridge tutorial](/interop/tutorials/bridge-crosschain-eth) that demonstrates how to bridge ETH and any ERC20 tokens listed in the [Superchain Token List](/superchain/tokenlist). This tutorial serves as a reference for anyone looking to build their own bridge, providing a clearer understanding of how to interact with the protocol on both the L1 and L2 sides. Additionally, we provide a package containing common utilities essential for developers interacting with both L1 and L2. One such package is [viem-optimism](https://github.com/ethereum-optimism/ecosystem/tree/main/packages/viem), which offers utilities for interacting with the OP Stack using the viem library. diff --git a/pages/app-developers/tools/supersim.mdx b/pages/app-developers/tools/supersim.mdx index 074b39775..735f54051 100644 --- a/pages/app-developers/tools/supersim.mdx +++ b/pages/app-developers/tools/supersim.mdx @@ -66,5 +66,5 @@ This diagram illustrates how developers interact with Supersim through the CLI, ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain * View more [Supersim tutorials](/app-developers/tutorials/supersim) diff --git a/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx b/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx index 8aac86ee1..8e3ae0325 100644 --- a/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx +++ b/pages/app-developers/tutorials/interop/bridge-crosschain-eth.mdx @@ -13,6 +13,6 @@ categories: is_imported_content: 'true' --- -import CrosschainETH from '@/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx' +import CrosschainETH from '@/pages/interop/tutorials/bridge-crosschain-eth.mdx' diff --git a/pages/app-developers/tutorials/interop/contract-calls.mdx b/pages/app-developers/tutorials/interop/contract-calls.mdx index 7c246886b..c1e86060f 100644 --- a/pages/app-developers/tutorials/interop/contract-calls.mdx +++ b/pages/app-developers/tutorials/interop/contract-calls.mdx @@ -14,6 +14,6 @@ categories: is_imported_content: 'true' --- -import ContractCalls from '@/pages/stack/interop/tutorials/contract-calls.mdx' +import ContractCalls from '@/pages/interop/tutorials/contract-calls.mdx' diff --git a/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx b/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx index 4734c5e09..59a54a845 100644 --- a/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx +++ b/pages/app-developers/tutorials/interop/deploy-superchain-erc20.mdx @@ -15,6 +15,6 @@ categories: is_imported_content: 'true' --- -import DeploySuperERC20 from '@/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx' +import DeploySuperERC20 from '@/pages/interop/tutorials/deploy-superchain-erc20.mdx' diff --git a/pages/app-developers/tutorials/interop/event-contests.mdx b/pages/app-developers/tutorials/interop/event-contests.mdx index 253cbd067..20522fae9 100644 --- a/pages/app-developers/tutorials/interop/event-contests.mdx +++ b/pages/app-developers/tutorials/interop/event-contests.mdx @@ -14,6 +14,6 @@ categories: is_imported_content: 'true' --- -import EventContests from '@/pages/stack/interop/tutorials/event-contests.mdx' +import EventContests from '@/pages/interop/tutorials/event-contests.mdx' diff --git a/pages/app-developers/tutorials/interop/event-reads.mdx b/pages/app-developers/tutorials/interop/event-reads.mdx index 4db6264f5..1907c4b36 100644 --- a/pages/app-developers/tutorials/interop/event-reads.mdx +++ b/pages/app-developers/tutorials/interop/event-reads.mdx @@ -14,6 +14,6 @@ categories: is_imported_content: 'true' --- -import EventReads from '@/pages/stack/interop/tutorials/event-reads.mdx' +import EventReads from '@/pages/interop/tutorials/event-reads.mdx' diff --git a/pages/app-developers/tutorials/interop/relay-messages-cast.mdx b/pages/app-developers/tutorials/interop/relay-messages-cast.mdx index 451456a19..34ee183f1 100644 --- a/pages/app-developers/tutorials/interop/relay-messages-cast.mdx +++ b/pages/app-developers/tutorials/interop/relay-messages-cast.mdx @@ -15,6 +15,6 @@ categories: is_imported_content: 'true' --- -import RelayCast from '@/pages/stack/interop/tutorials/relay-messages-cast.mdx' +import RelayCast from '@/pages/interop/tutorials/relay-messages-cast.mdx' diff --git a/pages/app-developers/tutorials/interop/relay-messages-viem.mdx b/pages/app-developers/tutorials/interop/relay-messages-viem.mdx index 29fa88876..4377603ea 100644 --- a/pages/app-developers/tutorials/interop/relay-messages-viem.mdx +++ b/pages/app-developers/tutorials/interop/relay-messages-viem.mdx @@ -15,6 +15,6 @@ categories: is_imported_content: 'true' --- -import RelayViem from '@/pages/stack/interop/tutorials/relay-messages-viem.mdx' +import RelayViem from '@/pages/interop/tutorials/relay-messages-viem.mdx' diff --git a/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx b/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx index 45a8f97ec..c0295a427 100644 --- a/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx +++ b/pages/app-developers/tutorials/interop/transfer-superchainERC20.mdx @@ -17,6 +17,6 @@ categories: is_imported_content: 'true' --- -import TransferSuperERC20 from '@/pages/stack/interop/tutorials/transfer-superchainERC20.mdx' +import TransferSuperERC20 from '@/pages/interop/tutorials/transfer-superchainERC20.mdx' diff --git a/pages/connect/contribute/style-guide.mdx b/pages/connect/contribute/style-guide.mdx index 5489681c6..b9046d0d8 100644 --- a/pages/connect/contribute/style-guide.mdx +++ b/pages/connect/contribute/style-guide.mdx @@ -305,7 +305,7 @@ Developers trust that we will lead them to sites or pages related to their readi * Use anchor links, whenever possible, to guide users to a specific page and location in the technical documentation. This reduces cognitive load and improves overall usability. -* To link to an anchor, such as an H3 tag within a page, you need to append it to the page name preceded by `#`, like this **example**: `[any descriptive text](/stack/interop/tutorials/deploy-superchain-erc20)`. +* To link to an anchor, such as an H3 tag within a page, you need to append it to the page name preceded by `#`, like this **example**: `[any descriptive text](/interop/tutorials/deploy-superchain-erc20)`. ### Linking across pages diff --git a/pages/get-started/interop.mdx b/pages/get-started/interop.mdx index bb8768c04..5bf66c43b 100644 --- a/pages/get-started/interop.mdx +++ b/pages/get-started/interop.mdx @@ -14,6 +14,6 @@ categories: is_imported_content: 'true' --- -import InteropExplainer from '@/pages/stack/interop/explainer.mdx' +import InteropExplainer from '@/pages/interop/explainer.mdx' diff --git a/pages/index.mdx b/pages/index.mdx index d1421dc13..d0fcde3d7 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -31,6 +31,16 @@ import { Cards, Card } from 'nextra/components' Welcome to the Optimism Docs, the unified home of the [Optimism Collective's](/connect/resources/glossary#optimism-collective) technical documentation and information about the [OP Stack](/stack/getting-started). Information about the Optimism Collective's governance, community, and mission can be found on the [Optimism Community Hub](https://community.optimism.io/docs/governance/?utm_source=op-docs&utm_medium=docs). +## 🔥 Build across chains with Superchain interoperability! + +Superchain interoperability is (almost) here! Now you can build apps that work seamlessly across multiple OP chains with fast, simple asset transfers and cross-chain interactions - no complex bridges required. + +Your users get a smoother experience while you build more powerful apps. [Discover how to build powerful multi-chain dApps](/interop/explainer) with Superchain interoperability. + + + } /> + + ## Builder guides Whether you're a developer building an app on OP Mainnet, a node operator running an OP Mainnet node, or a chain operator launching your own OP Stack chain, you'll find everything you need to get started right here. @@ -42,6 +52,7 @@ Whether you're a developer building an app on OP Mainnet, a node operator runnin } /> + } /> ## Featured tools @@ -74,5 +85,5 @@ We've got you covered with these detailed guides to help you learn all about Opt } /> - } /> - + } /> + \ No newline at end of file diff --git a/pages/stack/interop/_meta.json b/pages/interop/_meta.json similarity index 100% rename from pages/stack/interop/_meta.json rename to pages/interop/_meta.json diff --git a/pages/stack/interop/compatible-tokens.mdx b/pages/interop/compatible-tokens.mdx similarity index 92% rename from pages/stack/interop/compatible-tokens.mdx rename to pages/interop/compatible-tokens.mdx index 1b3651551..b8d7cd580 100644 --- a/pages/stack/interop/compatible-tokens.mdx +++ b/pages/interop/compatible-tokens.mdx @@ -32,8 +32,8 @@ Please note that the OP Stack interoperability upgrade, required for crosschain # Superchain interop compatible tokens -Superchain interop enables **trust-minimized, 1-block latency cross-chain composability** on the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster). -The recommended approach for giving tokens Superchain interop capabilities is using [SuperchainERC20](/stack/interop/superchain-erc20), but there are other options depending on your needs. +Superchain interop enables **trust-minimized, 1-block latency cross-chain composability** on the [Superchain interop cluster](/interop/explainer#superchain-interop-cluster). +The recommended approach for giving tokens Superchain interop capabilities is using [SuperchainERC20](/interop/superchain-erc20), but there are other options depending on your needs. ## How to enable cross-chain token interoperability @@ -56,7 +56,7 @@ If a 3rd party interop solution is providing faster-than-Ethereum L1 finality (1 ## SuperchainERC20 -`SuperchainERC20` is a simple and trust-minimized way to enable token interoperability within the Superchain. You can learn more about `SuperchainERC20` [here](/stack/interop/superchain-erc20). +`SuperchainERC20` is a simple and trust-minimized way to enable token interoperability within the Superchain. You can learn more about `SuperchainERC20` [here](/interop/superchain-erc20). * **Security:** Fault Proofs secure Superchain interop end to end. No third-party dependencies to enable token interoperability. * **Latency:** 1-block latency within the Superchain interop cluster. @@ -81,7 +81,7 @@ Alternatively, you can build a custom bridge using the `L2ToL2CrossDomainMesseng #### Cross-chain token address -When deploying your token cross-chain it is critical to ensure the verification mechanism knows what the valid address mapping to facilitate cross-chain mint/burns is. When using the `SuperchainTokenBridge`, there is an invariant that tokens must be deployed at a [deterministic address across chains](/stack/interop/superchain-erc20#requirements) in the Superchain interop cluster. This simplifies development experience by ensuring the token issuer does not need to manage a cross-chain token registry per chain. +When deploying your token cross-chain it is critical to ensure the verification mechanism knows what the valid address mapping to facilitate cross-chain mint/burns is. When using the `SuperchainTokenBridge`, there is an invariant that tokens must be deployed at a [deterministic address across chains](/interop/superchain-erc20#requirements) in the Superchain interop cluster. This simplifies development experience by ensuring the token issuer does not need to manage a cross-chain token registry per chain. If using another verification mechanism you likely will need to maintain a token registry per chain that indicates the valid address mapping to facilitate cross-chain mint/burns when moving across chains. @@ -132,5 +132,5 @@ NTT is a token standard used to send, receive, and compose tokens across chains ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* [Learn more about SuperchainERC20](/stack/interop/superchain-erc20) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* [Learn more about SuperchainERC20](/interop/superchain-erc20) diff --git a/pages/stack/interop/explainer.mdx b/pages/interop/explainer.mdx similarity index 96% rename from pages/stack/interop/explainer.mdx rename to pages/interop/explainer.mdx index b4f1f6355..795ea4c8f 100644 --- a/pages/stack/interop/explainer.mdx +++ b/pages/interop/explainer.mdx @@ -27,9 +27,7 @@ import { InteropCallout } from '@/components/WipCallout' -# Superchain interoperability explainer - -## Why do we need Superchain interoperability? +# Superchain interoperability It is easy for a blockchain to be certain about information it generates itself. Information that comes from other sources is harder to provide in a safe, decentralized, and uncensorable manner (this is called [The Oracle Problem](https://chain.link/education-hub/oracle-problem)). @@ -46,7 +44,7 @@ Superchain interoperability provides the following benefits: ## Superchain interoperability architecture A pre-interop OP Stack node consists of two pieces of software: a consensus client (e.g. op-node) and an execution client, which is responsible for processing user transactions and constructing blocks (e.g. op-geth). -Superchain interoperability among OP Stack chains is enabled via a new service called [*OP Supervisor*](/stack/interop/op-supervisor). +Superchain interoperability among OP Stack chains is enabled via a new service called [*OP Supervisor*](/interop/op-supervisor). Every node operator is expected to run this service in addition to the [rollup node](/operators/node-operators/architecture#rollup-node) and [execution client](/operators/node-operators/architecture#execution-client). ```mermaid @@ -234,7 +232,7 @@ The Superchain interop cluster will be rolled out iteratively, but to see a list Superchain interop includes both the protocol layer message passing asset interoperability for ETH and SuperchainERC20 tokens. * **Message passing protocol:** the initial + finalizing/executing [message-cross-chain-message] that fire events to be consumed by the chains in the [dependency set](https://specs.optimism.io/interop/dependency-set.html) -* ****: the [SuperchainERC20 superchain-erc20] turns message passing into asset transfer between chains in the interop set. Learn more about how the SuperchainERC20 token standard enables asset interoperability in the Superchain [here](/stack/interop/superchain-erc20) +* ****: the [SuperchainERC20 superchain-erc20] turns message passing into asset transfer between chains in the interop set. Learn more about how the SuperchainERC20 token standard enables asset interoperability in the Superchain [here](/interop/superchain-erc20) This means ETH and ERC-20s can seamlessly and securely move across L2s, and intent-based protocols (i.e., bridges) can build better experiences on top of the message passing protocol. */} @@ -242,6 +240,6 @@ This means ETH and ERC-20s can seamlessly and securely move across L2s, and inte ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* Learn [how messages get from one chain to another chain](/stack/interop/message-passing) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Learn [how messages get from one chain to another chain](/interop/message-passing) * Watch [this video](https://www.youtube.com/watch?v=FKc5RgjtGes), which gives an overview of Superchain interoperability. diff --git a/pages/stack/interop/interop-security.mdx b/pages/interop/interop-security.mdx similarity index 98% rename from pages/stack/interop/interop-security.mdx rename to pages/interop/interop-security.mdx index 4f0ae5c1d..e1dfac811 100644 --- a/pages/stack/interop/interop-security.mdx +++ b/pages/interop/interop-security.mdx @@ -169,6 +169,6 @@ The protocol enforces the fact that all executing messages are valid. It does th */} * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain * For more info about how Superchain interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs&utm_medium=docs) -* View more [interop tutorials](/stack/interop/tutorials) +* View more [interop tutorials](/interop/tutorials) diff --git a/pages/stack/interop/message-passing.mdx b/pages/interop/message-passing.mdx similarity index 94% rename from pages/stack/interop/message-passing.mdx rename to pages/interop/message-passing.mdx index ea351f603..b40938537 100644 --- a/pages/stack/interop/message-passing.mdx +++ b/pages/interop/message-passing.mdx @@ -29,7 +29,7 @@ import { InteropCallout } from '@/components/WipCallout' This is an explanation of how interop works. - You can find a step by step tutorial [here](/stack/interop/tutorials/message-passing). + You can find a step by step tutorial [here](/interop/tutorials/message-passing). The low-level [`CrossL2Inbox`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol) contract handles basic message execution. It verifies whether an initiating message exists but does not check the message's destination, processing status, or other attributes. @@ -122,5 +122,5 @@ sequenceDiagram ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Learn how to [pass messages between blockchains](/stack/interop/tutorials/message-passing). -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain. +* Learn how to [pass messages between blockchains](/interop/tutorials/message-passing). +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain. diff --git a/pages/stack/interop/op-supervisor.mdx b/pages/interop/op-supervisor.mdx similarity index 97% rename from pages/stack/interop/op-supervisor.mdx rename to pages/interop/op-supervisor.mdx index 90eec14d7..40b0834e5 100644 --- a/pages/stack/interop/op-supervisor.mdx +++ b/pages/interop/op-supervisor.mdx @@ -92,6 +92,6 @@ For a full listing of API names, see the [source code](https://github.com/ethere ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* Learn [how ETH can move across chains](https://docs.optimism.io/stack/interop/superchain-weth) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Learn [how ETH can move across chains](https://docs.optimism.io/interop/superchain-weth) * For more info about how Superchain interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs&utm_medium=docs). diff --git a/pages/stack/interop/predeploy.mdx b/pages/interop/predeploy.mdx similarity index 95% rename from pages/stack/interop/predeploy.mdx rename to pages/interop/predeploy.mdx index cd784ef9b..634ede054 100644 --- a/pages/stack/interop/predeploy.mdx +++ b/pages/interop/predeploy.mdx @@ -83,5 +83,5 @@ The `SuperchainTokenBridge` is an abstraction on top of the `L2ToL2CrossDomainMe ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* Learn [how messages get from one chain to another chain](/stack/interop/message-passing) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Learn [how messages get from one chain to another chain](/interop/message-passing) diff --git a/pages/stack/interop/reading-logs.mdx b/pages/interop/reading-logs.mdx similarity index 91% rename from pages/stack/interop/reading-logs.mdx rename to pages/interop/reading-logs.mdx index d35cca577..2a2bfcd5c 100644 --- a/pages/stack/interop/reading-logs.mdx +++ b/pages/interop/reading-logs.mdx @@ -15,7 +15,7 @@ import { InteropCallout } from '@/components/WipCallout' # Reading Logs with Superchain Interop -Superchain interop enables developers to leverage current and historical logs from other blockchains within the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster) directly on their local chain. +Superchain interop enables developers to leverage current and historical logs from other blockchains within the [Superchain interop cluster](/interop/explainer#superchain-interop-cluster) directly on their local chain. This allows smart contracts to consume local and cross-chain logs with low latency in a trust-minimized way. ## Overview @@ -46,13 +46,13 @@ The process works through the [`CrossL2Inbox`](https://github.com/ethereum-optim ### Key components -* **[Identifier](/stack/interop/tutorials/relay-messages-cast#message-identifier)**: A struct containing information about the log, including `chainId`, `origin` (contract address), and other log metadata +* **[Identifier](/interop/tutorials/relay-messages-cast#message-identifier)**: A struct containing information about the log, including `chainId`, `origin` (contract address), and other log metadata * **[validateMessage](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol#L79)**: Function that verifies a log's authenticity before allowing its use ## Example: cross-chain attestation verification Let's walk through a conceptual example of verifying an Ethereum Attestation Service (EAS) attestation across chains. -EAS is a [predeploy](/stack/interop/predeploy) in the OP Stack for making attestations on or off-chain about anything. +EAS is a [predeploy](/interop/predeploy) in the OP Stack for making attestations on or off-chain about anything. ### Source chain: creating an attestation @@ -107,7 +107,7 @@ sequenceDiagram 3. The attestation verifier calls `validateMessage()` on the `CrossL2Inbox` contract, passing the attestation identifier and a hash of the event data. -4. The [`CrossL2Inbox`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol) contract interacts with the [`OP-Supervisor`](/stack/interop/op-supervisor) service to check if the specified log exists on the source chain. +4. The [`CrossL2Inbox`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol) contract interacts with the [`OP-Supervisor`](/interop/op-supervisor) service to check if the specified log exists on the source chain. 5. The `OP-Supervisor` confirms the validity of the log to the `CrossL2Inbox` contract. @@ -153,7 +153,7 @@ flowchart TD ## Important considerations -* This feature works between chains within the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster). +* This feature works between chains within the [Superchain interop cluster](/interop/explainer#superchain-interop-cluster). * The same functionality can be used on a single chain (for example, to maintain a consistent architecture). ### Handling validation failures @@ -220,5 +220,5 @@ This diagram compares the two approaches for cross-chain communication: ## Next steps * [Build a revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Learn how to [pass messages between blockchains](/stack/interop/tutorials/message-passing) -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain +* Learn how to [pass messages between blockchains](/interop/tutorials/message-passing) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain diff --git a/pages/stack/interop/reorg.mdx b/pages/interop/reorg.mdx similarity index 100% rename from pages/stack/interop/reorg.mdx rename to pages/interop/reorg.mdx diff --git a/pages/stack/interop/superchain-erc20.mdx b/pages/interop/superchain-erc20.mdx similarity index 93% rename from pages/stack/interop/superchain-erc20.mdx rename to pages/interop/superchain-erc20.mdx index 92fb96151..e71128de4 100644 --- a/pages/stack/interop/superchain-erc20.mdx +++ b/pages/interop/superchain-erc20.mdx @@ -28,7 +28,7 @@ import { Callout } from 'nextra/components' -SuperchainERC20s can be deployed on any chain, but will only be interoperable within the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster). +SuperchainERC20s can be deployed on any chain, but will only be interoperable within the [Superchain interop cluster](/interop/explainer#superchain-interop-cluster). # SuperchainERC20 @@ -124,7 +124,7 @@ Setting this up in advance ensures tokens will benefit from interop when it beco Add this after the tutorial is written - For detailed, step-by-step instructions on implementing SuperchainERC20, refer to [Deploy assets using SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20). + For detailed, step-by-step instructions on implementing SuperchainERC20, refer to [Deploy assets using SuperchainERC20](/interop/tutorials/deploy-superchain-erc20). */} @@ -140,6 +140,6 @@ Setting this up in advance ensures tokens will benefit from interop when it beco ## Next steps -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain. -* Learn about [other token standards that can benefit from Superchain interop](/stack/interop/compatible-tokens). -* Learn how to [modify an existing ERC20 contract](/stack/interop/tutorials/custom-superchain-erc20) to make it interoperable within the Superchain. +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain. +* Learn about [other token standards that can benefit from Superchain interop](/interop/compatible-tokens). +* Learn how to [modify an existing ERC20 contract](/interop/tutorials/custom-superchain-erc20) to make it interoperable within the Superchain. diff --git a/pages/stack/interop/superchain-weth.mdx b/pages/interop/superchain-weth.mdx similarity index 95% rename from pages/stack/interop/superchain-weth.mdx rename to pages/interop/superchain-weth.mdx index 78bd28967..dc87b7940 100644 --- a/pages/stack/interop/superchain-weth.mdx +++ b/pages/interop/superchain-weth.mdx @@ -38,7 +38,7 @@ InteroperableETH enables seamless ETH transfers across Superchain blockchains. I * [`SuperchainWETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol): A bridge contract that facilitates ETH transfers between Superchain blockchains. * [`ETHLiquidity`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/ETHLiquidity.sol): A liquidity provider for ETH transfers. `SuperchainWETH` uses this contract as a liquidity repository to ensure ETH availability on the destination chain. -* [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol): A messaging contract that [facilitates cross-chain communication](/stack/interop/message-passing). +* [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol): A messaging contract that [facilitates cross-chain communication](/interop/message-passing). Superchain ETH deposits ETH into the `ETHLiquidity` contract on the source chain and withdraws an equivalent amount on the destination chain. This mechanism improves capital efficiency and eliminates liquidity fragmentation and poor user experiences caused by asset wrapping or reliance on liquidity pools. @@ -97,7 +97,7 @@ sequenceDiagram 2. `SuperchainWETH` transfers the specified ETH amount to `ETHLiquidity`, removing it from circulation on the source chain. -3. `SuperchainWETH` on the source chain sends a [`relayETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol#L125-L145) message to `SuperchainWETH` on the destination chain using the [`L2ToL2CrossDomainMessenger`](/stack/interop/message-passing). +3. `SuperchainWETH` on the source chain sends a [`relayETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol#L125-L145) message to `SuperchainWETH` on the destination chain using the [`L2ToL2CrossDomainMessenger`](/interop/message-passing). #### Executing message @@ -127,7 +127,7 @@ This behavior differs from [standard ETH transfers](https://docs.base.org/learn/ Every ETH in circulation on the Superchain—excluding ETH held by `ETHLiquidity`—must be backed by ETH on L1. -This is enforced by a lockbox contract on L1, which holds all ETH bridged to [Superchain interop cluster chains](/stack/interop/explainer#superchain-interop-cluster) that has not yet been withdrawn. +This is enforced by a lockbox contract on L1, which holds all ETH bridged to [Superchain interop cluster chains](/interop/explainer#superchain-interop-cluster) that has not yet been withdrawn. New ETH can only be minted on L2 when it is locked on L1, and it is burned on L2 before it can be released from the lockbox. Here is an example of how this works. @@ -163,5 +163,5 @@ Here is an example of how this works. ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain. -* Learn about [SuperchainERC20](/stack/interop/superchain-erc20). -* Practice [transferring ETH across chains using Superchain interop](/stack/interop/tutorials/bridge-crosschain-eth). +* Learn about [SuperchainERC20](/interop/superchain-erc20). +* Practice [transferring ETH across chains using Superchain interop](/interop/tutorials/bridge-crosschain-eth). diff --git a/pages/stack/interop/tools.mdx b/pages/interop/tools.mdx similarity index 58% rename from pages/stack/interop/tools.mdx rename to pages/interop/tools.mdx index cd10b9e6f..a9ab3b773 100644 --- a/pages/stack/interop/tools.mdx +++ b/pages/interop/tools.mdx @@ -22,10 +22,10 @@ import { Card, Cards } from 'nextra/components' Documentation covering Interop devnet, Supersim in the Interop section of the OP Stack ecosystem. - } /> + } /> - } /> + } /> - } /> + } /> diff --git a/pages/stack/interop/tools/_meta.json b/pages/interop/tools/_meta.json similarity index 100% rename from pages/stack/interop/tools/_meta.json rename to pages/interop/tools/_meta.json diff --git a/pages/stack/interop/tools/devnet.mdx b/pages/interop/tools/devnet.mdx similarity index 98% rename from pages/stack/interop/tools/devnet.mdx rename to pages/interop/tools/devnet.mdx index d7a37e303..75fcc3ffd 100644 --- a/pages/stack/interop/tools/devnet.mdx +++ b/pages/interop/tools/devnet.mdx @@ -116,10 +116,10 @@ Alternatively block explorers per chain can be found below: Superchain cross-domain messages require two transactions. The first transaction creates an initiating message on the source chain. The second transaction creates an executing message on the destination chain. -To simplify user experience, the Superchain interop devnet has a relayer running that will automatically execute the second transaction. If your transaction does not get relayed or you prefer to relay manually you can do so by following this [tutorial](https://docs.optimism.io/stack/interop/tutorials/message-passing#implement-manual-message-relaying). +To simplify user experience, the Superchain interop devnet has a relayer running that will automatically execute the second transaction. If your transaction does not get relayed or you prefer to relay manually you can do so by following this [tutorial](https://docs.optimism.io/interop/tutorials/message-passing#implement-manual-message-relaying). ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* View more [interop tutorials](/stack/interop/tutorials) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* View more [interop tutorials](/interop/tutorials) diff --git a/pages/stack/interop/tools/rc-alpha.mdx b/pages/interop/tools/rc-alpha.mdx similarity index 95% rename from pages/stack/interop/tools/rc-alpha.mdx rename to pages/interop/tools/rc-alpha.mdx index 3461b91cc..310625745 100644 --- a/pages/stack/interop/tools/rc-alpha.mdx +++ b/pages/interop/tools/rc-alpha.mdx @@ -27,7 +27,7 @@ import { Callout, Tabs, Steps } from 'nextra/components' - Release Candidate - Alpha is meant only for protocol testing. If you're an application developer looking to test your interop-enabled application we recommend using the [Superchain interop devnet](https://docs.optimism.io/stack/interop/tools/devnet). + Release Candidate - Alpha is meant only for protocol testing. If you're an application developer looking to test your interop-enabled application we recommend using the [Superchain interop devnet](https://docs.optimism.io/interop/tools/devnet). ## Interop RC Alpha 0 @@ -76,5 +76,5 @@ import { Callout, Tabs, Steps } from 'nextra/components' ## Next steps * Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain -* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain -* View more [interop tutorials](/stack/interop/tutorials) +* Deploy a [SuperchainERC20](/interop/tutorials/deploy-superchain-erc20) to the Superchain +* View more [interop tutorials](/interop/tutorials) diff --git a/pages/stack/interop/tools/supersim.mdx b/pages/interop/tools/supersim.mdx similarity index 100% rename from pages/stack/interop/tools/supersim.mdx rename to pages/interop/tools/supersim.mdx diff --git a/pages/interop/tutorials.mdx b/pages/interop/tutorials.mdx new file mode 100644 index 000000000..c49f12fec --- /dev/null +++ b/pages/interop/tutorials.mdx @@ -0,0 +1,45 @@ +--- +title: Interop tutorials +description: Documentation covering Interop related tutorials. +lang: en-US +content_type: landing-page +topic: interop-tutorials +personas: + - protocol-developer + - app-developer +categories: + - protocol + - interoperability + - cross-chain-messaging + - tutorial +is_imported_content: 'false' +--- + +import { Card, Cards } from 'nextra/components' + +# Interop tutorials + +Documentation covering Interop related tutorials. + + + } /> + + } /> + + } /> + + } /> + + } /> + + } /> + + } /> + + } /> + + } /> + + } /> + + diff --git a/pages/stack/interop/tutorials/_meta.json b/pages/interop/tutorials/_meta.json similarity index 100% rename from pages/stack/interop/tutorials/_meta.json rename to pages/interop/tutorials/_meta.json diff --git a/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx b/pages/interop/tutorials/bridge-crosschain-eth.mdx similarity index 94% rename from pages/stack/interop/tutorials/bridge-crosschain-eth.mdx rename to pages/interop/tutorials/bridge-crosschain-eth.mdx index 4d44a695f..d97ed8383 100644 --- a/pages/stack/interop/tutorials/bridge-crosschain-eth.mdx +++ b/pages/interop/tutorials/bridge-crosschain-eth.mdx @@ -30,14 +30,14 @@ import { AutorelayCallout } from '@/components/AutorelayCallout' This tutorial provides step-by-step instructions for how to send ETH from one chain in the Superchain interop cluster to another. For a conceptual overview, - see the [interoperable ETH explainer](/stack/interop/superchain-weth). + see the [interoperable ETH explainer](/interop/superchain-weth). ## Overview Crosschain ETH transfers in the Superchain are facilitated through the [SuperchainWETH](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol) contract. This tutorial walks through how to send ETH from one chain to another. -You can do this on [Supersim](/stack/interop/tools/supersim), [the Interop devnet](/stack/interop/tools/devnet), or production once it is released. +You can do this on [Supersim](/interop/tools/supersim), [the Interop devnet](/interop/tools/devnet), or production once it is released. ### What you'll build @@ -83,7 +83,7 @@ The tutorial uses these primary tools: ### Configure the network - You can run this tutorial either with [Supersim](/stack/interop/tools/supersim) running locally, or using the [Interop devnet](/stack/interop/tools/devnet). + You can run this tutorial either with [Supersim](/interop/tools/supersim) running locally, or using the [Interop devnet](/interop/tools/devnet). Select the correct tab and follow the directions. @@ -285,7 +285,7 @@ The tutorial uses these primary tools: ## Next steps -* Check out the [SuperchainWETH guide](/stack/interop/superchain-weth) for more information. +* Check out the [SuperchainWETH guide](/interop/superchain-weth) for more information. * Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy your token across the Superchain. -* Review the [Superchain interop explainer](/stack/interop/explainer) for answers to common questions about interoperability. +* Review the [Superchain interop explainer](/interop/explainer) for answers to common questions about interoperability. diff --git a/pages/stack/interop/tutorials/contract-calls.mdx b/pages/interop/tutorials/contract-calls.mdx similarity index 100% rename from pages/stack/interop/tutorials/contract-calls.mdx rename to pages/interop/tutorials/contract-calls.mdx diff --git a/pages/stack/interop/tutorials/custom-superchain-erc20.mdx b/pages/interop/tutorials/custom-superchain-erc20.mdx similarity index 96% rename from pages/stack/interop/tutorials/custom-superchain-erc20.mdx rename to pages/interop/tutorials/custom-superchain-erc20.mdx index 24a80ff80..0c8c25193 100644 --- a/pages/stack/interop/tutorials/custom-superchain-erc20.mdx +++ b/pages/interop/tutorials/custom-superchain-erc20.mdx @@ -30,7 +30,7 @@ import { Steps } from 'nextra/components' ## Overview -This guide explains how to upgrade an ERC20 to a [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) that can then teleport across the Superchain interop cluster quickly and safely using the [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) contract. For more information on how it works, [see the explainer](/stack/interop/superchain-erc20). +This guide explains how to upgrade an ERC20 to a [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) that can then teleport across the Superchain interop cluster quickly and safely using the [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) contract. For more information on how it works, [see the explainer](/interop/superchain-erc20). To ensure fungibility across chains, `SuperchainERC20` assets must have the same contract address on all chains. This requirement abstracts away the complexity of cross-chain validation. Achieving this requires deterministic deployment methods. There are [many ways to do this](https://github.com/Arachnid/deterministic-deployment-proxy). Here we will use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit). @@ -106,7 +106,7 @@ contract MySuperchainERC20 is ERC20, Ownable, IERC7802 { ### Implement burn and mint functions -There are two functions we need to implement: `CrosschainMint` and `CrosschainBurn`. These two functions allow two chains to bridge a token by burning them on one chain and mint them on another. Read more about these functions in our [SuperchainERC20 docs](/stack/interop/superchain-erc20). +There are two functions we need to implement: `CrosschainMint` and `CrosschainBurn`. These two functions allow two chains to bridge a token by burning them on one chain and mint them on another. Read more about these functions in our [SuperchainERC20 docs](/interop/superchain-erc20). Here's what our contract looks like once we've implemented the functions: @@ -161,7 +161,7 @@ contract MySuperchainERC20 is ERC20, Ownable, IERC7802 { -For more details [see the explainer](/stack/interop/superchain-erc20). +For more details [see the explainer](/interop/superchain-erc20). ## Prerequisites @@ -285,10 +285,10 @@ The tutorial uses these primary tools: -For more details [see the explainer](/stack/interop/superchain-erc20). +For more details [see the explainer](/interop/superchain-erc20). ## Next steps * Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy your token across the Superchain. * If you'd like a guided walkthrough, check out our [tutorial video](https://x.com/i/status/1866095114374045969) instead. -* Review the [Superchain Interop Explainer](/stack/interop/explainer) for answers to common questions about interoperability. +* Review the [Superchain Interop Explainer](/interop/explainer) for answers to common questions about interoperability. diff --git a/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx b/pages/interop/tutorials/deploy-superchain-erc20.mdx similarity index 94% rename from pages/stack/interop/tutorials/deploy-superchain-erc20.mdx rename to pages/interop/tutorials/deploy-superchain-erc20.mdx index daab75827..4ce59b162 100644 --- a/pages/stack/interop/tutorials/deploy-superchain-erc20.mdx +++ b/pages/interop/tutorials/deploy-superchain-erc20.mdx @@ -34,7 +34,7 @@ import { Steps } from 'nextra/components' 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. 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). -For more information on how it works, [see the explainer](/stack/interop/superchain-erc20). +For more information on how it works, [see the explainer](/interop/superchain-erc20). Note that bridging assets through the Superchain using `SuperchainTokenBridge` *never* affects the total supply of your asset. The supply remains fixed, bridging only changes the chain on which the asset is located. @@ -82,8 +82,8 @@ The tutorial uses these primary tools: ### Prepare for deployment - The Starter Kit already deploys a `SuperchainERC20` token to [Supersim](/stack/interop/tools/supersim). - Here we will deploy it to the [Interop devnet](/stack/interop/tools/devnet). + The Starter Kit already deploys a `SuperchainERC20` token to [Supersim](/interop/tools/supersim). + Here we will deploy it to the [Interop devnet](/interop/tools/devnet). 1. Edit `packages/contracts/foundry.toml` to add the RPC endpoints for the devnet (add the bottom two rows). @@ -122,7 +122,7 @@ The tutorial uses these primary tools: | decimals | Number of decimal places | 18 | | (1) This should be an address you control (for which you know the private key), which has some ETH on the devnets. - [See here](/stack/interop/tools/devnet#sending-eth-to-the-interop-devnets) to add ETH to the devnets. + [See here](/interop/tools/devnet#sending-eth-to-the-interop-devnets) to add ETH to the devnets. Here is a sample `packages/contracts/configs/deploy-config.toml` file you can use, as long as you update `owner_address`. @@ -193,4 +193,4 @@ The tutorial uses these primary tools: * Learn how to [transfer tokens between chains inside the Superchain](transfer-superchainERC20). * Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy your token across the Superchain. * Explore the [SuperchainERC20 specifications](https://specs.optimism.io/interop/token-bridging.html?utm_source=op-docs&utm_medium=docs) for in-depth implementation details. -* Review the [Superchain Interop Explainer](/stack/interop/explainer) for answers to common questions about interoperability. +* Review the [Superchain Interop Explainer](/interop/explainer) for answers to common questions about interoperability. diff --git a/pages/stack/interop/tutorials/event-contests.mdx b/pages/interop/tutorials/event-contests.mdx similarity index 97% rename from pages/stack/interop/tutorials/event-contests.mdx rename to pages/interop/tutorials/event-contests.mdx index 705ff0a49..a408a332a 100644 --- a/pages/stack/interop/tutorials/event-contests.mdx +++ b/pages/interop/tutorials/event-contests.mdx @@ -32,7 +32,7 @@ We showcase cross chain composability through the implementation of contests. Le ## How it works -Unlike [TicTacToe](/stack/interop/tutorials/event-reads) which is deployed on every participating chain, the contests are deployed on a single L2, behaving like an application-specific OP Stack chain rather than a horizontally scaled app. +Unlike [TicTacToe](/interop/tutorials/event-reads) which is deployed on every participating chain, the contests are deployed on a single L2, behaving like an application-specific OP Stack chain rather than a horizontally scaled app. ### Implement contests diff --git a/pages/stack/interop/tutorials/event-reads.mdx b/pages/interop/tutorials/event-reads.mdx similarity index 96% rename from pages/stack/interop/tutorials/event-reads.mdx rename to pages/interop/tutorials/event-reads.mdx index b91c0372d..78d502339 100644 --- a/pages/stack/interop/tutorials/event-reads.mdx +++ b/pages/interop/tutorials/event-reads.mdx @@ -209,4 +209,4 @@ Leveraging superchain interop, we can build new types of horizontally scalable c * As new chains are added to the superchain, this contract can be installed by anyone and immediately playable with no necessary code changes. The frontend simply needs to react the addition of a new chain. * The concept of a "chain" can be completely abstracted away from the user. When connecting their wallet, the frontend can simply pick the chain which the user has funds on with the lowest gas fees. -* Event reading enables a new level of composability for cross-chain interactions. Imagine [contests](/stack/interop/tutorials/event-contests) contract that resolves based on the outcome of a TicTacToe game via the `GameWon` or `GameLost` event without the need for a trusted oracle, nor permission or native integration with the TicTacToe contract. +* Event reading enables a new level of composability for cross-chain interactions. Imagine [contests](/interop/tutorials/event-contests) contract that resolves based on the outcome of a TicTacToe game via the `GameWon` or `GameLost` event without the need for a trusted oracle, nor permission or native integration with the TicTacToe contract. diff --git a/pages/stack/interop/tutorials/message-passing.mdx b/pages/interop/tutorials/message-passing.mdx similarity index 94% rename from pages/stack/interop/tutorials/message-passing.mdx rename to pages/interop/tutorials/message-passing.mdx index 4c461a248..569e6affc 100644 --- a/pages/stack/interop/tutorials/message-passing.mdx +++ b/pages/interop/tutorials/message-passing.mdx @@ -52,7 +52,7 @@ message passing system that enables different chains to interact with each other This tutorial provides step-by-step instructions for implementing cross-chain messaging. For a conceptual overview, - see the [message passing explainer](/stack/interop/message-passing). + see the [message passing explainer](/interop/message-passing). In this tutorial, you will learn how to use the [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) contract to pass messages between interoperable blockchains. @@ -113,7 +113,7 @@ For development purposes, we'll first use autorelay mode to handle message execu ### Setting up test networks - If you attempt to run these steps with the [devnet](/stack/interop/tools/devnet), you *must* Send the executing message yourself, as explained [here](#implement-manual-message-relaying). + If you attempt to run these steps with the [devnet](/interop/tools/devnet), you *must* Send the executing message yourself, as explained [here](#implement-manual-message-relaying). 1. In the directory where Supersim is installed, start it with autorelay. @@ -553,13 +553,13 @@ In this section we change `Greeter.sol` to emit a separate event in it receives ### Using devnet - The same contracts are deployed on [the devnet](/stack/interop/tools/devnet). + The same contracts are deployed on [the devnet](/interop/tools/devnet). You can relay messages in exactly the same way you'd do it on Supersim. - | Contract | Network | Address | - | ---------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | `Greeter` | [Devnet 1](/stack/interop/tools/devnet#interop-devnet-1) | [`0x1A183FCf61053B7dcd2322BbE766f7E1946d3718`](https://sid.testnet.routescan.io/address/0x1A183FCf61053B7dcd2322BbE766f7E1946d3718) | - | `GreetingSender` | [Devnet 0](/stack/interop/tools/devnet#interop-devnet-1) | [`0x9De9f84a4EB3616B44CF1d68cD1A9098Df6cB25f`](https://sid.testnet.routescan.io/address/0x9De9f84a4EB3616B44CF1d68cD1A9098Df6cB25f/contract/420120000/readContract?chainid=420120000) | + | Contract | Network | Address | + | ---------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `Greeter` | [Devnet 1](/interop/tools/devnet#interop-devnet-1) | [`0x1A183FCf61053B7dcd2322BbE766f7E1946d3718`](https://sid.testnet.routescan.io/address/0x1A183FCf61053B7dcd2322BbE766f7E1946d3718) | + | `GreetingSender` | [Devnet 0](/interop/tools/devnet#interop-devnet-1) | [`0x9De9f84a4EB3616B44CF1d68cD1A9098Df6cB25f`](https://sid.testnet.routescan.io/address/0x9De9f84a4EB3616B44CF1d68cD1A9098Df6cB25f/contract/420120000/readContract?chainid=420120000) | To modify the program to relay messages on devnet, follow these steps: @@ -617,6 +617,6 @@ In this section we change `Greeter.sol` to emit a separate event in it receives ## Next steps -* Review the [Superchain Interop Explainer](/stack/interop/explainer) for answers to common questions about interoperability. -* Read the [Message Passing Explainer](/stack/interop/message-passing) to understand what happens "under the hood". +* Review the [Superchain Interop Explainer](/interop/explainer) for answers to common questions about interoperability. +* Read the [Message Passing Explainer](/interop/message-passing) to understand what happens "under the hood". * Write a revolutionary app that uses multiple blockchains within the Superchain. diff --git a/pages/stack/interop/tutorials/relay-messages-cast.mdx b/pages/interop/tutorials/relay-messages-cast.mdx similarity index 98% rename from pages/stack/interop/tutorials/relay-messages-cast.mdx rename to pages/interop/tutorials/relay-messages-cast.mdx index 40d7e4dc2..09fa49d10 100644 --- a/pages/stack/interop/tutorials/relay-messages-cast.mdx +++ b/pages/interop/tutorials/relay-messages-cast.mdx @@ -208,4 +208,4 @@ This is obviously very tedious to do by hand 😅. Here are some alternatives: * Check out the collection of [Supersim tutorials](/app-developers/tutorials/supersim) for more resources on building with Interop. * Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy your token across the Superchain. -* Review the [Superchain Interop Explainer](/stack/interop/explainer) for answers to common questions about interoperability. +* Review the [Superchain Interop Explainer](/interop/explainer) for answers to common questions about interoperability. diff --git a/pages/stack/interop/tutorials/relay-messages-viem.mdx b/pages/interop/tutorials/relay-messages-viem.mdx similarity index 98% rename from pages/stack/interop/tutorials/relay-messages-viem.mdx rename to pages/interop/tutorials/relay-messages-viem.mdx index 3c05a8628..95da62a26 100644 --- a/pages/stack/interop/tutorials/relay-messages-viem.mdx +++ b/pages/interop/tutorials/relay-messages-viem.mdx @@ -177,7 +177,7 @@ console.log(`Balance on OPChainB: ${balance}`); ## Next steps * Check out the collection of [Supersim tutorials](/app-developers/tutorials/supersim) for more resources on building with Interop. * Use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit) to deploy your token across the Superchain. -* Review the [Superchain Interop Explainer](/stack/interop/explainer) for answers to common questions about interoperability. +* Review the [Superchain Interop Explainer](/interop/explainer) for answers to common questions about interoperability. ## Full code snippet diff --git a/pages/stack/interop/tutorials/transfer-superchainERC20.mdx b/pages/interop/tutorials/transfer-superchainERC20.mdx similarity index 95% rename from pages/stack/interop/tutorials/transfer-superchainERC20.mdx rename to pages/interop/tutorials/transfer-superchainERC20.mdx index 0f9aa4f64..d739ff809 100644 --- a/pages/stack/interop/tutorials/transfer-superchainERC20.mdx +++ b/pages/interop/tutorials/transfer-superchainERC20.mdx @@ -35,7 +35,7 @@ This guide shows how to transfer `SuperchainERC20` tokens between chains program Note that this tutorial provides step-by-step instructions for transferring `SuperchainERC20` tokens using code. -* For a detailed behind-the-scenes explanation, [see the explainer](/stack/interop/superchain-erc20#how-it-works). +* For a detailed behind-the-scenes explanation, [see the explainer](/interop/superchain-erc20#how-it-works). * For a sample UI that bridges a `SuperchainERC20` token, [see here](https://interop-alpha-app.superchain.tools/). ## Overview @@ -85,7 +85,7 @@ The tutorial uses these primary tools: ### Preparation You need onchain `SuperchainERC20` tokens. - You can [deploy your own token](./deploy-superchain-erc20), but in this tutorial we will use [`CustomSuperchainToken`](https://sid.testnet.routescan.io/address/0xF3Ce0794cB4Ef75A902e07e5D2b75E4D71495ee8), existing `SuperchainERC20` token on the [Interop devnet](/stack/interop/tools/devnet). + You can [deploy your own token](./deploy-superchain-erc20), but in this tutorial we will use [`CustomSuperchainToken`](https://sid.testnet.routescan.io/address/0xF3Ce0794cB4Ef75A902e07e5D2b75E4D71495ee8), existing `SuperchainERC20` token on the [Interop devnet](/interop/tools/devnet). 1. Create environment variables for the RPC endpoints for the blockchains and the token address. @@ -226,6 +226,6 @@ The tutorial uses these primary tools: ## Next steps -* Read the [Superchain Interop Explainer](/stack/interop/explainer#faqs) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). -* Learn [how this works](/stack/interop/superchain-erc20). +* Read the [Superchain Interop Explainer](/interop/explainer#faqs) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). +* Learn [how this works](/interop/superchain-erc20). * Use [Supersim](/app-developers/tools/supersim), a local dev environment that simulates Superchain interop for testing applications against a local version of the Superchain. diff --git a/pages/stack/interop.mdx b/pages/stack/interop.mdx deleted file mode 100644 index 5b7da9bb5..000000000 --- a/pages/stack/interop.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Interop -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 -content_type: landing-page -topic: interop -personas: - - protocol-developer - - app-developer -categories: - - testnet - - protocol - - cross-chain-messaging - - interoperability - - superchain-ecosystem - - token-standard - - message-passing -is_imported_content: 'false' ---- - -import { Card, Cards } from 'nextra/components' - -# Interop - -Documentation covering explainers and tutorials for using Superchain interop. - - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - }/> - diff --git a/pages/stack/interop/tutorials.mdx b/pages/stack/interop/tutorials.mdx deleted file mode 100644 index 5d6a900c2..000000000 --- a/pages/stack/interop/tutorials.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Interop tutorials -description: Documentation covering Interop related tutorials. -lang: en-US -content_type: landing-page -topic: interop-tutorials -personas: - - protocol-developer - - app-developer -categories: - - protocol - - interoperability - - cross-chain-messaging - - tutorial -is_imported_content: 'false' ---- - -import { Card, Cards } from 'nextra/components' - -# Interop tutorials - -Documentation covering Interop related tutorials. - - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - } /> - - diff --git a/pages/superchain/superchain-explainer.mdx b/pages/superchain/superchain-explainer.mdx index a4f97fbe1..4d2df052d 100644 --- a/pages/superchain/superchain-explainer.mdx +++ b/pages/superchain/superchain-explainer.mdx @@ -25,7 +25,7 @@ import { Callout } from 'nextra/components' **Superchain interop is in active development!** - Superchain interop enables trust-minimized, low-latency, cross-chain composability. Superchain interop is in active development and is available for testing. [Learn more about Superchain Interop](https://docs.optimism.io/stack/interop/explainer). + Superchain interop enables trust-minimized, low-latency, cross-chain composability. Superchain interop is in active development and is available for testing. [Learn more about Superchain Interop](https://docs.optimism.io/interop/explainer). The next major scalability improvement to the OP Stack after Bedrock is to introduce the concept of *a Superchain*: a network of chains that share bridging, decentralized governance, upgrades, a communication layer and more—all built on the OP Stack. diff --git a/public/_redirects b/public/_redirects index bfd9a31b8..427cebbea 100644 --- a/public/_redirects +++ b/public/_redirects @@ -171,6 +171,32 @@ /get-started/design-principles /stack/design-principles /index / +/stack/interop/tools /interop/tools +/stack/interop/op-supervisor /interop/op-supervisor +/stack/interop/tools/supersim /interop/tools/supersim +/stack/interop/tools/devnet /interop/tools/devnet +/stack/interop/tools/rc-alpha /interop/tools/rc-alpha +/stack/interop/compatible-tokens /interop/compatible-tokens +/stack/interop/reading-logs /interop/reading-logs +/stack/interop/message-passing /interop/message-passing +/stack/interop/tutorials /interop/tutorials +/stack/interop/reorg /interop/reorg +/stack/interop/superchain-erc20 /interop/superchain-erc20 +/stack/interop/tutorials/transfer-superchainERC20 /interop/tutorials/transfer-superchainERC20 +/stack/interop/tutorials/bridge-crosschain-eth /interop/tutorials/bridge-crosschain-eth +/stack/interop/tutorials/event-reads /interop/tutorials/event-reads +/stack/interop/tutorials/message-passing /interop/tutorials/message-passing +/stack/interop/tutorials/custom-superchain-erc20 /interop/tutorials/custom-superchain-erc20 +/stack/interop/tutorials/relay-messages-cast /interop/tutorials/relay-messages-cast +/stack/interop/tutorials/contract-calls /interop/tutorials/contract-calls +/stack/interop/tutorials/event-contests /interop/tutorials/event-contests +/stack/interop/tutorials/relay-messages-viem /interop/tutorials/relay-messages-viem +/stack/interop/tutorials/deploy-superchain-erc20 /interop/tutorials/deploy-superchain-erc20 +/stack/interop/predeploy /interop/predeploy +/stack/interop/explainer /interop/explainer +/stack/interop/interop-security /interop/interop-security +/stack/interop/superchain-weth /interop/superchain-weth + # ---------------------------------------------------------------------------- # Catch-all Rules (Keep at bottom) From fda0800dcbe956c253524f0850beb576a39f587b Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:20:06 -0700 Subject: [PATCH 02/10] Add newline file --- pages/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.mdx b/pages/index.mdx index d0fcde3d7..de65757a0 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -86,4 +86,4 @@ We've got you covered with these detailed guides to help you learn all about Opt } /> } /> - \ No newline at end of file + From 43767e71b816bbe81953734e1323c9f7b3844522 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:22:31 -0700 Subject: [PATCH 03/10] Fix links --- pages/app-developers/get-started.mdx | 2 +- pages/app-developers/starter-kit.mdx | 2 +- .../app-developers/tutorials/supersim/deposit-transactions.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/app-developers/get-started.mdx b/pages/app-developers/get-started.mdx index 3638c6980..d3228576e 100644 --- a/pages/app-developers/get-started.mdx +++ b/pages/app-developers/get-started.mdx @@ -50,7 +50,7 @@ The SuperchainERC20 Starter Kit allows you to focus on what to deploy, not how t | [Supersim](tools/supersim) | Local multi-chain testing environment for smart contracts. | | [Super CLI](https://github.com/ethereum-optimism/super-cli) | Command-line tool for seamless multichain app deployment and testing. | | [Superchain Relayer](https://github.com/ethereum-optimism/superchain-relayer) | UI for monitoring and managing cross-chain transactions. | -| [Interop Docs](/stack/interop) | Comprehensive Interop information in the Optimism Docs. | +| [Interop Docs](/interop) | Comprehensive Interop information in the Optimism Docs. | | [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) | Comprensive tool to build, launch, and grow your app on the Superchain. | ## Handy step-by-step guides diff --git a/pages/app-developers/starter-kit.mdx b/pages/app-developers/starter-kit.mdx index e04bb8e02..6b5953c79 100644 --- a/pages/app-developers/starter-kit.mdx +++ b/pages/app-developers/starter-kit.mdx @@ -162,4 +162,4 @@ For best security practices `SuperchainERC20Bridge` should be the only contract * Test your token deployment on multiple chains using [Supersim](/app-developers/tools/supersim) and run simple [end-to-end integration tests](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-e2e-tests). * For specific use cases, check out our guides for [bridging a SuperchainERC20 token to another chain](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-example-how-to-bridge-a-superchainerc20-token-to-another-chain) or [modifying an existing ERC20 contract to be interoperable](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#updating-an-erc20-contract-to-be-interoperable). -* Questions about Interop? Check out our collection of [interop guides](/stack/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). +* Questions about Interop? Check out our collection of [interop guides](/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). diff --git a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx index eb78db734..06418627c 100644 --- a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx +++ b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx @@ -107,5 +107,5 @@ We'll run through a sample deposit directly with the `OptimismPortal` using cast ## Next steps * See the [transaction guides](/app-developers/transactions) for more detailed information. -* Questions about Interop? Check out collection of [interop guides](/stack/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). +* Questions about Interop? Check out collection of [interop guides](/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). * For more info about how Superchain interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs&utm_medium=docs). From dcb58d8fc312a7750b8f1b83d72d9815f41995c8 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:26:00 -0700 Subject: [PATCH 04/10] Fix link again --- pages/app-developers/get-started.mdx | 2 +- pages/app-developers/starter-kit.mdx | 2 +- .../app-developers/tutorials/supersim/deposit-transactions.mdx | 2 +- public/_redirects | 1 + words.txt | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/app-developers/get-started.mdx b/pages/app-developers/get-started.mdx index d3228576e..2cf8292e6 100644 --- a/pages/app-developers/get-started.mdx +++ b/pages/app-developers/get-started.mdx @@ -50,7 +50,7 @@ The SuperchainERC20 Starter Kit allows you to focus on what to deploy, not how t | [Supersim](tools/supersim) | Local multi-chain testing environment for smart contracts. | | [Super CLI](https://github.com/ethereum-optimism/super-cli) | Command-line tool for seamless multichain app deployment and testing. | | [Superchain Relayer](https://github.com/ethereum-optimism/superchain-relayer) | UI for monitoring and managing cross-chain transactions. | -| [Interop Docs](/interop) | Comprehensive Interop information in the Optimism Docs. | +| [Interop Docs](/interop/explainer) | Comprehensive Interop information in the Optimism Docs. | | [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) | Comprensive tool to build, launch, and grow your app on the Superchain. | ## Handy step-by-step guides diff --git a/pages/app-developers/starter-kit.mdx b/pages/app-developers/starter-kit.mdx index 6b5953c79..dd9c329b2 100644 --- a/pages/app-developers/starter-kit.mdx +++ b/pages/app-developers/starter-kit.mdx @@ -162,4 +162,4 @@ For best security practices `SuperchainERC20Bridge` should be the only contract * Test your token deployment on multiple chains using [Supersim](/app-developers/tools/supersim) and run simple [end-to-end integration tests](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-e2e-tests). * For specific use cases, check out our guides for [bridging a SuperchainERC20 token to another chain](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-example-how-to-bridge-a-superchainerc20-token-to-another-chain) or [modifying an existing ERC20 contract to be interoperable](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#updating-an-erc20-contract-to-be-interoperable). -* Questions about Interop? Check out our collection of [interop guides](/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). +* Questions about Interop? Check out our collection of [interop guides](/interop/explainer) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). diff --git a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx index 06418627c..50d223cf5 100644 --- a/pages/app-developers/tutorials/supersim/deposit-transactions.mdx +++ b/pages/app-developers/tutorials/supersim/deposit-transactions.mdx @@ -107,5 +107,5 @@ We'll run through a sample deposit directly with the `OptimismPortal` using cast ## Next steps * See the [transaction guides](/app-developers/transactions) for more detailed information. -* Questions about Interop? Check out collection of [interop guides](/interop) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). +* Questions about Interop? Check out collection of [interop guides](/interop/explainer) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). * For more info about how Superchain interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html?utm_source=op-docs&utm_medium=docs). diff --git a/public/_redirects b/public/_redirects index 427cebbea..f2e49775f 100644 --- a/public/_redirects +++ b/public/_redirects @@ -196,6 +196,7 @@ /stack/interop/explainer /interop/explainer /stack/interop/interop-security /interop/interop-security /stack/interop/superchain-weth /interop/superchain-weth +/interop /interop/explainer # ---------------------------------------------------------------------------- diff --git a/words.txt b/words.txt index 37906a4fd..d0793a111 100644 --- a/words.txt +++ b/words.txt @@ -392,7 +392,6 @@ SUPERCHAIN Superchain superchain Superchain's -Superchainerc superchainerc Superlend Superloans From 604d3d1d7baf683762eb489b49e23bbf96c97069 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:28:02 -0700 Subject: [PATCH 05/10] Table fence fix --- pages/app-developers/get-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/app-developers/get-started.mdx b/pages/app-developers/get-started.mdx index 2cf8292e6..d2d431136 100644 --- a/pages/app-developers/get-started.mdx +++ b/pages/app-developers/get-started.mdx @@ -50,7 +50,7 @@ The SuperchainERC20 Starter Kit allows you to focus on what to deploy, not how t | [Supersim](tools/supersim) | Local multi-chain testing environment for smart contracts. | | [Super CLI](https://github.com/ethereum-optimism/super-cli) | Command-line tool for seamless multichain app deployment and testing. | | [Superchain Relayer](https://github.com/ethereum-optimism/superchain-relayer) | UI for monitoring and managing cross-chain transactions. | -| [Interop Docs](/interop/explainer) | Comprehensive Interop information in the Optimism Docs. | +| [Interop Docs](/interop/explainer) | Comprehensive Interop information in the Optimism Docs. | | [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) | Comprensive tool to build, launch, and grow your app on the Superchain. | ## Handy step-by-step guides From 3ae7bf96452fd56480cd94e996c668895fddc135 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:33:13 -0700 Subject: [PATCH 06/10] Revisions --- pages/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.mdx b/pages/index.mdx index de65757a0..25ab78067 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -35,7 +35,7 @@ Information about the Optimism Collective's governance, community, and mission c Superchain interoperability is (almost) here! Now you can build apps that work seamlessly across multiple OP chains with fast, simple asset transfers and cross-chain interactions - no complex bridges required. -Your users get a smoother experience while you build more powerful apps. [Discover how to build powerful multi-chain dApps](/interop/explainer) with Superchain interoperability. +Your users get a smoother experience while you build more powerful apps. [Discover how to build powerful multi-chain apps](/interop/explainer) with Superchain interoperability. } /> From 89d85be275e1a5b99cd31b290e789be1a0d1681d Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:48:44 -0700 Subject: [PATCH 07/10] Remove interop from stack nav --- pages/stack/_meta.json | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/stack/_meta.json b/pages/stack/_meta.json index 5c210ca3c..dccbe365d 100644 --- a/pages/stack/_meta.json +++ b/pages/stack/_meta.json @@ -24,7 +24,6 @@ "title": "Experimental", "type": "separator" }, - "interop": "Superchain interoperability", "beta-features": "Beta features", "research": "Research" } From 6bdde9bce26f3fb3ca9aad4c95a236649226e407 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Thu, 10 Apr 2025 14:54:15 -0700 Subject: [PATCH 08/10] Add homepage buttons and move interop getting started/starter kit --- pages/app-developers/get-started.mdx | 64 +---------- pages/app-developers/starter-kit.mdx | 150 +----------------------- pages/index.mdx | 5 +- pages/interop/_meta.json | 2 + pages/interop/get-started.mdx | 80 +++++++++++++ pages/interop/starter-kit.mdx | 166 +++++++++++++++++++++++++++ public/img/icons/sunny-smile.svg | 6 + public/img/icons/sunny.svg | 6 + 8 files changed, 270 insertions(+), 209 deletions(-) create mode 100644 pages/interop/get-started.mdx create mode 100644 pages/interop/starter-kit.mdx create mode 100644 public/img/icons/sunny-smile.svg create mode 100644 public/img/icons/sunny.svg diff --git a/pages/app-developers/get-started.mdx b/pages/app-developers/get-started.mdx index d2d431136..d65169df9 100644 --- a/pages/app-developers/get-started.mdx +++ b/pages/app-developers/get-started.mdx @@ -13,68 +13,10 @@ categories: - interoperability - standard-bridge - testnet -is_imported_content: 'false' +is_imported_content: 'true' --- -import { Cards, Card, Callout } from 'nextra/components' +import InteropGettingStarted from '@/pages/interop/get-started.mdx' -# Build interoperable apps on Superchain devnet + -Reimagine your app with Superchain Interop to deliver the unified UX your users expect. Hack on net-new, bold use cases on Interop devnet. - - - Explore the [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) to build, launch, and grow your app on the Superchain. - - -## Connect to Superchain Interop - -Select a network to build, test, and quickly iterate on interoperable apps. - -| Local network | Devnet | -| :-------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | -| Build and iterate on your apps with Supersim – a local multi-chain dev environment. | Deploy your app to devnet – a testnet developmental version – to conduct large-scale testing. | -|
  • RPC Endpoint: `local RPC URL`
  • Chain ID: `local chain ID`
  • Block explorer: TBD
|
  • RPC Endpoint: `devnet RPC URL`
  • Chain ID: `devnet chain ID`
  • Block explorer: TBD
| -| [Supersim](tutorials/supersim) | [Devnet Docs](/interop/tools/devnet) | - -## Deploy your app to devnet in minutes - -The SuperchainERC20 Starter Kit allows you to focus on what to deploy, not how to deploy. It's a streamlined toolkit that simplifies deploying your interoperable app, letting you focus on your core business logic. - -* [Get the Starter Kit](starter-kit) - -## Tools & resources for building interoperable apps - -| Tool | Description | -| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| [Superchain Faucet](https://console.optimism.io/faucet?utm_source=op-docs\&utm_medium=docs) | One stop shop to grab testnet ETH for any Superchain network. | -| [Supersim](tools/supersim) | Local multi-chain testing environment for smart contracts. | -| [Super CLI](https://github.com/ethereum-optimism/super-cli) | Command-line tool for seamless multichain app deployment and testing. | -| [Superchain Relayer](https://github.com/ethereum-optimism/superchain-relayer) | UI for monitoring and managing cross-chain transactions. | -| [Interop Docs](/interop/explainer) | Comprehensive Interop information in the Optimism Docs. | -| [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) | Comprensive tool to build, launch, and grow your app on the Superchain. | - -## Handy step-by-step guides - - - } /> - - } /> - - } /> - - } /> - - -## Discover and build net-new use cases with Superchain Interop - -There is so much more than just bridge abstraction. Hack on the various cutting-edge applications that are uniquely enabled by Superchain Interop. Here are some ideas to get you started: - -| Superloans | Superlend | SuperCDP | -| :--------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------- | -| Use collateral on ChainA and ChainB to execute an arbitrage opportunity on ChainA. | Deposit ETH into lending protocols across chains for optimal yield, with automatic rebalancing based on best rates. | Collateralized crosschain debt protocol that holds assets and issues a SuperchainERC20 on user preferred chains. | - -## Join app dev community and build together - -Join the OP Labs team and fellow Superchain Interop builders to share ideas, provide feedback, ask questions, and get the [support](https://github.com/ethereum-optimism/developers/discussions) you need. - -* [Join Discord community](https://discord.gg/optimism) diff --git a/pages/app-developers/starter-kit.mdx b/pages/app-developers/starter-kit.mdx index dd9c329b2..e1b25ae16 100644 --- a/pages/app-developers/starter-kit.mdx +++ b/pages/app-developers/starter-kit.mdx @@ -13,153 +13,9 @@ categories: - standard-bridge - mainnet - superchain-erc20 -is_imported_content: 'false' +is_imported_content: 'true' --- -import { Callout, Steps } from 'nextra/components' -import Image from 'next/image' -import { Tabs } from 'nextra/components' +import InteropStarterKit from '@/pages/interop/starter-kit.mdx' - -The SuperchainERC20 standard is ready for production use with active Mainnet deployments. -Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development. - - -# Deploying a SuperchainERC20 (Starter Kit) - -The [SuperchainERC20 Starter Kit](https://github.com/ethereum-optimism/superchainerc20-starter) is a development toolkit designed to simplify the creation, deployment, and testing of SuperchainERC20 tokens. It leverages cross-chain interoperability for the deployment of ERC20 tokens that can be used across different blockchains in the Superchain ecosystem. - -## How it works - -Here's a breakdown of what's under the hood: - -* **Cross-Chain Interoperability**: SuperchainERC20 tokens can move across multiple chains. This is possible by using the [IERC-7802](https://eips.ethereum.org/EIPS/eip-7802) interface, which lets tokens be minted on one chain and burned on another to maintain a consistent supply. - -* **Superchain Network**: The Superchain is a network of connected blockchains, allowing smooth data and asset flow. By using Optimism's scaling solutions, the Superchain reduces gas fees and speeds up transactions. - -* **Deployment**: The kit helps deploy SuperchainERC20 tokens on Ethereum-compatible chains, including setting up contracts, minting, burning, and cross-chain communication. - -* **Testing**: Test scripts simulate real token transfers across chains to ensure everything works properly before going live. - -## Setup - - - ### Install `foundry` - - `supersim` requires `anvil` to be installed. - - Follow the [Foundry toolchain](https://book.getfoundry.sh/getting-started/installation) guide for detailed instructions. - - ### Clone the repo - - Next, you need to clone and navigate to the repo: - - ```sh - git clone https://github.com/ethereum-optimism/superchainerc20-starter.git - cd superchainerc20-starter - ``` - - ### Install dependencies - - Install project dependencies using `pnpm`: - - ```sh - pnpm i - ``` - - ### Initialize .env files - - ```sh - pnpm init:env - ``` - - ### Start the development environment - - This command will: - - * Start the `supersim` local development environment - * Deploy the smart contracts to the test networks - * Launch the example frontend application - - ```sh - pnpm dev - ``` - -
- - Sanity check - - Browse to [the console](http://localhost:5173/), mint some tokens and transfer them. - -
-
- -## Deploy SuperchainERC20s - - - ### Configure RPC urls - - This repository includes a script to automatically fetch the public RPC URLs for each chain listed in the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/chainList.json) and add them to the `[rpc_endpoints]` configuration section of `foundry.toml`. - - The script ensures that only new RPC URLs are appended, preserving any URLs already present in `foundry.toml`. To execute this script, run: - - ```sh - pnpm contracts:update:rpcs - ``` - - ### Modify deploy config parameters - - The deployment configuration for token deployments is managed through the `deploy-config.toml` file. Below is a detailed breakdown of each configuration section: - - #### `[deploy-config]` - - This section defines parameters for deploying token contracts. - - | Parameter | Description | Example | - | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | - | `salt` | A unique identifier used for deploying token contracts via \[`Create2`]. This value along with the contract bytecode ensures that contract deployments are deterministic. | `salt = "ethers phoenix"` | - | `chains` | Lists the chains where the token will be deployed. Each chain must correspond to an entry in the `[rpc_endpoints]` section of `foundry.toml`. | `chains = ["op_chain_a","op_chain_b"]` | - - #### `[token]` - - Deployment configuration for the token that will be deployed. - - | Parameter | Description | Example | - | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | - | `owner_address` | The address designated as the owner of the token. The `L2NativeSuperchainERC20.sol` contract included in this repo extends the [`Ownable`](https://github.com/Vectorized/solady/blob/c3b2ffb4a3334ea519555c5ea11fb0e666f8c2bc/src/auth/Ownable.sol) contract. | `owner_address = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"` | - | `name` | The token's name. | `name = "TestSuperchainERC20"` | - | `symbol` | The token's symbol. | `symbol = "TSU"` | - | `decimals` | The number of decimal places the token supports. | `decimals = 18` | - - ### Deploy a token - - * Before proceeding, ensure that your `deploy-config.toml` file is fully configured (see the [Modify Deploy Config Parameters](#modify-deploy-config-parameters) section setup details). - * Also, confirm that the `[rpc_endpoints]` section in `foundry.toml` is properly set up by following the instructions in [Configure RPC urls](#configure-rpc-urls). - - - Deployments are executed through the `SuperchainERC20Deployer.s.sol` script. This script deploys tokens across each specified chain in the deployment configuration using `Create2`, ensuring deterministic contract addresses for each deployment. The script targets the `L2NativeSuperchainERC20.sol` contract by default. If you need to modify the token being deployed, either update this file directly or point the script to a custom token contract of your choice. - - - * To execute a token deployment run: - - ```sh - pnpm contracts:deploy:token - - ``` - - -## Best practices for deploying SuperchainERC20 - -### Use `Create2` to deploy SuperchainERC20 - -`Create2` ensures that the address is deterministically determined by the bytecode of the contract and the provided salt. This is crucial because in order for cross-chain transfers of `SuperchainERC20`s to work with interop, the tokens must be deployed at the same address across all chains. - -### Set safe `crosschainMint` and `crosschainBurn` permissions - -For best security practices `SuperchainERC20Bridge` should be the only contract with permission to call `crosschainMint` and `crosschainBurn`. These permissions are set up by default when using the `SuperchainERC20` contract. - -## Next Steps - -* Test your token deployment on multiple chains using [Supersim](/app-developers/tools/supersim) and run simple [end-to-end integration tests](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-e2e-tests). -* For specific use cases, check out our guides for [bridging a SuperchainERC20 token to another chain](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-example-how-to-bridge-a-superchainerc20-token-to-another-chain) or [modifying an existing ERC20 contract to be interoperable](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#updating-an-erc20-contract-to-be-interoperable). -* Questions about Interop? Check out our collection of [interop guides](/interop/explainer) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). + diff --git a/pages/index.mdx b/pages/index.mdx index 25ab78067..73c9974dc 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -37,8 +37,11 @@ Superchain interoperability is (almost) here! Now you can build apps that work s Your users get a smoother experience while you build more powerful apps. [Discover how to build powerful multi-chain apps](/interop/explainer) with Superchain interoperability. + - } /> + } /> + } /> + } /> ## Builder guides diff --git a/pages/interop/_meta.json b/pages/interop/_meta.json index f30f500b0..82e2ec913 100644 --- a/pages/interop/_meta.json +++ b/pages/interop/_meta.json @@ -1,4 +1,6 @@ { + "get-started": "Build interoperable apps on Superchain", + "starter-kit": "SuperchainERC20 starter kit", "explainer": "Superchain interop explainer", "predeploy": "Superchain interop predeploys", "message-passing": "Superchain interop message passing", diff --git a/pages/interop/get-started.mdx b/pages/interop/get-started.mdx new file mode 100644 index 000000000..5957cfbe9 --- /dev/null +++ b/pages/interop/get-started.mdx @@ -0,0 +1,80 @@ +--- +title: Build interoperable apps on Superchain devnet +description: >- + Learn about deploying contracts, cross-chain messaging, and tutorials to help + you build applications on the Superchain. +lang: en-US +content_type: guide +topic: build-interoperable-apps-on-superchain-devnet +personas: + - app-developer +categories: + - cross-chain-messaging + - interoperability + - standard-bridge + - testnet +is_imported_content: 'false' +--- + +import { Cards, Card, Callout } from 'nextra/components' + +# Build interoperable apps on Superchain devnet + +Reimagine your app with Superchain Interop to deliver the unified UX your users expect. Hack on net-new, bold use cases on Interop devnet. + + + Explore the [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) to build, launch, and grow your app on the Superchain. + + +## Connect to Superchain Interop + +Select a network to build, test, and quickly iterate on interoperable apps. + +| Local network | Devnet | +| :-------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | +| Build and iterate on your apps with Supersim – a local multi-chain dev environment. | Deploy your app to devnet – a testnet developmental version – to conduct large-scale testing. | +|
  • RPC Endpoint: `local RPC URL`
  • Chain ID: `local chain ID`
  • Block explorer: TBD
|
  • RPC Endpoint: `devnet RPC URL`
  • Chain ID: `devnet chain ID`
  • Block explorer: TBD
| +| [Supersim](/app-developers/tutorials/supersim) | [Devnet Docs](/interop/tools/devnet) | + +## Deploy your app to devnet in minutes + +The SuperchainERC20 Starter Kit allows you to focus on what to deploy, not how to deploy. It's a streamlined toolkit that simplifies deploying your interoperable app, letting you focus on your core business logic. + +* [Get the Starter Kit](starter-kit) + +## Tools & resources for building interoperable apps + +| Tool | Description | +| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| [Superchain Faucet](https://console.optimism.io/faucet?utm_source=op-docs\&utm_medium=docs) | One stop shop to grab testnet ETH for any Superchain network. | +| [Supersim](tools/supersim) | Local multi-chain testing environment for smart contracts. | +| [Super CLI](https://github.com/ethereum-optimism/super-cli) | Command-line tool for seamless multichain app deployment and testing. | +| [Superchain Relayer](https://github.com/ethereum-optimism/superchain-relayer) | UI for monitoring and managing cross-chain transactions. | +| [Interop Docs](/interop/explainer) | Comprehensive Interop information in the Optimism Docs. | +| [Superchain Dev Console](https://console.optimism.io/?utm_source=op-docs\&utm_medium=docs) | Comprensive tool to build, launch, and grow your app on the Superchain. | + +## Handy step-by-step guides + + + } /> + + } /> + + } /> + + } /> + + +## Discover and build net-new use cases with Superchain Interop + +There is so much more than just bridge abstraction. Hack on the various cutting-edge applications that are uniquely enabled by Superchain Interop. Here are some ideas to get you started: + +| Superloans | Superlend | SuperCDP | +| :--------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------- | +| Use collateral on ChainA and ChainB to execute an arbitrage opportunity on ChainA. | Deposit ETH into lending protocols across chains for optimal yield, with automatic rebalancing based on best rates. | Collateralized crosschain debt protocol that holds assets and issues a SuperchainERC20 on user preferred chains. | + +## Join app dev community and build together + +Join the OP Labs team and fellow Superchain Interop builders to share ideas, provide feedback, ask questions, and get the [support](https://github.com/ethereum-optimism/developers/discussions) you need. + +* [Join Discord community](https://discord.gg/optimism) diff --git a/pages/interop/starter-kit.mdx b/pages/interop/starter-kit.mdx new file mode 100644 index 000000000..5db0eddeb --- /dev/null +++ b/pages/interop/starter-kit.mdx @@ -0,0 +1,166 @@ +--- +title: Deploying a SuperchainERC20 (Starter Kit) +description: >- + Learn how to quickly build and deploy a SuperchainERC20 token across the + Superchain using the SuperchainERC20 Starter Kit. +lang: en-US +content_type: guide +topic: deploying-a-superchainerc20-starter-kit +personas: + - app-developer +categories: + - cross-chain-messaging + - standard-bridge + - mainnet + - superchain-erc20 +is_imported_content: 'false' +--- + +import { Callout, Steps } from 'nextra/components' +import Image from 'next/image' +import { Tabs } from 'nextra/components' + + +The SuperchainERC20 standard is ready for production use with active Mainnet deployments. +Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development. + + +# Deploying a SuperchainERC20 (Starter Kit) + +The [SuperchainERC20 Starter Kit](https://github.com/ethereum-optimism/superchainerc20-starter) is a development toolkit designed to simplify the creation, deployment, and testing of SuperchainERC20 tokens. It leverages cross-chain interoperability for the deployment of ERC20 tokens that can be used across different blockchains in the Superchain ecosystem. + +## How it works + +Here's a breakdown of what's under the hood: + +* **Cross-Chain Interoperability**: SuperchainERC20 tokens can move across multiple chains. This is possible by using the [IERC-7802](https://eips.ethereum.org/EIPS/eip-7802) interface, which lets tokens be minted on one chain and burned on another to maintain a consistent supply. + +* **Superchain Network**: The Superchain is a network of connected blockchains, allowing smooth data and asset flow. By using Optimism's scaling solutions, the Superchain reduces gas fees and speeds up transactions. + +* **Deployment**: The kit helps deploy SuperchainERC20 tokens on Ethereum-compatible chains, including setting up contracts, minting, burning, and cross-chain communication. + +* **Testing**: Test scripts simulate real token transfers across chains to ensure everything works properly before going live. + +## Setup + + + ### Install `foundry` + + `supersim` requires `anvil` to be installed. + + Follow the [Foundry toolchain](https://book.getfoundry.sh/getting-started/installation) guide for detailed instructions. + + ### Clone the repo + + Next, you need to clone and navigate to the repo: + + ```sh + git clone https://github.com/ethereum-optimism/superchainerc20-starter.git + cd superchainerc20-starter + ``` + + ### Install dependencies + + Install project dependencies using `pnpm`: + + ```sh + pnpm i + ``` + + ### Initialize .env files + + ```sh + pnpm init:env + ``` + + ### Start the development environment + + This command will: + + * Start the `supersim` local development environment + * Deploy the smart contracts to the test networks + * Launch the example frontend application + + ```sh + pnpm dev + ``` + +
+ + Sanity check + + Browse to [the console](http://localhost:5173/), mint some tokens and transfer them. + +
+
+ +## Deploy SuperchainERC20s + + + ### Configure RPC urls + + This repository includes a script to automatically fetch the public RPC URLs for each chain listed in the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/chainList.json) and add them to the `[rpc_endpoints]` configuration section of `foundry.toml`. + + The script ensures that only new RPC URLs are appended, preserving any URLs already present in `foundry.toml`. To execute this script, run: + + ```sh + pnpm contracts:update:rpcs + ``` + + ### Modify deploy config parameters + + The deployment configuration for token deployments is managed through the `deploy-config.toml` file. Below is a detailed breakdown of each configuration section: + + #### `[deploy-config]` + + This section defines parameters for deploying token contracts. + + | Parameter | Description | Example | + | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | + | `salt` | A unique identifier used for deploying token contracts via \[`Create2`]. This value along with the contract bytecode ensures that contract deployments are deterministic. | `salt = "ethers phoenix"` | + | `chains` | Lists the chains where the token will be deployed. Each chain must correspond to an entry in the `[rpc_endpoints]` section of `foundry.toml`. | `chains = ["op_chain_a","op_chain_b"]` | + + #### `[token]` + + Deployment configuration for the token that will be deployed. + + | Parameter | Description | Example | + | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | + | `owner_address` | The address designated as the owner of the token. The `L2NativeSuperchainERC20.sol` contract included in this repo extends the [`Ownable`](https://github.com/Vectorized/solady/blob/c3b2ffb4a3334ea519555c5ea11fb0e666f8c2bc/src/auth/Ownable.sol) contract. | `owner_address = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"` | + | `name` | The token's name. | `name = "TestSuperchainERC20"` | + | `symbol` | The token's symbol. | `symbol = "TSU"` | + | `decimals` | The number of decimal places the token supports. | `decimals = 18` | + + ### Deploy a token + + * Before proceeding, ensure that your `deploy-config.toml` file is fully configured (see the [Modify Deploy Config Parameters](#modify-deploy-config-parameters) section setup details). + * Also, confirm that the `[rpc_endpoints]` section in `foundry.toml` is properly set up by following the instructions in [Configure RPC urls](#configure-rpc-urls). + + + Deployments are executed through the `SuperchainERC20Deployer.s.sol` script. This script deploys tokens across each specified chain in the deployment configuration using `Create2`, ensuring deterministic contract addresses for each deployment. The script targets the `L2NativeSuperchainERC20.sol` contract by default. If you need to modify the token being deployed, either update this file directly or point the script to a custom token contract of your choice. + + + * To execute a token deployment run: + + ```sh + pnpm contracts:deploy:token + + ``` + + +## Best practices for deploying SuperchainERC20 + +### Use `Create2` to deploy SuperchainERC20 + +`Create2` ensures that the address is deterministically determined by the bytecode of the contract and the provided salt. This is crucial because in order for cross-chain transfers of `SuperchainERC20`s to work with interop, the tokens must be deployed at the same address across all chains. + +### Set safe `crosschainMint` and `crosschainBurn` permissions + +For best security practices `SuperchainERC20Bridge` should be the only contract with permission to call `crosschainMint` and `crosschainBurn`. These permissions are set up by default when using the `SuperchainERC20` contract. + +## Next Steps + +* Test your token deployment on multiple chains using [Supersim](/app-developers/tools/supersim) and run simple [end-to-end integration tests](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-e2e-tests). +* For specific use cases, check out our guides for [bridging a SuperchainERC20 token to another chain](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#-example-how-to-bridge-a-superchainerc20-token-to-another-chain) or [modifying an existing ERC20 contract to be interoperable](https://github.com/ethereum-optimism/superchainerc20-starter/blob/main/README.md#updating-an-erc20-contract-to-be-interoperable). +* Questions about Interop? Check out our collection of [interop guides](/interop/explainer) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). + diff --git a/public/img/icons/sunny-smile.svg b/public/img/icons/sunny-smile.svg new file mode 100644 index 000000000..00ba5a4e1 --- /dev/null +++ b/public/img/icons/sunny-smile.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/img/icons/sunny.svg b/public/img/icons/sunny.svg new file mode 100644 index 000000000..d852ff992 --- /dev/null +++ b/public/img/icons/sunny.svg @@ -0,0 +1,6 @@ + + + + + + From a54448173667d1c23222ec202dd71b709fc6be6e Mon Sep 17 00:00:00 2001 From: Zain Bacchus Date: Thu, 10 Apr 2025 17:08:35 -0500 Subject: [PATCH 09/10] Update index.mdx update copy --- pages/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/index.mdx b/pages/index.mdx index 73c9974dc..4eadb7c38 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -31,11 +31,11 @@ import { Cards, Card } from 'nextra/components' Welcome to the Optimism Docs, the unified home of the [Optimism Collective's](/connect/resources/glossary#optimism-collective) technical documentation and information about the [OP Stack](/stack/getting-started). Information about the Optimism Collective's governance, community, and mission can be found on the [Optimism Community Hub](https://community.optimism.io/docs/governance/?utm_source=op-docs&utm_medium=docs). -## 🔥 Build across chains with Superchain interoperability! +## Grow your app with Superchain interoperability! -Superchain interoperability is (almost) here! Now you can build apps that work seamlessly across multiple OP chains with fast, simple asset transfers and cross-chain interactions - no complex bridges required. +Superchain interoperability is the next major scalability improvement to the OP Stack which enables a network of chains, the Superchain, to feel like a single blockchain. Superchain interoperability unlocks 1-block latency, trust minimized cross-chain composability and enables ETH and ERC-20 tokens to move securely between chains via native minting and burning as well as smart contracts to compose with data across multiple chains. -Your users get a smoother experience while you build more powerful apps. [Discover how to build powerful multi-chain apps](/interop/explainer) with Superchain interoperability. +Superchain interop is in active development. [Learn how you can leverage Superchain interoperability to tap into Superchain network effects](/interop/get-started). From edbfc33d9cd230da24ecb6a6dc1091e1ee6d77a2 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Fri, 11 Apr 2025 11:14:34 -0700 Subject: [PATCH 10/10] Add interop categories --- pages/interop/_meta.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/interop/_meta.json b/pages/interop/_meta.json index 82e2ec913..da548f87f 100644 --- a/pages/interop/_meta.json +++ b/pages/interop/_meta.json @@ -1,6 +1,14 @@ { + "--- Get started": { + "title": "Get started", + "type": "separator" + }, "get-started": "Build interoperable apps on Superchain", "starter-kit": "SuperchainERC20 starter kit", + "--- Superchain interoperability": { + "title": "Superchain interoperability", + "type": "separator" + }, "explainer": "Superchain interop explainer", "predeploy": "Superchain interop predeploys", "message-passing": "Superchain interop message passing",