Skip to content

fix: update example_swap to use new L2ToL1MembershipWitness API#21466

Merged
sklppy88 merged 2 commits intomerge-train/fairiesfrom
claudebox/fix-docs-example-swap
Mar 13, 2026
Merged

fix: update example_swap to use new L2ToL1MembershipWitness API#21466
sklppy88 merged 2 commits intomerge-train/fairiesfrom
claudebox/fix-docs-example-swap

Conversation

@AztecBot
Copy link
Collaborator

Summary

PR #21231 changed the computeL2ToL1MembershipWitness API signature from (node, epoch, message) to (node, message, txHash), but the example_swap docs example (added in PR #20233) was written against the old API. This caused the merge-train CI to fail with TypeError: Cannot read properties of undefined (reading 'siblingPath') because the function received wrong arguments and returned undefined.

Changes

  • Removed RollupContract import and usage (no longer needed to manually compute epoch)
  • Updated both computeL2ToL1MembershipWitness calls to use new signature: (node, message, txHash)
  • Get epoch numbers from the returned witness (witness.epochNumber) instead of computing manually

ClaudeBox log: https://claudebox.work/s/5eb93c1235ed3384?run=2

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 13, 2026
@sklppy88 sklppy88 marked this pull request as ready for review March 13, 2026 05:39
@sklppy88 sklppy88 requested a review from a team as a code owner March 13, 2026 05:39
@sklppy88 sklppy88 merged commit 5847ee3 into merge-train/fairies Mar 13, 2026
16 checks passed
@sklppy88 sklppy88 deleted the claudebox/fix-docs-example-swap branch March 13, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants