-
Notifications
You must be signed in to change notification settings - Fork 9
Expanded example for env-sigs #358
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
base: master
Are you sure you want to change the base?
Conversation
docs/builtins/Repl/env-sigs.md
Outdated
The following example illustrates using the `env-sigs` function to sign a transaction with a specific public key and capability in the Pact REPL: | ||
|
||
```pact | ||
(env-sigs [{"key": "9a23bf6a61f753d3ffa45c02b33c65b9dc80b8fb63857debcfe21fdb170fcd99", "caps": [PAYADMIN]}]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this hasn't been tested and is incorrect.
Caps must be enclosed in ()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help, @CryptoPascal31 !
I know there are some other typos or untested examples, so please do feel free to flag anything you find or submit a fix directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not only typos... The current Pact 5 documentation has a lot of misleading (and even some totally wrong) statements on every page...
docs/builtins/Repl/env-sigs.md
Outdated
,'caps: [(MINT (read-msg "token-id") (read-string 'account) 4.0)]} | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"key"
and "caps"
here as well please :)
PR checklist:
Additionally, please justify why you should or should not do the following: