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 · 2 comments
Open

Fix transaction summary with contract calls #2530

danielbate opened this issue Jun 17, 2024 · 2 comments
Labels
bug Issue is a bug

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 label Jun 17, 2024
@danielbate
Copy link
Contributor Author

I actually think this may be linked to #2448

@danielbate
Copy link
Contributor Author

Currently some sway docs are being written up around encoding v1 that can assist us with this

@arboleya arboleya added temp-p1 and removed temp-M labels Sep 7, 2024
@arboleya arboleya added the temp:notion label Sep 8, 2024 — with Linear
@arboleya arboleya added the temp-linear label Sep 8, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants