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

Avoid double jamming prove arguments in Anoma CLI commands #3298

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

paulcadman
Copy link
Collaborator

This PR changes the way program arguments are processed by the juvix dev nockma run {with-client, ephemeral-client} and juvix dev anoma prove CLI commands.

Files provided in --arg 'bytes:..' and --arg 'base64:..' flags are now assumed to be jammed and are not jammed again before they are submitted to the Anoma client.

Changes in anoma-apps

The Anoma apps in anoma-apps use the prove CLI command and so the signatures of their main functions will change:

For example, in HelloWorld.juvix the logic is passed as a jammed noun in an argument to prove.

Previously the argument was jammed again before being sent and so had to be decoded in the main function before being used (the Anoma client cues (i.e decodes) the argument once before calling the program).

main (encodedLogic : Encoded Logic) (message : String) : TransactionRequest

After the change in this PR, the logic argument is not jammed again before being sent to the Anoma client and so the signature of the main function should be changed to:

main (logic : Logic) (message : String) : TransactionRequest

@paulcadman paulcadman added this to the 0.6.10 milestone Jan 29, 2025
@paulcadman paulcadman self-assigned this Jan 29, 2025
@paulcadman paulcadman changed the title Avoid double jamming terms from bytes and base64 prove arguments Avoid double jamming prove arguments in Anoma CLI commands Jan 29, 2025
@janmasrovira janmasrovira merged commit 27cc711 into main Jan 29, 2025
4 checks passed
@janmasrovira janmasrovira deleted the fix-double-encoding branch January 29, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants