Skip to content

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: Done
Development

Successfully merging this pull request may close these issues.

1 participant