Skip to content

Commit

Permalink
update viem docs (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitaliano authored Oct 8, 2024
1 parent 25efe39 commit eea9088
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions docs/src/guides/interop/relay-using-viem.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,13 @@ const { id: messageIdentifier, payload: l2ToL2CrossDomainMessengerCalldata } =
// ##########

// 4. Execute the relayERC20 function on OPChainB
console.log("Building execute relayERC20 on OPChainB...");
const executeArgs = await opChainBClient.buildExecuteL2ToL2Message({
console.log("Executing L2 to L2 message on OPChainB...");
const executeTxHash = await opChainBClient.executeL2ToL2Message({
id: messageIdentifier,
target: L2_TO_L2_CROSS_DOMAIN_MESSENGER_ADDRESS,
message: l2ToL2CrossDomainMessengerCalldata,
});

console.log("Executing L2 to L2 message on OPChainB...");

const executeTxHash = await opChainBClient.executeL2ToL2Message(executeArgs);

await opChainBClient.waitForTransactionReceipt({
hash: executeTxHash,
});
Expand Down Expand Up @@ -297,17 +293,13 @@ const { id: messageIdentifier, payload: l2ToL2CrossDomainMessengerCalldata } =
// OP Chain B
// ##########
// 4. Execute the relayERC20 function on OPChainB
console.log("Building execute relayERC20 on OPChainB...");
const executeArgs = await opChainBClient.buildExecuteL2ToL2Message({
console.log("Executing L2 to L2 message on OPChainB...");
const executeTxHash = await opChainBClient.executeL2ToL2Message({
id: messageIdentifier,
target: L2_TO_L2_CROSS_DOMAIN_MESSENGER_ADDRESS,
message: l2ToL2CrossDomainMessengerCalldata,
});

console.log("Executing L2 to L2 message on OPChainB...");

const executeTxHash = await opChainBClient.executeL2ToL2Message(executeArgs);

await opChainBClient.waitForTransactionReceipt({
hash: executeTxHash,
});
Expand Down

0 comments on commit eea9088

Please sign in to comment.