Skip to content

fix(traces): decode return_data for Identity precompile #11289

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fifalodm
Copy link
Contributor

@fifalodm fifalodm commented Aug 13, 2025

Motivation

The decode function for precompiles had a TODO to decode return_data.
For the Identity precompile (0x04), this is trivial since the output is exactly the same as the input, making it safe and easy to implement.

Solution

  • Implemented decoding of return_data for the Identity precompile.
  • Used hex::encode_prefixed(&trace.output) to match existing hex formatting in the project.
  • Kept label "PRECOMPILES" and followed the existing style of the decoder.
    let return_data =
        if trace.address == IDENTITY { Some(hex::encode_prefixed(&trace.output)) } else { None };

PR Checklist

  • No new tests needed (change is trivial and affects debug output only)
  • No new documentation needed
  • No breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant