[Application Development] How can I submit a withdrawal proof myself #692
threetoeddinosaur
started this conversation in
General
Replies: 2 comments 4 replies
-
|
One way to get those params would be to use viem op-stack library. I suspect the following code block in this script would get you the needed param(s). |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Hi there, you can read the source code of VIEM or SDK then build you own script to make the withdraw, there are some clues may give you a help L2 to L1 Withdrawal ProcessContract Methods1. L2 Contract: L2_TO_L1_MESSAGE_PASSERinitiateWithdrawal(
address _target, // receiving address
uint256 _gasLimit, // gas limit
bytes _data // additional data
) payable // withdrawal amount passed via value2. L1 Contract: PORTALproveWithdrawalTransaction(
WithdrawalTx _tx, // withdrawal transaction info
uint256 _l2OutputIndex, // L2 output index
OutputRootProof _proof, // output root proof
bytes[] _withdrawalProof // withdrawal proof
)
finalizeWithdrawalTransaction(
WithdrawalTx _tx // withdrawal transaction info
)Process Flow1. Initiate (on L2)
2. Prove (on L1)
3. Finalize (on L1)
These native contract calls complete the withdrawal process from L2 to L1. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Did you check the documentation?
Documentation Feedback (Optional)
Unclear on where I can find the required details to make the call proveWithdrawalTransaction on OptimismPortal contract. Also unsure if L2OutputOracle is still a valid Contract
What type of issue are you experiencing?
Issue Description
I am following the withdrawal flow as given per the documentation but instead of using the sdk for proof submittion, I am submitting the proof myself by making call to this function
of OptimismPortal2 Contract.
I am struggling with and how to achieve the values uint256 _disputeGameIndex,Types.OutputRootProof calldata _outputRootProof and bytes[] calldata _withdrawalProof
Steps to Reproduce
I called the sendMessage function on L2CrossDomainMessenger which internally calls the initializeWithdrawal function of L2ToL1MessageParser contract
Are you using a specific library or SDK?
Are you using the latest version of the library/SDK?
Environment Details
No response
Troubleshooting Attempts
No response
What type of support do you need?
Additional Information
No response
Feedback
No response
Beta Was this translation helpful? Give feedback.
All reactions