Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.1",
"description": "Optimism Docs",
"scripts": {
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint && pnpm check-breadcrumbs && pnpm check-redirects",
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix && pnpm check-breadcrumbs && pnpm fix-redirects",
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint && pnpm check-breadcrumbs && pnpm check-redirects && pnpm linkcheck",
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix && pnpm breadcrumbs && pnpm fix-redirects",
"spellcheck:lint": "cspell lint \"**/*.mdx\"",
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt",
"linkcheck": "lychee --config ./lychee.toml --quiet \"./pages\"",
Expand Down
13 changes: 0 additions & 13 deletions pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,6 @@
"display": "children"
},

"+++ OP MAINNET": {
"title": "",
"type": "separator"
},
"--- OP MAINNET": {
"title": "OP MAINNET",
"type": "separator"
},
"chain": {
"title": "OP Mainnet",
"display": "children"
},

"+++ CONNECT": {
"title": "",
"type": "separator"
Expand Down
3 changes: 3 additions & 0 deletions pages/builders/app-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ If you're a developer looking to build on OP Mainnet, you've come to the right p
<Card title="Transactions" href="/builders/app-developers/transactions" />

<Card title="Tutorials" href="/builders/app-developers/tutorials" />

<Card title="Getting started developing for OP Stack chains" href="/builders/app-developers/getting-started" />
<Card title="Testing apps for OP Stack chains" href="/builders/app-developers/testing-apps" />
</Cards>
2 changes: 1 addition & 1 deletion pages/builders/app-developers/bridging/custom-bridge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can read more about the design of the Standard Bridge in the guide on [Using

## The Superchain Token List

The [Superchain Token List](/chain/tokenlist) exists to help users and developers find the right bridged representations of tokens native to another blockchain.
The [Superchain Token List](/superchain/tokenlist) exists to help users and developers find the right bridged representations of tokens native to another blockchain.
Once you've built and tested your custom bridge, make sure to register any tokens meant to flow through this bridge by [making a pull request against the Superchain Token List repository](https://github.com/ethereum-optimism/ethereum-optimism.github.io#adding-a-token-to-the-list).
You **must** deploy your bridge to OP Sepolia before it can be added to the Superchain Token List.

Expand Down
2 changes: 1 addition & 1 deletion pages/builders/app-developers/bridging/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ contract MyContract {
```

<Callout type="info">
You can find the addresses of the `L1CrossDomainMessenger` and the `L2CrossDomainMessenger` contracts on OP Mainnet and OP Sepolia on the [Contract Addresses](/chain/addresses) page.
You can find the addresses of the `L1CrossDomainMessenger` and the `L2CrossDomainMessenger` contracts on OP Mainnet and OP Sepolia on the [Contract Addresses](/superchain/addresses) page.
</Callout>

## Communication speed
Expand Down
6 changes: 3 additions & 3 deletions pages/builders/app-developers/bridging/standard-bridge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Users simply need to trigger and send ETH to the [`bridgeETH`](https://github.co
<Callout>
Users can also deposit ETH from Ethereum to OP Mainnet by sending a basic ETH transfer from an EOA to the `L1StandardBridgeProxy`.
This works because the `L1StandardBridgeProxy` contains a [`receive`](https://github.com/ethereum-optimism/optimism/blob/2e647210882d961f04055e656590d90ad98c9934/packages/contracts-bedrock/src/universal/StandardBridge.sol#L119-L121) function.
You can find the mainnet and testnet addresses on the [Contract Addresses](/chain/addresses) page.
You can find the mainnet and testnet addresses on the [Contract Addresses](/superchain/addresses) page.
</Callout>

## Tutorials
Expand All @@ -206,7 +206,7 @@ Users simply need to trigger and send ETH to the [`bridgeETH`](https://github.co

## Superchain Token List

The [Superchain Token List](/chain/tokenlist) exists to help users discover the right bridged token addresses for any given native token.
The [Superchain Token List](/superchain/tokenlist) exists to help users discover the right bridged token addresses for any given native token.
Consider checking this list to make sure that you're not using the wrong bridged representation of a token when bridging a native token.

Developers who are creating their own bridged tokens should consider [adding their token](https://github.com/ethereum-optimism/ethereum-optimism.github.io#adding-a-token-to-the-list) to the Superchain Token List.
Expand All @@ -217,7 +217,7 @@ Tokens on the Superchain Token List will automatically appear on certain tools l
You should strongly consider using the Superchain Token List to verify that you're using the correct bridged representation of a token when bridging a native token.
Doing so can help you avoid accidentally bridging to the wrong token and locking up your native token permanently.

You can easily find the bridged representation of a token for OP Mainnet on the [Bridged Token Addresses](/chain/tokenlist#op-mainnet) page.
You can easily find the bridged representation of a token for OP Mainnet on the [Bridged Token Addresses](/superchain/tokenlist#op-mainnet) page.
If you want to find the bridged representation of a token for another chain, use the following steps.

<Steps>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Getting started developing for OP Mainnet
title: Getting started developing for OP Stack chains
lang: en-US
description: Learn the basics of OP Mainnet development.
description: Learn the basics of OP Stack development.
---

import { Steps } from 'nextra/components'

# Getting started developing for OP Mainnet
# Getting started developing for OP Stack chains

This guide explains the basics of OP Mainnet development.
OP Mainnet is [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), meaning we run a slightly modified version of the same `geth` you run on mainnet.
Therefore, the differences between OP Mainnet development and Ethereum development are minor.
This guide explains the basics of OP Stack development.
OP Stack chains are [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), meaning they run a slightly modified version of the same `geth` you run on mainnet.
Therefore, the differences between OP Stack development and Ethereum development are minor.
But a few differences [do exist](/stack/differences).

## OP Mainnet and OP Sepolia endpoint URLs
## OP Stack chains endpoint URLs

To access any Ethereum type network you need an endpoint. [These providers](/builders/tools/connect/rpc-providers) support our networks.

Expand All @@ -23,14 +23,14 @@ For development purposes we recommend you use either a local development node or
That way you don't need to spend real money.
If you need ETH on OP Sepolia for testing purposes, [you can use this faucet](https://console.optimism.io/faucet?utm_source=docs).

## Interacting with contracts on OP Mainnet or OP Sepolia
## Interacting with contracts on OP Stack chains

We have Hardhat's Greeter contract on OP Sepolia at address [0x9d334aFBa83865E67a9219830ADA57aaA9406681](https://sepolia-optimism.etherscan.io/address/0x9d334aFBa83865E67a9219830ADA57aaA9406681#code).
You can verify your development stack configuration by interacting with it.

## Development stacks

As you can see in the different development stacks below, the way you deploy contracts and interact with them on OP Mainnet or OP Sepolia is almost identical to the way you do it with L1 Ethereum.
As you can see in the different development stacks below, the way you deploy contracts and interact with them on OP Stack chains is almost identical to the way you do it with L1 Ethereum.
The most visible difference is that you have to specify a different endpoint (of course).
The list of other differences is [here](differences).

Expand All @@ -51,8 +51,8 @@ Not only is it faster, but such EVMs often have extra features, such as the [abi

### Debug before deploying

After you are done with that development, debug your decentralized application using either a [development node](/chain/testing/dev-node) or the [Sepolia test network](/chain/networks).
This lets you debug parts that are OP Mainnet specific such as calls to bridges to transfer ETH or tokens between layers.
After you are done with that development, debug your decentralized application using either a [development node](/stack/dev-node) or the [Sepolia test network](/superchain/networks).
This lets you debug parts that are OP Stack chains specific such as calls to bridges to transfer ETH or tokens between layers.

Only when you have a version that works well on a test network should you deploy to the production network, where every transaction has a cost.

Expand All @@ -62,4 +62,4 @@ You don't have to upload your source code to [block explorers](/builders/tools/b
On the test network, it lets you issue queries and transactions from the explorer's user interface.
On the production network, it lets users know exactly what your contract does, which is conducive to trust.

Just remember, if you use [the Etherscan API](https://explorer.optimism.io/apis), you need one API key for OP Mainnet and a separate one for OP Sepolia.
Just remember, if you use [the Etherscan API](https://explorer.optimism.io/apis), you need one API key for OP Stack chains and a separate one for OP Sepolia.
6 changes: 3 additions & 3 deletions pages/builders/app-developers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ In this area of the Optimism Docs you'll find everything you need to know about

## Getting started

If you're brand new to OP Mainnet, try starting with the guide on [deploying a basic contract](/chain/getting-started).
If you're brand new to OP Mainnet, try starting with the guide on [deploying a basic contract](/builders/app-developers/getting-started).
It'll get you familiar with the basic steps required to get a contract deployed to the network.
OP Mainnet is [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) so you can feel confident that your existing Ethereum smart contract skills will carry over to OP Mainnet.
Just make sure to be aware of the few small [differences between Ethereum and OP Mainnet](/stack/differences).

You might also want to check out the [testing on OP Networks guide](/chain/testing/testing-apps) and the tutorial on [running a local development environment](/chain/testing/dev-node) to help you feel totally confident in your OP Mainnet deployment.
You might also want to check out the [testing on OP Networks guide](/builders/app-developers/testing-apps) and the tutorial on [running a local development environment](/stack/dev-node) to help you feel totally confident in your OP Mainnet deployment.

<Cards>
<Card title="Deploying Your First Contract to OP Mainnet" href="/builders/app-developers/overview" icon={<img src="/img/icons/shapes.svg" />} />

<Card title="Solidity Compatibility on OP Mainnet" href="/stack/differences" icon={<img src="/img/icons/shapes.svg" />} />

<Card title="Testing Apps on OP Mainnet" href="/chain/testing/testing-apps" icon={<img src="/img/icons/shapes.svg" />} />
<Card title="Testing Apps on OP Mainnet" href="/builders/app-developers/testing-apps" icon={<img src="/img/icons/shapes.svg" />} />
</Cards>

## Bridging and messaging
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
title: Testing apps for OP Mainnet
title: Testing apps for OP Stack chains
lang: en-US
description: Learn best practices for OP Mainnet testing.
description: Learn best practices for OP Stack testing.
---

# Testing apps for OP Mainnet
# Testing apps for OP Stack chains

For the most part, running applications on OP Mainnet is identical to running them on Ethereum, so the testing is identical too.
In this guide, you learn the best practices for OP Mainnet testing where there are differences.
For the most part, running applications on OP Stack chains is identical to running them on Ethereum, so the testing is identical too.
In this guide, you learn the best practices for OP Stack testing where there are differences.

## Unit tests and single layer integration tests

The vast majority of tests do not involve any OP Mainnet-specific features.
In those cases, while you *could* test everything on OP Mainnet or a test network, that would normally be inefficient.
The vast majority of tests do not involve any OP Stack-specific features.
In those cases, while you *could* test everything on an OP Stack chain or a test network, that would normally be inefficient.
Most Ethereum development stacks include features that make testing easier, which normal Ethereum clients, such as geth (and our modified version, `op-geth`) don't support.
Therefore, it is a good idea to run the majority of tests, which do not rely on OP Mainnet-specific features, in the development stack.
Therefore, it is a good idea to run the majority of tests, which do not rely on OP Stack-specific features, in the development stack.
It is a lot faster.

It is a best practice to design and run thorough tests across an OP test network, either in your [local development environment](dev-node) or on [the test network](/chain/networks#op-sepolia), depending on your use case.
Running proper testing is key to identifying fringe cases where the equivalence between OP Mainnet and Ethereum breaks down (or where Ethereum mainnet itself and the development stack may be non-equivalent in a production environment).
It is a best practice to design and run thorough tests across an OP test network, either in your [local development environment](dev-node) or on [the test network](/superchain/networks#op-sepolia), depending on your use case.
Running proper testing is key to identifying fringe cases where the equivalence between OP Stack chains and Ethereum breaks down (or where Ethereum mainnet itself and the development stack may be non-equivalent in a production environment).

## Multilayer integration tests

Some apps need OP Mainnet-specific features that aren't available as part of the development stack.
Some apps need OP Stack-specific features that aren't available as part of the development stack.
For example, if your decentralized application relies on [inter-domain communication](/builders/app-developers/bridging/messaging), the effort of developing a stub to let you debug it in a development stack is probably greater than the hassle of having the automated test go to [a local development environment](dev-node) each time.

## Integration with other products
Expand All @@ -31,5 +31,5 @@ In many cases a decentralized application requires the services of other contrac
For example, [Perpetual v. 2](https://docs.perp.com/docs/guides/integration-guide) cannot function without [Uniswap v. 3](https://uniswap.org/blog/uniswap-v3).

If that is the case you can use [mainnet forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html).
It works with OP Mainnet.
Alternatively, you can connect to our [test network](/chain/networks#op-sepolia) if those contracts are also deployed there (in many cases they are).
It works with OP Stack chains.
Alternatively, you can connect to our [test network](/superchain/networks#op-sepolia) if those contracts are also deployed there (in many cases they are).
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The ecosystem repository was developed to help ease and expedite the development

## Getting started

Our initial launch includes an example [bridge application](https://github.com/ethereum-optimism/ecosystem/tree/main/apps/bridge-app) that demonstrates how to bridge ETH and any ERC20 tokens listed in the [Superchain Token List](/chain/tokenlist).
Our initial launch includes an example [bridge application](https://github.com/ethereum-optimism/ecosystem/tree/main/apps/bridge-app) that demonstrates how to bridge ETH and any ERC20 tokens listed in the [Superchain Token List](/superchain/tokenlist).
This application serves as a reference for anyone looking to build their own bridge, offering 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. For instance, it includes features for tracking [network pairs](https://github.com/ethereum-optimism/ecosystem/blob/main/packages/op-app/src/configs/networkPairs.ts) and [deployment addresses](https://github.com/ethereum-optimism/ecosystem/blob/main/packages/op-app/src/configs/deploymentAddresses.ts) of smart contracts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Make sure to check out the [Standard Bridge guide](/builders/app-developers/brid

## Supported networks

The Optimism SDK supports any of the [Superchain networks](/chain/networks).
The Optimism SDK supports any of the [Superchain networks](/superchain/networks).
[Some Superchain networks](https://sdk.optimism.io/enums/l2chainid) are already included in the SDK by default.
If you want to use a network that isn't included by default, you can simply [instantiate the SDK with the appropriate contract addresses](/builders/app-developers/overview).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Make sure to check out the [Standard Bridge guide](/builders/app-developers/brid

## Supported networks

Viem supports any of the [Superchain networks](/chain/networks).
Viem supports any of the [Superchain networks](/superchain/networks).
The OP Stack networks are included in Viem by default.
If you want to use a network that isn't included by default, you can add it to Viem's chain configurations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Luckily, both `Greeter` contracts are exactly the same so it's easy to see how e
### The Messenger variable

The `Greeter` contract has a `MESSENGER` variable that keeps track of the `CrossDomainMessenger` contract on the current chain.
Check out the [Contract Addresses page](/chain/addresses) to see the addresses of the `CrossDomainMessenger` contracts on whichever network you'll be using.
Check out the [Contract Addresses page](/superchain/addresses) to see the addresses of the `CrossDomainMessenger` contracts on whichever network you'll be using.

```solidity file=<rootDir>/public/tutorials/cross-dom-solidity.sol#L14 hash=ce8be857d4b4e1992cd3c16b8f2864b9
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You'll also learn how to estimate the total cost of the transaction all at once.

## Supported networks

Viem supports any of the [Superchain networks](/chain/networks).
Viem supports any of the [Superchain networks](/superchain/networks).
The OP Stack networks are included in Viem by default.
If you want to use a network that isn't included by default, you can add it to Viem's chain configurations.

Expand Down
2 changes: 0 additions & 2 deletions pages/builders/chain-operators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Documentation covering Architecture, Configuration, Deploy, Features, Hacks, Man

<Card title="Features" href="/builders/chain-operators/features" />

<Card title="Hacks" href="/builders/chain-operators/hacks" />

<Card title="Management" href="/builders/chain-operators/management" />

<Card title="How to start a self-hosted chain" href="/builders/chain-operators/self-hosted" />
Expand Down
Loading