Repository navigation
Agent CLI deploy guide: use the alias instead of capturing the contract ID - #3161
stellar-triage-bot[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. Finishing my own PR for #2980, which @kaankacar asked for with Verified against stellar-cli 30.0.1 source and the live preview. I pushed one fix: the page now quotes the full What I checkedOnly what this review added to the PR body or found different from it:
|
|
/triage Run step 4 ( |
|
🤖 Automated message from the Stellar Triage Bot. Back on this because @kaankacar asked with I could not run step 4. This review lane installs no stellar-cli, and its permissions block What I checked
|
|
🤖 Automated message from the Stellar Triage Bot. Back on this because @kaankacar asked with Step 4 ran on testnet with stellar-cli 30.0.1 and works. The run found that the |
|
🤖 Automated message from the Stellar Triage Bot. Reviewing because @kaankacar asked with Step 4 ran on testnet in the issue lane, which answers the open question. I checked every changed line against stellar-cli 30.0.1 source and the live preview. Ready to merge. What I checkedOnly what this review added to the PR body or found different from it:
|
🤖 Automated message from the Stellar Triage Bot.
Closes #2980
Working this because @kaankacar asked with
/triageon #2980. Step 3 of the agent CLI deploy guide no longer captures the contract ID. It showsstellar contract alias showfor when a tool needs the ID. Step 4's function-list command now passes--source, like every othercontractcommand on the page. This replaces the closed #3086.Why this matters
Agents copy this guide as is. Step 3 taught them to store deploy output in an unused shell variable, which
stellar skilltells them not to do. Step 4's-- -hcommand had no--source, so an agent with no saved default got exit code 2 instead of the function list.Sweep
Searched
=$(stellar contract deploy,$(stellar contract,--id "$,CONTRACT_ID=,alias showanddeploy ... > / | tee / .envin docs/, snippets/, openapi/, openrpc/ and .mintlify/skills/.build-and-deploy-contracts.mdx:53: fixed here.docs/build/guides/dapps/initialization.mdx:159: left. The script prints the captured ID, and a maintainer approved it in Fix the deploy, mint and init script on the dapp initialization guide #2989. It is a human setup script, not an agent guide.docs/build/apps/dapp-frontend.mdx:166-177: left. The frontend template needs the ID to build its bindings.SAC=$(stellar contract id asset ...)insend-tokens.mdx:68anddelegate-spending.mdx:158: left. That command computes a fixed asset contract address. It is not deploy output..mintlify/skills/cross-chain/SKILL.md"$OFT": left. It names an existing contract, not a deploy output, and skill pages are fixed upstream.alias show. That is upstream, in stellar skill tells agents not to capture contract IDs but not how to get one back stellar-cli#2880 (open).contract invoke ... -- -hwithout--source: onlybuild-and-deploy-contracts.mdx:78, fixed here.reference/architecture.mdx:132-133already passes--source agent-1.Verified
Verified against stellar-cli 30.0.1. The issue cited 28.1.0. The page pins none.
contract init,contract build,keys generate --fund,contract deploy ... --alias hello_world, thencontract invoke --id hello_world --source agent-1 --network testnet -- hello --to world.["Hello","world"]alone. stderr saidSimulation identified as read-only. Send by rerunning with --send=yes.No transaction was sent.--send=yes: the CLI submitted a transaction and printed the same value.-- -hwith--source agent-1: listshelloon stdout, exits 1. Without--sourceand with no saved default: exits 2 withthe following required arguments were not provided: --source-account.-- hello -h: shows--to <String>on stdout, exits 1. The top-level-hlists only function names, so the page now says how to see arguments.stellar contract alias show hello_world --network testnetprinted the same ID alone on stdout. The info line goes to stderr.--network futurenetit exits 1 withno contract found with alias 'hello_world' for network ...(stellar-cli@v30.0.1cmd/soroban-cli/src/commands/contract/alias/show.rs).alias showto the new ID. The overwrite warning isprint.warnln(stellar-cli@v30.0.1cmd/soroban-cli/src/commands/contract/deploy/wasm.rs:272).stellar contract info interface --id hello_world --network testnetresolved the alias.cmd/soroban-cli/src/commands/skill/SKILL.md:45-59.AGENTS.mdtemplate thatinitwrites is the same blob at v28.1.0 and v30.0.1, and it deploys with--aliastoo. So the page's link to it is still correct.pnpm format:mdx,pnpm checkandpnpm check:linkspass.hellocannot test it, so it was checked from source:output_to_stringreturns an empty string when the function has no outputs (stellar-cli@v30.0.1cmd/soroban-cli/src/commands/contract/arg_parsing.rs:535-551), andinvokeprints it withprintln!(invoke.rsrun).Not verified
Nothing left.