You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/interop/tutorials/relay-messages-cast.mdx
+8-8
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ import { Callout } from 'nextra/components'
24
24
import { Steps } from'nextra/components'
25
25
26
26
<Callout>
27
-
The SuperchainERC20 standard is ready for production deployments.
28
-
Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.
27
+
The SuperchainERC20 standard is ready for production deployments.
28
+
Please note that the OP Stack interoperability upgrade, required for crosschain messaging, is currently still in active development.
29
29
</Callout>
30
30
31
31
# Relaying interop messages using `cast`
32
32
33
-
This tutorial walks through how to form a [message identifier](https://specs.optimism.io/interop/messaging.html?utm_source=op-docs&utm_medium=docs#message-identifier) to relay a [L2ToL2CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) cross-chain call.
33
+
This tutorial walks through how to form a [message identifier](https://specs.optimism.io/interop/messaging.html?utm_source=op-docs\&utm_medium=docs#message-identifier) to relay a [L2ToL2CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) cross-chain call.
34
34
35
35
We'll perform the SuperchainERC20 interop transfer in [Supersim first steps](/app-developers/tutorials/supersim/getting-started/first-steps##send-an-interoperable-superchainerc20-token-from-chain-901-to-902-l2-to-l2-message-passing) by manually relaying the message without the autorelayer.
36
36
@@ -59,7 +59,7 @@ Sending an interop message using the `L2ToL2CrossDomainMessenger`:
59
59
## Message identifier
60
60
61
61
A message identifier uniquely identifies a log emitted on a chain.
62
-
The sequencer and smart contracts (CrossL2Inbox) use the identifier to perform [invariant checks](https://specs.optimism.io/interop/messaging.html?utm_source=op-docs&utm_medium=docs#messaging-invariants) to confirm that the message is valid.
62
+
The sequencer and smart contracts (CrossL2Inbox) use the identifier to perform [invariant checks](https://specs.optimism.io/interop/messaging.html?utm_source=op-docs\&utm_medium=docs#messaging-invariants) to confirm that the message is valid.
63
63
64
64
```solidity
65
65
struct Identifier {
@@ -169,15 +169,15 @@ struct Identifier {
169
169
170
170
An access list must be passed along with the relay message tx. There are two admin RPC methods that can be used to construct the access list: `admin_getAccessListByMsgHash` and `admin_getAccessListForIdentifier` and.
171
171
172
-
a. To get the access list using the `admin_getAccessListByMsgHash` RPC method, call the method with the message hash.
172
+
a. To get the access list using the `admin_getAccessListByMsgHash` RPC method, call the method with the message hash.
173
173
174
-
1. Retrieve the message hash from the supersim logs
174
+
1.Retrieve the message hash from the supersim logs
175
175
176
176
```sh
177
177
INFO [04-04|14:21:15.587] L2ToL2CrossChainMessenger#SentMessage sourceChainID=901 destinationChainID=902 nonce=0 sender=0x4200000000000000000000000000000000000028 target=0x4200000000000000000000000000000000000028 msgHash=0xccff97c17ef11d659d319cbc5780235ea03ef34b0fa34f40b208a9519f257379 txHash=0x746a3e8a3a0ed0787367c3476269fa3050a2f9113637b563a4579fbc03efe5c4
178
178
```
179
179
180
-
2. Call `admin_getAccessListByMsgHash` with the message hash.
180
+
2.Call `admin_getAccessListByMsgHash` with the message hash.
Call `relayMessage` on the [L2ToL2CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) with the access list.
0 commit comments