Repository navigation
Correct Stellar CLI binding languages and spec command - #3153
stellar-doxie[bot] wants to merge 3 commits into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
🤖 Automated message from the Stellar Triage Bot. Reviewing because this is my own PR for Raven issue #3151. Verified: the binding list and the What I checked
|
…inding-languages # Conflicts: # docs/build/guides/dapps/frontend-guide.mdx
|
🤖 Automated message from Doxie. Back on this because #3158 landed on
Ready to merge. What I checked
|
ElliotFriend
left a comment
There was a problem hiding this comment.
Looks good, one suggestion inline.
| Sometimes, you may not have access to the contract's source code or the ability to compile it. In such cases, you must use the [`stellar contract fetch`](../../../tools/cli/stellar-cli#stellar-contract-fetch) command to download the contract's Wasm binary and generate the spec. | ||
|
|
||
| Finally, we use the [`stellar bindings`](/docs/tools/cli/stellar-cli#stellar-contract-bindings) command to generate the contract spec from the Wasm binary. | ||
| Finally, we use the [`stellar contract info interface`](/docs/tools/cli/stellar-cli#stellar-contract-info-interface) command to output the contract spec from the Wasm binary. |
There was a problem hiding this comment.
info interface prints Rust by default, so this needs the flag for the JSON spec.
| Finally, we use the [`stellar contract info interface`](/docs/tools/cli/stellar-cli#stellar-contract-info-interface) command to output the contract spec from the Wasm binary. | |
| Finally, we use the [`stellar contract info interface`](/docs/tools/cli/stellar-cli#stellar-contract-info-interface) command with `--output json` to output the contract spec from the Wasm binary. |
There was a problem hiding this comment.
🤖 Automated message from Doxie.
Applied in 26bdf26. Confirmed: stellar-cli 30.0.1 contract info interface --help gives [default: rust]. frontend-guide.mdx:370 already names --output json.
|
🤖 Automated message from Doxie. Back on this because @ElliotFriend reviewed. Applied the Ready to merge. What I checked
|
🤖 Automated message from the Stellar Triage Bot.
Closes #3151
Working this because the raven label called me in on a Raven finding (sd-110).
The Lab Contract Explorer page said the Stellar CLI generates bindings in TypeScript, JSON, Rust, Python, and Java. The CLI has no JSON bindings, and Python and Java need an external plugin. This PR corrects the list. It also fixes two pages that sent readers to
stellar contract bindingsfor the JSON contract spec, which the CLI no longer does.Why this matters
A reader runs
stellar contract bindings jsonorpythonand gets an error. Readers of the other two pages look for a spec command in the wrong place.Changes
docs/tools/lab/smart-contracts/contract-explorer.mdx: Rust from the CLI; TypeScript from the JavaScript Stellar SDK generator (the CLI command is deprecated); Python, Java, and others through a plugin. The two relative links on that line are now root-relative.docs/learn/fundamentals/contract-development/overview.mdx:123anddocs/build/guides/dapps/frontend-guide.mdx:370: point tostellar contract info interface, which outputs the spec. The second line also had the typo "genrated".Sweep
docs/build/guides/dapps/working-with-contract-specs.mdx:73and:86teachstellar contract bindings json. Left out: CLI commands on 8 pages fail with the current CLI: removed flags and subcommands #2973 already tracks that page, and it needs a rewrite (the JSON shape differs), not a command swap.docs/tools/cli/stellar-cli.mdxis already correct.stellar/laboratorysrc/app/(sidebar)/smart-contracts/contract-explorer/components/Bindings.tsx:8-11.Verified
Verified against stellar-cli 30.0.1, the newest release. The issue cited 30.0.1 too. The page pins none.
stellar contract bindings --help: rust; typescript marked deprecated; python, java, flutter, swift, php, kmp "(requires external plugin)".stellar contract bindings python: "not implemented in the stellar-cli" and points to lightsail-network/stellar-contract-bindings.stellar contract bindings json: "unrecognized subcommand 'json'".stellar contract info interface --wasm hello_world.wasm --output json-formattedprinted thefunction_v0spec of a freshstellar contract initcontract.## CLIheading that#clilinks to (stellar/js-stellar-sdk main README.md:291).pnpm format:mdx,pnpm checkandpnpm check:linkspass locally.Not verified
Overlaps
docs/learn/fundamentals/contract-development/overview.mdx. The hunks are in different sections (line 68 vs line 123), so either can merge first.For the Raven recheck (sd-110)