Skip to content

Conversation

@rube-de
Copy link
Collaborator

@rube-de rube-de commented Dec 11, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the RLP (Recursive Length Prefix) encoding implementation for mock receipt proofs by replacing custom RLP encoding logic with ethers v6's native encodeRlp function. The change simplifies the codebase by removing approximately 60 lines of manual RLP encoding code and leveraging the well-tested native implementation.

Key Changes:

  • Replaced custom encodeRlpBytes, encodeRlpList, and encodeRlpUint implementations with ethers v6 native encodeRlp and getBytes functions
  • Added comprehensive unit tests to verify RLP encoding correctness and decodability
  • Updated documentation to clarify the use of ethers v6 native RLP encoding

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
contracts/test/helpers/proofHelpers.ts Refactored to use ethers v6 native RLP encoding functions, removing ~60 lines of custom encoding logic
contracts/test/unit/proofHelpers.test.ts New test suite with comprehensive coverage of RLP encoding behavior, proof structure, and data integrity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rube-de rube-de marked this pull request as ready for review December 11, 2025 20:25
@rube-de rube-de merged commit eace9b4 into master Dec 12, 2025
11 checks passed
@rube-de rube-de deleted the rube/15-evaluate-if-for-proofhelpersts-ethersutilsrlp-may-be-better-suited branch December 12, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate if for proofHelpers.ts ethers.utils.RLP may be better suited

3 participants