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

Implement Input Data Message (IDM) Display #819

Open
pmjanus opened this issue Aug 6, 2024 · 0 comments
Open

Implement Input Data Message (IDM) Display #819

pmjanus opened this issue Aug 6, 2024 · 0 comments

Comments

@pmjanus
Copy link
Contributor

pmjanus commented Aug 6, 2024

Implement Input Data Message (IDM) Display for Ethereum Transactions

Description

We need to implement a feature to display and handle Input Data Messages (IDM) for transactions. This feature will improve user experience by providing clear indication and easy access to human-readable messages included in transaction data.

Important: When a transaction is a transfer, and input data is not 0x0 all input data should be treated as an Input Data Message in the Transaction Action field and UTF-8 decoded.

Current Behavior

Currently, our system does not distinguish or specially handle transactions that include human-readable messages in their input data.

Desired Behavior

  1. Treat all input data as potential Input Data Messages.
  2. Attempt to decode all input data using UTF-8 encoding.
  3. Display the decoded input data in the Transaction Action field.
  4. Visually indicate the presence of these messages in the transaction list or details view.
  5. Provide a way for users to easily view the full decoded message content.

Implementation Details

Detection and Decoding

  • Attempt to decode all input data using UTF-8 encoding.
  • If decoding fails, display the original hexadecimal input data.

Display

  • Show the decoded input data (or original hex if decoding fails) in the Transaction Action field.
  • Add an indicator (e.g., an asterisk or icon) next to transactions with input data.
  • Implement a hover tooltip with the message: "Includes data in Input Data."
  • Create an expandable section or modal to display the full decoded message when requested.

Additional Considerations

  • Handle large input data efficiently to prevent display and performance issues.
  • Implement proper escaping and sanitization of decoded messages to prevent XSS vulnerabilities.
  • Consider adding support for other common encodings if UTF-8 decoding fails.

Acceptance Criteria

  1. All transactions with input data are treated as having an Input Data Message.
  2. The Transaction Action field displays the UTF-8 decoded input data for all transactions. Example:
  3. If UTF-8 decoding fails, the original hexadecimal input data is displayed.

Resources

Related Issues

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

No branches or pull requests

1 participant