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

Fix transaction summary with contract calls #2530

Open
danielbate opened this issue Jun 17, 2024 · 1 comment
Open

Fix transaction summary with contract calls #2530

danielbate opened this issue Jun 17, 2024 · 1 comment
Labels
bug Issue is a bug p2 Low Priority

Comments

@danielbate
Copy link
Contributor

danielbate commented Jun 17, 2024

The current implementation of the transaction summary uses the param1 property from a contract call receipt to build out the contract element of the summary.

As recently deduced, param1 no longer represents the encoded function selector. Likewise, param2 does not represent the encoded function arguments. They now represent pointers to their respective data.

Therefore currently the only way to deduce the function selector from a transaction is to decode it from the scriptData that was passed on the transaction, as documented here. This is because scriptData, when used with contracts, represents the entire contract call script.

Therefore we need to:

  • Fix the transaction summary to properly display contract call info
  • Add more test cases for contract calls in the transaction summary
  • Check all references to param1 in the SDK and confirm they are not being misused

Reference:

@danielbate danielbate added the bug Issue is a bug label Jun 17, 2024
@danielbate danielbate added this to the 0.x mainnet milestone Jun 17, 2024
@arboleya arboleya added the p1 Medium priority label Jun 17, 2024
@danielbate
Copy link
Contributor Author

I actually think this may be linked to #2448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug p2 Low Priority
Projects
None yet
Development

No branches or pull requests

2 participants