`stellar contract invoke` should support inputting and outputting with XDR
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start at the stellar contract invoke command and compare its argument handling with stellar contract read --key-xdr and stellar contract invoke ... -- fn --param-file-path .... Trace how invocation parameters and responses are currently represented, then define completion as supporting per-parameter base64 XDR inputs and --output text|xdr output without breaking existing forms.
Written by the indexing model from the issue text.
Description
What problem does your feature solve?
The stellar contract invoke command allows passing the parameters for the invocation in their JSON/textual forms, and outputs the response in the same form. The textual form is very convenient following natural command line patterns for most types, but is still bespoke to the CLI and is not documented. When scripting using XDR there is no clear way to convert back and forth, and passing in XDR and getting XDR back would be more convenient.
What would you like to see?
Every function parameter to have a corresponding --<param>-xdr option that can be used to pass base64 encoded XDR instead. This pattern of providing a second parameter with a different suffix is a pattern already used in the CLI on the stellar contract read --key-xdr ... command, and the stellar contract invoke ... -- fn --param-file-path ... command.
An option added to the invoke command to change the output format of the function call:
--output text|xdr
What alternatives are there?
Open to suggestion but the only alternatives that come to mind are inconsistent with the existing patterns noted above.
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
stellar/stellar-cli#2723 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100