-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOCS]Potential Missing Steps in "Communicating between OP Stack and Ethereum in Solidity" Tutorial #1217
Comments
Hi @opfocus, thank you for bringing this to our attention. Could you please share which specific steps you found to be missing? This would help us ensure we address all the gaps in the tutorial. |
9. Import Viem - Add Import Modules const { createPublicClient, http, createWalletClient } = require("viem");
const { optimismSepolia, sepolia } = require("viem/chains");
const { publicActionsL1, publicActionsL2, walletActionsL1 } = require("viem/op-stack");
const { privateKeyToAccount } = require("viem/accounts"); 10. Load your transaction hash - Remove const transactionHash = process.env.TUTORIAL_TRANSACTION_HASH Reason for removal: 11. Create the RPC providers and wallets - Change const l1Provider = createPublicClient({ chain: sepolia, transport: http("https://eth-sepolia.g.alchemy.com/v2/***") }).extend(publicActionsL1())
const l2Provider = createPublicClient({ chain: optimismSepolia, transport: http("https://opt-sepolia.g.alchemy.com/v2/***") }).extend(publicActionsL2())
const account = privateKeyToAccount(process.env.TUTORIAL_PRIVATE_KEY)
const l1Wallet = createWalletClient({
chain: sepolia,
transport: http("https://eth-sepolia.g.alchemy.com/v2/***")
}).extend(walletActionsL1()) 12. Wait until the message is ready to prove - Add receipt retrieval method const receipt = await l2Provider.getTransactionReceipt({
hash: process.env.TUTORIAL_TRANSACTION_HASH
})
console.log('Waiting for message to be provable...')
await l1Provider.getWithdrawalStatus({
receipt,
targetChain: l2Provider.chain,
}) 13. Prove the message on L1 - Change console.log('Proving message...')
const { output, withdrawal } = await l1Provider.waitToProve({
receipt,
targetChain: l2Provider.chain,
}) 14. Build parameters to prove the withdrawal on the L2 - New addition const args = await l2Provider.buildProveWithdrawal({
account,
output,
withdrawal,
})
const hash = await l1Wallet.proveWithdrawal(args) Note: Steps 14–16 have not been tested due to the challenge period. Possible issues include:
For more details on the withdrawal process, refer to the Vieme withdrawal guide. |
@krofax - @ZakAyesh and @hamdiallam will be good resources for this |
I believe there might be a few crucial steps missing in the "Communicating between OP Stack and Ethereum in Solidity" tutorial. The steps related to the relevant actions may be connected to the instructions found in https://viem.sh/op-stack/actions/proveWithdrawal. I am currently investigating this and will appreciate any guidance or clarification on this matter.
The text was updated successfully, but these errors were encountered: