Skip to content

Commit 5e4fe7c

Browse files
Merge pull request #946 from ethereum-optimism/sentence-case-headers
Sentence casing all headers
2 parents 487d08e + ef61966 commit 5e4fe7c

File tree

141 files changed

+876
-893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+876
-893
lines changed

pages/builders/app-developers/bridging/basics.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
2-
title: Bridging Basics
2+
title: Bridging basics
33
lang: en-US
44
description: Learn about the fundamentals of sending data and tokens between Ethereum and OP Mainnet.
55
---
66

7-
# Bridging Basics
7+
# Bridging basics
88

99
OP Mainnet is a "Layer 2" system and is fundamentally connected to Ethereum.
1010
However, OP Mainnet is also a distinct blockchain with its own blocks and transactions.
1111
App developers commonly need to move data and tokens between OP Mainnet and Ethereum.
1212
This process of moving data and tokens between the two networks is called "bridging".
1313

14-
## Sending Tokens
14+
## Sending tokens
1515

1616
One of the most common use cases for bridging is the need to send ETH or ERC-20 tokens between OP Mainnet and Ethereum.
1717
OP Mainnet has a system called the [Standard Bridge](./standard-bridge) that makes it easy to move tokens in both directions.
1818
If you mostly need to bridge tokens, make sure to check out the [Standard Bridge](./standard-bridge) guide.
1919

20-
## Sending Data
20+
## Sending data
2121

2222
Under the hood, the Standard Bridge is just an application that uses the OP Mainnet [message passing system to send arbitrary data between Ethereum and OP Mainnet](./messaging).
2323
Applications can use this system to have a contract on Ethereum interact with a contract on OP Mainnet, and vice versa.
2424
All of this is easily accessible with a simple, clean API.
2525

26-
## Next Steps
26+
## Next steps
2727

2828
Ready to start bridging?
2929
Check out these tutorials to get up to speed fast.

pages/builders/app-developers/bridging/custom-bridge.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Custom Bridges
2+
title: Custom bridges
33
lang: en-US
44
description: Important considerations when building custom bridges for OP Mainnet.
55
---
66

77
import { Callout } from 'nextra/components'
88

9-
# Custom Bridges
9+
# Custom bridges
1010

1111
Custom token bridges are any bridges other than the [Standard Bridge](./standard-bridge).
1212
You may find yourself in a position where you need to build a custom token bridge because the Standard Bridge doesn't completely support your use case.
@@ -35,7 +35,7 @@ The [Superchain Token List](/chain/tokenlist) exists to help users and developer
3535
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).
3636
You **must** deploy your bridge to OP Sepolia before it can be added to the Superchain Token List.
3737

38-
## Next Steps
38+
## Next steps
3939

4040
You can explore several examples of custom bridges for OP Mainnet:
4141

pages/builders/app-developers/bridging/messaging.mdx

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Sending Data Between L1 and L2
2+
title: Sending data between L1 and L2
33
lang: en-US
44
description: Learn how bridging works between L1 and L2, how to use it, and what to watch out for.
55
---
66

77
import { Callout } from 'nextra/components'
88

9-
# Sending Data Between L1 and L2
9+
# Sending data between L1 and L2
1010

1111
Smart contracts on L1 (Ethereum) can interact with smart contracts on L2 (OP Mainnet) through a process called "bridging".
1212
This page explains how bridging works, how to use it, and what to watch out for.
@@ -16,7 +16,7 @@ This page explains how bridging works, how to use it, and what to watch out for.
1616
For a step-by-step tutorial on how to send data between L1 and L2, check out the [Solidity tutorial](/builders/app-developers/tutorials/cross-dom-solidity).
1717
</Callout>
1818

19-
## Understanding Contract Calls
19+
## Understanding contract calls
2020

