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

Adjust the UI for contract call arguments #176

Open
neithanmo opened this issue Nov 6, 2024 · 1 comment
Open

Adjust the UI for contract call arguments #176

neithanmo opened this issue Nov 6, 2024 · 1 comment
Assignees

Comments

@neithanmo
Copy link
Collaborator

neithanmo commented Nov 6, 2024

Currently, the ledger application has a limitation of processing up to 10 arguments while operating in normal mode. When this threshold is exceeded, the application returns an error message. To process more than 10 arguments, users must switch to expert mode.
We propose either increasing or removing this argument limit entirely to improve functionality in a future release of the app

🔗 zboto Link

@neithanmo neithanmo self-assigned this Nov 6, 2024
@neithanmo neithanmo changed the title Increase limit regarding number of contract call arguments Adjust the UI for contract call arguments Nov 26, 2024
@neithanmo
Copy link
Collaborator Author

neithanmo commented Nov 26, 2024

Following our discussion, we have agreed on the following points:

  • Display Argument Count:
    The app will show the number of arguments in a contract call transaction.

  • Display Arguments Hash:
    The app will display the hash of the serialized contract call arguments. Serialization follows the documentation:

    A length-prefixed list of function arguments, encoded as follows:
    
        A 4-byte length prefix, indicating the number of arguments
        Zero or more binary strings encoding the arguments as Clarity values. Clarity values are serialized as described in the section [Clarity Value Representation](https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md#clarity-value-representation).
    

As a result, there is no need to modify transaction serialization or encoding within the ecosystem. Wallets should:

  • Show the Number of Arguments:
    Display the count of contract call arguments.

  • Show Arguments Hash:
    Display the hash of the arguments as described above.

  • Optionally Display Arguments:
    Optionally show the arguments themselves.

Hashing Algorithm

  • SHA256

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