Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transaction data decoding support #124

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

iuwqyir
Copy link
Collaborator

@iuwqyir iuwqyir commented Dec 5, 2024

TL;DR

Added transaction data decoding functionality for transactions when a function signature is provided.

What changed?

  • Introduced new ABI parsing utilities to handle function signatures
  • Added support for decoding transaction input data using parsed ABI
  • Created a new DecodedTransaction type that includes the original transaction data along with decoded parameters
  • Enhanced transaction handlers to decode transaction data when a function signature is provided

How to test?

  1. Make a request to /{chainId}/transactions/{contractAddress}/{signature}
  2. Verify that the response includes decoded transaction data with:
    • Function name
    • Function signature
    • Decoded input parameters as key-value pairs
  3. Test with various function signatures, including those with complex parameter types (tuples, arrays)
  4. Verify that regular transaction endpoints continue to work without decoded data

Why make this change?

To improve transaction data readability by automatically decoding the raw input data into human-readable format when the function signature is known. This makes it easier for users to understand the actual parameters passed in contract interactions without having to manually decode the transaction data.

Copy link
Collaborator Author

iuwqyir commented Dec 5, 2024

@iuwqyir iuwqyir changed the title decode transaction inputs Add transaction data decoding support Dec 5, 2024
@iuwqyir iuwqyir requested a review from AmineAfia December 5, 2024 23:15
@iuwqyir iuwqyir marked this pull request as ready for review December 5, 2024 23:15
@iuwqyir iuwqyir force-pushed the 12-06-decode_transaction_inputs branch from b669de6 to 226bdae Compare December 5, 2024 23:17
@iuwqyir iuwqyir mentioned this pull request Dec 6, 2024
@iuwqyir iuwqyir force-pushed the 12-06-decode_transaction_inputs branch from 226bdae to d3ab46d Compare December 6, 2024 13:39
Copy link
Collaborator Author

iuwqyir commented Dec 6, 2024

Merge activity

  • Dec 6, 2:56 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 6, 2:58 PM EST: Graphite rebased this pull request as part of a merge.
  • Dec 6, 2:58 PM EST: A user merged this pull request with Graphite.

@iuwqyir iuwqyir changed the base branch from 12-05-do_not_poll_more_than_the_configured_amount_when_filling_gaps to graphite-base/124 December 6, 2024 19:56
@iuwqyir iuwqyir changed the base branch from graphite-base/124 to main December 6, 2024 19:56
@iuwqyir iuwqyir force-pushed the 12-06-decode_transaction_inputs branch from d3ab46d to f996013 Compare December 6, 2024 19:57
@iuwqyir iuwqyir merged commit cdef621 into main Dec 6, 2024
5 checks passed
@iuwqyir iuwqyir deleted the 12-06-decode_transaction_inputs branch December 6, 2024 19:58
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.

2 participants