2121
It can be easier to understand bridging if you first have a basic understanding of how contracts on EVM-based blockchains like OP Mainnet and Ethereum communicate within the *same* network.
2222
The interface for sending messages *between* Ethereum and OP Mainnet is designed to mimic the standard contract communication interface as much as possible.
@@ -57,7 +57,7 @@ Here you're using the [low-level "call" function](https://docs.soliditylang.org/
5757
Although these two code snippets look a bit different, they're doing the exact same thing.
5858
Because of limitations of Solidity, **the OP Stack's bridging interface is designed to look like the second code snippet**.
5959

60-
## Basics of Communication Between Layers
60+
## Basics of communication between layers
6161

6262
At a high level, the process for sending data between L1 and L2 is pretty similar to the process for sending data between two contracts on Ethereum (with a few caveats).
6363
Communication between L1 and L2 is made possible by a pair of special smart contracts called the "messenger" contracts.
@@ -121,17 +121,17 @@ contract MyContract {
121121
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.
122122
</Callout>
123123

124-
## Communication Speed
124+
## Communication speed
125125

126126
Unlike calls between contracts on the same blockchain, calls between Ethereum and OP Mainnet are *not* instantaneous.
127127
The speed of a cross-chain transaction depends on the direction in which the transaction is sent.
128128

129-
### For L1 to L2 Transactions
129+
### For L1 to L2 transactions
130130

131131
Transactions sent from L1 to L2 take **approximately 1-3 minutes** to get from Ethereum to OP Mainnet, or from Sepolia to OP Sepolia.
132132
This is because the Sequencer waits for a certain number of L1 blocks to be created before including L1 to L2 transactions to avoid potentially annoying [reorgs](https://www.alchemy.com/overviews/what-is-a-reorg).
133133

134-
### For L2 to L1 Transactions
134+
### For L2 to L1 transactions
135135

136136
Transactions sent from L2 to L1 take **approximately 7 days** to get from OP Mainnet to Ethereum, or from OP Sepolia to Sepolia.
137137
This is because the bridge contract on L1 must wait for the L2 state to be *proven* to the L1 chain before it can relay the message.
@@ -177,9 +177,9 @@ modifier onlyOwner() {
177177
}
178178
```
179179

180-
## Fees For Sending Data Between L1 and L2
180+
## Fees for sending data between L1 and L2
181181

182-
### For L1 to L2 Transactions
182+
### For L1 to L2 transactions
183183

184184
The majority of the cost of an L1 to L2 transaction comes from the smart contract execution on L1.
185185
When sending an L1 to L2 transaction, you send to the [`L1CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/111f3f3a3a2881899662e53e0f1b2f845b188a38/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol) contract, which then sends a call to the [`OptimismPortal`](https://github.com/ethereum-optimism/optimism/blob/111f3f3a3a2881899662e53e0f1b2f845b188a38/packages/contracts-bedrock/src/L1/OptimismPortal.sol) contract.
@@ -195,7 +195,7 @@ The amount of L1 gas charged increases when more people are sending L1 to L2 tra
195195
You should always add a buffer of at least 20% to the gas limit for your L1 to L2 transaction to avoid running out of gas.
196196
</Callout>
197197

198-
### For L2 to L1 Transactions
198+
### For L2 to L1 transactions
199199

200200
Each message from L2 to L1 requires three transactions:
201201

@@ -211,7 +211,7 @@ Each message from L2 to L1 requires three transactions:
211211
The total cost of an L2 to L1 transaction is therefore the combined cost of the L2 initialization transaction and the two L1 transactions.
212212
The L1 proof and finalization transactions are typically significantly more expensive than the L2 initialization transaction.
213213

214-
## Understanding the Challenge Period
214+
## Understanding the challenge period
215215

216216
One of the most important things to understand about L1 ⇔ L2 interaction is that **mainnet messages sent from Layer 2 to Layer 1 cannot be relayed for at least 7 days**.
217217
This means that any messages you send from Layer 2 will only be received on Layer 1 after this one week period has elapsed.

pages/builders/app-developers/bridging/standard-bridge.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The Standard Bridge is composed of two contracts, the [`L1StandardBridge`](https
3636
These two contracts interact with one another via the `CrossDomainMessenger` system for sending messages between Ethereum and OP Mainnet.
3737
You can read more about the `CrossDomainMessenger` in the guide on [Sending Data Between L1 and L2](./messaging).
3838

39-
### Bridged Tokens
39+
### Bridged tokens
4040

4141
The Standard Bridge utilizes bridged representations of tokens that are native to another blockchain.
4242
Before a token native to one chain can be bridged to the other chain, a bridged representation of that token must be created on the receiving side.
@@ -50,7 +50,7 @@ A native token may have more than one bridged representation at the same time.
5050
Users must always specify which bridged token they wish to use when using the bridge.
5151
Different bridged representations of the same native token are considered entirely independent tokens.
5252

53-
### Bridging Native Tokens
53+
### Bridging native tokens
5454

5555
The Standard Bridge uses a "lock-and-mint" mechanism to convert native tokens into their bridged representations.
5656
This means that **native tokens are locked** into the Standard Bridge on one side, after which **bridged tokens are minted** on the other side.
@@ -129,7 +129,7 @@ The process for bridging a native token involves a few steps.
129129
This process is identical in both the Ethereum to OP Mainnet and OP Mainnet to Ethereum directions.
130130
</Steps>
131131

132-
### Bridging Non-Native Tokens
132+
### Bridging non-native tokens
133133

134134
The Standard Bridge uses a "burn-and-unlock" mechanism to convert bridged representations of tokens back into their native tokens.
135135
This means that **bridged tokens are burned** on the Standard Bridge on one side, after which **native tokens are unlocked** on the other side.
@@ -237,7 +237,7 @@ The address of this entry is the address of the bridged representation of the to
237237

238238
</Steps>
239239

240-
## Special Considerations
240+
## Special considerations
241241

242242
### USDC
243243

pages/builders/app-developers/contracts/compatibility.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
2-
title: Solidity Compatibility
2+
title: Solidity compatibility
33
lang: en-US
44
description: Learn about the differences between OP Mainnet and Ethereum when building Solidity contracts.
55
---
66

7-
# Solidity Compatibility
7+
# Solidity compatibility
88

99
OP Mainnet is designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), which means OP Mainnet looks exactly like Ethereum in every way possible.
1010
Almost all Ethereum tooling works out of the box on OP Mainnet, including the [Solidity](https://soliditylang.org/) smart contract language.
1111
However, there are a few minor differences between OP Mainnet and Ethereum that you should be aware of when building Solidity contracts.
1212

13-
## EVM/Opcode Differences
13+
## EVM/Opcode differences
1414

1515
Most smart contracts will work on OP Mainnet without any changes.
1616
Check out the [Differences Between Ethereum and OP Mainnet](/chain/differences#opcodes) page for a detailed list of the few differences you should know about.
1717

18-
## Gas Differences
18+
## Gas differences
1919

2020
OP Mainnet uses the same gas costs as Ethereum.
2121
However, OP Mainnet also charges an [L1 Data Fee](/stack/transactions/fees#l1-data-fee) for the cost of publishing an L2 transaction to L1.

pages/builders/app-developers/contracts/optimization.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Contract Optimization on OP Mainnet
2+
title: Contract optimization on OP Mainnet
33
lang: en-US
44
description: Learn how to optimize contracts for OP Mainnet and what to look out for when you do so.
55
---
66

77
import { Callout } from 'nextra/components'
88

9-
# Contract Optimization on OP Mainnet
9+
# Contract optimization on OP Mainnet
1010

1111
OP Mainnet is designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), which means OP Mainnet looks exactly like Ethereum in every way possible.
1212
One large and mostly unavoidable discrepancy between OP Mainnet and Ethereum is a slight [difference in transaction fee models](/stack/transactions/fees).
@@ -36,12 +36,12 @@ This is the basic premise that makes OP Mainnet contract optimization slightly d
3636

3737
## Considerations
3838

39-
### Additional Complexity
39+
### Additional complexity
4040

4141
Contract optimizations can create additional complexity, which can in turn create additional risk.
4242
Developers should always consider whether this added complexity is worth the reduction in cost.
4343

44-
### Changing Economics
44+
### Changing economics
4545

4646
Various potential upgrades to OP Mainnet may also make optimizations to the L1 Data Fee less relevant.
4747
For instance, [EIP-4844](https://www.eip4844.com/), if adopted, should significantly reduce the cost of publishing data to Ethereum and would therefore also decrease the L1 Data Fee.
@@ -57,7 +57,7 @@ If you expect your contracts to be used mostly in the short term or you have the
5757

5858
## Techniques
5959

60-
### Calldata Compression
60+
### Calldata compression
6161

6262
Compressing user data on the client side and decompressing it on the contract side can be an effective way to decrease costs on OP Mainnet.
6363
This technique decreases the amount of data provided by the user in exchange for a significant increase in onchain computation.
@@ -66,7 +66,7 @@ Although several libraries exist to perform this calldata compression, none of t
6666
As a result, links to these libraries have been explicitly omitted here to avoid encouraging developers from using potentially buggy software.
6767
Most of these libraries can be found with a quick search online but, as always, be careful with code you find on the internet.
6868

69-
### Custom Encoding
69+
### Custom encoding
7070

7171
The [Solidity ABI encoding scheme](https://docs.soliditylang.org/en/v0.8.23/abi-spec.html#argument-encoding) is not particularly data efficient.
7272
Contracts can often reduce the amount of calldata provided by defining a custom argument encoding protocol.

pages/builders/app-developers/contracts/system-contracts.mdx

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Using OP Mainnet System Contracts
2+
title: Using OP Mainnet system contracts
33
lang: en-US
44
description: Learn how to work with OP Mainnet contracts directly from other contracts and how to work with contracts from the client side.
55
---
66

77
import { Steps } from 'nextra/components'
88

9-
# Using OP Mainnet System Contracts
9+
# Using OP Mainnet system contracts
1010

1111
System contracts on Ethereum (L1) and OP Mainnet (L2) are an important part of the OP Mainnet ecosystem.
1212
You may want to interact with these system contracts for any number of reasons, including:
@@ -18,15 +18,15 @@ You may want to interact with these system contracts for any number of reasons,
1818

1919
In this tutorial, you'll learn how to work with OP Mainnet contracts directly from other contracts and how to work with them from the client side.
2020

21-
## Before You Begin
21+
## Before you begin
2222

2323
You'll need to find the address of the particular contract that you want to interact with before you can actually interact with it.
2424

2525
* Check out the [Networks and Connection Details page](/chain/networks) for links to public RPC endpoints and contract addresses.
2626
* Find the addresses for all networks on the [Contract Addresses](/chain/addresses) page.
2727
* Use the JSON file including contract addresses for all Superchain networks in the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/extra/addresses/addresses.json).
2828

29-
## Using System Contracts in Solidity
29+
## Using system contracts in Solidity
3030

3131
All you need to interact with the OP Mainnet system contracts from another contract is an address and an interface.
3232
You can follow [the instructions above](#finding-contract-addresses) to find the address of the contract you want to interact with.
@@ -42,7 +42,7 @@ Install the package as follows:
4242
npm install @eth-optimism/contracts-bedrock
4343
```
4444

45-
### Importing Contracts
45+
### Importing contracts
4646

4747
Simply import the desired contract or interface from the `@eth-optimism/contracts-bedrock` package:
4848

@@ -57,14 +57,14 @@ For example, if you wanted to import the [`L1CrossDomainMessenger`](https://gith
5757
import { L1CrossDomainMessenger } from "@eth-optimism/contracts/L1/messaging/L1CrossDomainMessenger.sol";
5858
```
5959

60-
### Getting L2 Contract Addresses
60+
### Getting L2 contract addresses
6161

6262
System contracts on L2 are "pre-deployed" to special addresses that are the same on most OP Stack chains.
6363
You can find these addresses on the [Contract Addresses](/chain/addresses) page.
6464
These addresses are also provided as constants in the [`Predeploys`](https://github.com/ethereum-optimism/optimism/blob/v1.1.4/packages/contracts-bedrock/src/libraries/Predeploys.sol) contract for use in Solidity.
6565
</Steps>
6666

67-
## Using System Contracts in JavaScript
67+
## Using system contracts in JavaScript
6868

6969
You can also interact with the OP Mainnet system contracts from the client side.
7070
<Steps>
@@ -77,7 +77,7 @@ Install the package as follows:
7777
npm install @eth-optimism/contracts-ts
7878
```
7979

80-
### Getting Contract Artifacts and Interfaces
80+
### Getting contract artifacts and interfaces
8181

8282
You can use the `@eth-optimism/contracts-ts` package to easily access the address or ABI of any OP Mainnet contract.
8383

@@ -92,7 +92,7 @@ import {
9292
// Note that the address is keyed by chain ID!
9393
console.log(l2OutputOracleAddresses[10], l2OutputOracleProxyABI)
9494
```
95-
### Interacting with the Contract
95+
### Interacting with the contract
9696
You can then feed this address and ABI into your favorite web3 library to interact with the contract.
9797

9898
`@eth-optimism/contracts-ts` also exports [React hooks](https://wagmi.sh/cli/api/plugins/react) and [wagmi actions](https://wagmi.sh/react/api/actions) for interacting with OP Mainnet contracts.

pages/builders/app-developers/overview.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: App Developer Overview
2+
title: App developer overview
33
lang: en-US
44
description: Learn about deploying contracts, cross-chain messaging, and tutorials to help you build applications on OP Mainnet.
55
---
66

77
import { Cards, Card } from 'nextra/components'
88

9-
# App Developer Overview
9+
# App developer overview
1010

1111
If you're a developer looking to build on OP Mainnet, you've come to the right place.
1212
In this area of the Optimism Docs you'll find everything you need to know about building OP Mainnet applications.
1313

14-
## Getting Started
14+
## Getting started
1515

1616
If you're brand new to OP Mainnet, try starting with the guide on [deploying a basic contract](/chain/getting-started).
1717
It'll get you familiar with the basic steps required to get a contract deployed to the network.
@@ -28,7 +28,7 @@ You might also want to check out the [testing on OP Networks guide](/chain/testi
2828
<Card title="Testing Apps on OP Mainnet" href="/chain/testing/testing-apps" icon={<img src="/img/icons/shapes.svg" />} />
2929
</Cards>
3030

31-
## Bridging and Messaging
31+
## Bridging and messaging
3232

3333
Looking to build an application that sends ETH, tokens, or data between OP Mainnet and Ethereum?
3434
You'll find some useful guides and tutorials in this area of the docs.
@@ -65,7 +65,7 @@ They'll help you get a head start when building your first Optimistic project.
6565

6666
You can also [suggest a new tutorial](https://github.com/ethereum-optimism/docs/issues/new?assignees=\&labels=tutorial%2Cdocumentation%2Ccommunity-request\&projects=\&template=suggest_tutorial.yaml\&title=%5BTUTORIAL%5D+Add+PR+title) if you have something specific in mind. We'd love to grow this list!
6767

68-
## Next Steps
68+
## Next steps
6969

7070
If you still can't find the content you're looking for, there's a few options to get extra help.
7171

0 commit comments

Comments
 (0)