feat(cli,sdk): add claim-native-withdraw command#222
Draft
avilagaston9 wants to merge 1 commit intomainfrom
Draft
feat(cli,sdk): add claim-native-withdraw command#222avilagaston9 wants to merge 1 commit intomainfrom
avilagaston9 wants to merge 1 commit intomainfrom
Conversation
…als. The native rollup mode (ethrex PR #6248) uses MPT state proofs instead of batch/merkle proofs for L2→L1 withdrawals. This adds SDK functions to fetch the proof via `ethrex_getNativeWithdrawalProof` RPC (with retry logic) and submit `claimWithdrawal` on the L1 NativeRollup contract, plus the corresponding CLI command wiring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ethrex PR #6248 adds a "native rollup" mode where L2→L1 withdrawals use MPT state proofs instead of batch/merkle proofs. Rex needs a command to finalize these native rollup withdrawals by fetching the proof from L2 and submitting the claim transaction on L1.
Description
Adds
rex l2 claim-native-withdrawcommand that:ethrex_getNativeWithdrawalProofRPC (with retry logic, up to 60 attempts)claimWithdrawal(address,address,uint256,uint256,uint256,bytes[],bytes[])on the L1 NativeRollup contractUsage:
Changes:
sdk/src/l2/withdraw.rs—NativeWithdrawalProofstruct,get_native_withdrawal_proof(),claim_native_withdraw()cli/src/commands/l2.rs—ClaimNativeWithdrawcommand variant and handler