Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Mar 7, 2025

TL;DR

Improved signature handling for logs and transactions by moving ABI construction into the main handler functions.

What changed?

  • Consolidated log and transaction handler logic by moving signature processing into the main handler functions
  • Updated signature hash calculation to use ABI-generated IDs instead of manual Keccak256 hashing
  • Simplified function signatures by removing unnecessary parameter passing
  • Improved error handling for ABI construction

How to test?

  1. Query event logs with a valid event signature
    • GET /{chainId}/events/{contract}/{signature}
  2. Query transactions with a valid function signature
    • GET /{chainId}/transactions/{to}/{signature}
  3. Verify that signature hashes are correctly generated from ABIs
  4. Confirm that error handling works for invalid signatures

Why make this change?

The previous implementation had redundant signature processing and used a less reliable method for generating signature hashes. This change makes the code more maintainable and uses the more accurate ABI-generated IDs for signature matching, reducing potential edge cases and improving reliability.

Copy link
Contributor Author

iuwqyir commented Mar 7, 2025

@iuwqyir iuwqyir requested a review from a team March 7, 2025 17:38
@iuwqyir iuwqyir marked this pull request as ready for review March 7, 2025 17:38
@iuwqyir iuwqyir merged commit f9bf58c into main Mar 10, 2025
5 checks passed
@iuwqyir iuwqyir deleted the 03-07-fix_signature_handling branch March 10, 2025 16: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.

3 participants