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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can do this on [Supersim](/interop/tools/supersim), [the Interop devnet](/in

### What you'll build

* A TypeScript application to transfer ETH chains
* A TypeScript application to transfer ETH between chains

### What you'll learn

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
## Get ETH on Sepolia and OP Sepolia

This tutorial explains how to bridge tokens from Sepolia to OP Sepolia.
You will need to get some ETH on both of these testnets.

Check warning on line 76 in app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx#L76

Did you really mean 'testnets'?

<Info>
You can use [this faucet](https://sepoliafaucet.com) to get ETH on Sepolia.
Expand Down Expand Up @@ -101,7 +101,7 @@
node
```

This will bring up a Node REPL prompt that allows you to run javascript code.

Check warning on line 104 in app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx#L104

Did you really mean 'javascript'?

## Import dependencies

Expand Down Expand Up @@ -137,7 +137,7 @@
This step retrieves your private key from the environment variable you set earlier and converts it into an account object that Viem can use for transaction signing.

The private key is essential for authorizing transactions on both L1 and L2 networks.
For security reasons, we access it from an environment variable rather than hardcoding it.

Check warning on line 140 in app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx#L140

Did you really mean 'hardcoding'?

```js
const PRIVATE_KEY = process.env.TUTORIAL_PRIVATE_KEY || '';
Expand Down Expand Up @@ -429,7 +429,7 @@

After the deposit transaction is confirmed, we check our token balance on L1 again to verify that the tokens have been deducted.

This balance should be lower by the amount we bridged, as those tokens are now escrowed in the `L1StandardBridge` contract.

Check warning on line 432 in app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx#L432

Did you really mean 'escrowed'?
This step helps confirm that the first part of the bridging process completed successfully:

```js
Expand Down Expand Up @@ -527,7 +527,7 @@
functionName: 'balanceOf',
args: [account.address]
});
console.log(`L2 Balance after withdrawal: ${formatEther(l2Balance)}`);
console.log(`L2 Balance after withdrawal initiation: ${formatEther(l2Balance)}`);
```
</Step>
</Steps>
Expand Down
2 changes: 1 addition & 1 deletion app-developers/tutorials/bridging/cross-dom-solidity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
## Get ETH on Sepolia and OP Sepolia

This tutorial explains how to send messages from Sepolia to OP Sepolia.
You will need to get some ETH on both of these testnets.

Check warning on line 36 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L36

Did you really mean 'testnets'?

<Info>
You can use [this faucet](https://sepoliafaucet.com/) to get ETH on Sepolia.
Expand All @@ -59,12 +59,12 @@
<Steps>
<Step title="Connect to Etherscan">
Sending a message to the L2 `Greeter` contract via the L1 `Greeter` contract requires that you call the `sendGreeting` function.
For simplicity, you'll interact with the contract directly on Etherscan.

Check warning on line 62 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L62

Did you really mean 'Etherscan'?
Open up the [L1 `Greeter` contract on Sepolia Etherscan](https://sepolia.etherscan.io/address/0x31A6Dd971306bb72f2ffF771bF30b1B98dB8B2c5#writeContract) and click the "Connect to Web3" button.
</Step>

<Step title="Send your greeting">
Put a greeting into the field next to the "sendGreeting" function and click the "Write" button.

Check warning on line 67 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L67

Did you really mean 'sendGreeting'?
You can use any greeting you'd like.
</Step>

Expand Down Expand Up @@ -106,7 +106,7 @@
</Step>

<Step title="Send your greeting">
Put a greeting into the field next to the "sendGreeting" function and click the "Write" button.

Check warning on line 109 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L109

Did you really mean 'sendGreeting'?
You can use any greeting you'd like.

<Info>
Expand Down Expand Up @@ -224,7 +224,7 @@
### 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](/superchain/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 whatever network you'll be using.

```solidity
address public immutable MESSENGER;
Expand Down Expand Up @@ -259,7 +259,7 @@
}
```

### The sendGreeting function

Check warning on line 262 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L262

Did you really mean 'sendGreeting'?

The `sendGreeting` function is the most important function in the `Greeter` contract.
This is what you called earlier to send messages in both directions.
Expand All @@ -275,7 +275,7 @@
}
```

### The setGreeting function

Check warning on line 278 in app-developers/tutorials/bridging/cross-dom-solidity.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/bridging/cross-dom-solidity.mdx#L278

Did you really mean 'setGreeting'?

The `setGreeting` function is the function that actually sets the greeting.
This function is called by the `CrossDomainMessenger` contract on the other chain.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ We'll run through a sample deposit directly with the `OptimismPortal` using cast
</Step>

<Step title="Send Deposit Transaction On L1">
We'll be using the first pre-funded account to send this deposit with 1 ether
We'll be using the first pre-funded account to send this deposit of 1 ether

```bash
cast send 0x37a418800d0c812A9dE83Bc80e993A6b76511B57 --value 1ether --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@
RPC_PARAMS=$(cat <<INNER_END_OF_FILE
{
"origin": "$ORIGIN",
"blockNumber": "$BLOCK_NUMBER",

Check warning on line 316 in app-developers/tutorials/interoperability/manual-relay.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/interoperability/manual-relay.mdx#L316

Did you really mean 'blockNumber'?
"logIndex": "$LOG_INDEX",

Check warning on line 317 in app-developers/tutorials/interoperability/manual-relay.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/interoperability/manual-relay.mdx#L317

Did you really mean 'logIndex'?
"timestamp": "$TIMESTAMP",
"chainId": "$CHAIN_ID_A",

Check warning on line 319 in app-developers/tutorials/interoperability/manual-relay.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/interoperability/manual-relay.mdx#L319

Did you really mean 'chainId'?
"payload": "$LOG_ENTRY"
}
INNER_END_OF_FILE
Expand All @@ -331,7 +331,7 @@

The [algorithm to calculate the access list](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol#L87-L115) is a bit complicated, but you dont need to worry about it.
Supersim exposes [RPC calls](https://supersim.pages.dev/guides/interop/cast?highlight=manuall#7-construct-the-access-list-for-the-message) that calculates it for you on port 8420.
The code above will calculate the correct access list even if youre using a different interop cluster where autorelay is not functioning.
The code above will calculate the correct access list even if you're using a different interop cluster where autorelay is not functioning.
This is because the code implements a [pure function](https://en.wikipedia.org/wiki/Pure_function), which produces consistent results regardless of external state.
In contrast, the `admin_getAccessListByMsgHash` RPC call is not a pure function, it is dependent on system state and therefore less flexible in these situations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ This requirement abstracts away the complexity of cross-chain validation.
Achieving this requires deterministic deployment methods. There are multiple ways to do this.
Here we will use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit).

<Expandable>

title="About this tutorial"
<Expandable title="About this tutorial">

**What you'll learn**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You will need to get some ETH on Sepolia to follow along.

## Get ETH on OP Sepolia

This tutorial explains how estimate transaction costs on OP Sepolia.
This tutorial explains how to estimate transaction costs on OP Sepolia.
You will need to get some ETH on OP Sepolia in order to run the code in this tutorial.

<Info>
Expand Down Expand Up @@ -149,7 +149,7 @@ Here you'll estimate the cost of a simple transaction that sends a small amount
<Steps>
<Step title="Create the unsigned transaction">

Viem makes it easy to create unsigned transactions so you can estimate the cost of a transaction before you a user to sign it.
Viem makes it easy to create unsigned transactions so you can estimate the cost of a transaction before asking a user to sign it.
Here you'll create an unsigned transaction that sends a small amount of ETH from your address to the address `0x1000000000000000000000000000000000000000`.

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

## Get ETH on Sepolia and OP Sepolia

This tutorial explains how to bridge tokens from Sepolia to OP Sepolia. You will need to get some ETH on both of these testnets.

Check warning on line 52 in app-developers/tutorials/transactions/send-tx-from-eth.mdx

View check run for this annotation

Mintlify / Mintlify Validation (optimism-373f39ad) - vale-spellcheck

app-developers/tutorials/transactions/send-tx-from-eth.mdx#L52

Did you really mean 'testnets'?

<Info>
You can use [this faucet](https://sepoliafaucet.com) to get ETH on Sepolia.
Expand All @@ -75,7 +75,7 @@
node
```

This will bring up a Node REPL prompt that allows you to run javascript code.
This will bring up a Node REPL prompt that allows you to run JavaScript code.

## Import dependencies

Expand Down