Update smart contract CLI examples#45
Merged
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s smart-contract and Stellar Asset Contract (SAC) documentation examples to match current Stellar CLI behavior and the current Soroban/Rust target output layout.
Changes:
- Update build artifact paths from
wasm32-unknown-unknowntowasm32v1-none(including CI snippet guidance). - Remove obsolete
stellar keys generate --globalusage from examples. - Replace
--sourcewith the canonical--source-accountflag in deploy/invoke and SAC deploy examples.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| skills/smart-contracts/testing.md | Updates local/testnet deploy + invoke examples and CI target guidance to wasm32v1-none and --source-account. |
| skills/smart-contracts/SKILL.md | Updates the primary build/deploy/invoke quickstart examples to the new target path and canonical flags. |
| skills/smart-contracts/development.md | Updates contract import path, size-check commands, and troubleshooting CLI identity fix to the current target/CLI usage. |
| skills/assets/SKILL.md | Updates SAC deploy example to use --source-account instead of --source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
marcelosalloum
added a commit
to marcelosalloum/stellar-dev-skill
that referenced
this pull request
Jul 8, 2026
The rebase resolution takes this branch's rewrite over stellar#45's edits to the old files; the target and --global fixes from stellar#45 are already covered, but its --source → --source-account spelling was the one change worth keeping.
kaankacar
pushed a commit
that referenced
this pull request
Jul 8, 2026
* Update smart-contracts skill to protocol 27 (soroban-sdk/env v27)
Every technical claim was verified against rs-soroban-sdk v27.0.0-rc.1,
rs-soroban-env v27.0.0, stellar-cli 27.0.0, and live network settings;
the example contract and test compile and pass against the rc SDK.
Corrections to stale facts:
- wasm32v1-none is the only supported target (was wasm32-unknown-unknown)
- contract size limit is 128KB on mainnet (was 64KB); limits table refreshed
from live `stellar network settings` with a pointer to requery
- #[contractevent] example gained the required #[topic] markers; the
deprecated env.events().publish() is no longer shown
- token::TokenClient replaces the deprecated token::Client alias;
SEP-41 transfer destination is MuxedAddress since v23
- crate-type includes "lib" (matches stellar contract init scaffold)
New protocol coverage:
- CAP-71 (p27): custom-account auth delegation via env.custom_account()
- CAP-78 (p26): extend_ttl_with_limits; CAP-73: SAC trust(); CAP-82:
checked 256-bit arithmetic
- p23+ auto-restore of archived persistent entries in the rw footprint
- SDK 25+ mainnet resource limits enforced in unit tests (cost_estimate)
Deepened from a correctness pass on auth/storage/fees semantics: auth
trees and cross-contract propagation (authorize_as_current_contract),
__check_auth with correct Hash<32> signature, TTL-is-not-a-security-
boundary, footprint/parallelism guidance, contract-side SEP-41/SAC
semantics, and token-consumer + fee-griefing review checklists.
* Link Stellar Lab network-limits page for live resource limits
The quoted limits are the current on-chain mainnet config settings and
drift by validator vote; the Lab page is the canonical human-friendly
view of the live values.
* Strengthen skill description triggers for Soroban-phrased prompts
Skill selection matches on the frontmatter description text; name the
terms users actually type (Soroban, soroban-sdk, SEP-41, SAC, auth/
storage/TTL errors) so Soroban-phrased requests reliably route here.
* Fix CLI syntax, restore token event table, polish from review pass
An adversarial fact-check pass against CLI v27 caught that
`stellar keys generate --global` no longer exists (keys are stored
globally by default) — fixed in all four occurrences.
A coverage diff against the pre-merge sources flagged genuinely lost
content, restored here verified against v27 source:
- SEP-41 token event shapes table (re-derived from soroban-token-sdk
and the env SAC event code, which also corrects the older shapes:
mint has no admin topic, SAC appends the SEP-0011 asset topic,
muxed transfers use a {to_muxed_id, amount} map)
- "never require_auth your own address inside __check_auth" rule
- routing table now lists constructors/factories/governance explicitly
* Make SDK version guidance self-updating instead of a hardcoded pin
27.0.0 final ships imminently and later majors will follow, so a pinned
rc string would rot fast. Teach the durable rule instead: SDK major =
protocol version, resolve the current release from crates.io / GitHub
releases, and check the network's live protocol via getVersionInfo or
Stellar Lab. The Cargo.toml example now pins the major only.
* Restore exact rc pin in the setup snippet
soroban-sdk = "27" won't resolve on crates.io until 27.0.0 final ships,
so the copy-paste snippet pins the rc explicitly; the Versions section
still teaches how to resolve the current release.
* Use --source-account in CLI examples, matching #45
The rebase resolution takes this branch's rewrite over #45's edits to the
old files; the target and --global fixes from #45 are already covered, but
its --source → --source-account spelling was the one change worth keeping.
* Clarify that test snippets live in src/test.rs, not lib.rs
The inner #![cfg(test)] attribute is correct for the src/test.rs module
that stellar contract init scaffolds, but pasted into lib.rs it would
gate the whole crate behind cfg(test). Say so next to the snippets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wasm32-unknown-unknowntowasm32v1-nonestellar keys generate --globalusage--source-accountin contract deploy/invoke and SAC examplesCloses #44.
Why
Current Stellar Docs say
stellar contract buildtargetswasm32v1-noneand emits artifacts undertarget/wasm32v1-none/release/. Currentstellar 27.0.0CLI help uses--source-account <SOURCE_ACCOUNT>for deploy/invoke, while--sourceremains accepted as an alias.stellar keys generate --helpno longer lists--global.Verification
rg -n "wasm32-unknown-unknown|--global|--source " skills/smart-contracts skills/assetsreturns no matchesgit diff --check