Update deployer/upgrade docs for soroban-sdk 28.0.0 - #2864
leighmcculloch wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Dependency pins and referenced example revisions remain incompatible with the newly documented v28 APIs.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates Rust contract examples for Soroban SDK v28 deployment, upgrade, and token-event APIs.
Changes:
- Migrates deployment examples to
deploy_contract. - Migrates upgrades to
update_current_contract. - Renames the approval event field to
live_until_ledger.
Recommendation: NEEDS-CHANGES — update the remaining SDK v27 pins and stale example references; coordinate merging with soroban-examples#421.
File summaries
| File | Description |
|---|---|
docs/learn/migrate/evm/smart-contract-deployment.mdx |
Updates deployment API usage. |
docs/learn/fundamentals/contract-development/contract-interactions/cross-contract.mdx |
Updates constructor deployment example. |
docs/build/smart-contracts/example-contracts/tokens.mdx |
Renames the approval event field. |
docs/build/smart-contracts/example-contracts/deployer.mdx |
Migrates deployer example and prose. |
docs/build/guides/conventions/upgrading-contracts.mdx |
Migrates contract upgrade examples. |
docs/build/guides/conventions/deploy-contract.mdx |
Updates deployment guide syntax. |
docs/build/guides/auth/check-auth-tutorials.mdx |
Updates WebAuthn contract upgrade calls. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| .deployer() | ||
| .with_address(env.current_contract_address(), salt) | ||
| .deploy_v2(wasm_hash, constructor_args); | ||
| .deploy_contract(ContractExecutable::Wasm(wasm_hash), constructor_args); |
| env.deployer() | ||
| .update_current_contract(ContractExecutable::Wasm(new_wasm_hash)); |
| .deployer() | ||
| .with_address(env.current_contract_address(), salt) | ||
| .deploy_v2(wasm_hash, constructor_args); | ||
| .deploy_contract(ContractExecutable::Wasm(wasm_hash), constructor_args); |
There was a problem hiding this comment.
🟡 Changes recommended
Recommendation: NEEDS-CHANGES — Align the version table and source references, and merge upstream PR #421 first.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
docs/build/smart-contracts/example-contracts/deployer.mdx:107
- This page still tells readers to clone and follow
soroban-examplesv23.0.0 (docs/build/smart-contracts/example-contracts/deployer.mdx:42,46,51,114,178,213), whose contract uses SDK 23.0.1 anddeploy_v2. The new v28-only snippet therefore no longer matches the runnable source. Update all of this page's pinned references to a revision containing the v28 migration (and coordinate this with stellar/soroban-examples#421), or retain the v23 API.
.deploy_contract(ContractExecutable::Wasm(wasm_hash), constructor_args);
docs/build/guides/conventions/upgrading-contracts.mdx:75
- The cited example and source links remain pinned to
soroban-examplesv23.0.0 (docs/build/guides/conventions/upgrading-contracts.mdx:39,82,191), where SDK 23.0.1 usesupdate_current_contract_wasmand does not importContractExecutable. This v28 snippet is consequently inconsistent with its stated source. Point the page at a revision containing the migration after stellar/soroban-examples#421 lands, or keep the v23 API.
env.deployer()
.update_current_contract(ContractExecutable::Wasm(new_wasm_hash));
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
| soroban-sdk = { version = "28" } | ||
| num-integer = { version = "0.1.45", default-features = false, features = ["i128"] } | ||
|
|
||
| [dev-dependencies] | ||
| soroban-sdk = { version = "27", features = ["testutils"] } | ||
| soroban-sdk = { version = "28", features = ["testutils"] } |
There was a problem hiding this comment.
🔵 Needs a closer look
Pinned v23 sources contradict the v28 snippets, and main-linked examples depend on the still-open soroban-examples#421.
Review details
Suppressed comments (4)
Previously missed (1) — in code that hasn't changed since the last review.
docs/build/smart-contracts/example-contracts/tokens.mdx:345
- The page clones and links to
soroban-examples/main, where the token example still constructs this event withexpiration_ledger;live_until_ledgerexists only in the open companion PR #421. Ensure that PR lands first, or pin this page to a landed revision containing the rename, to keep its runnable source consistent with this v28 snippet.
docs/build/smart-contracts/example-contracts/deployer.mdx:107
- This v28 call no longer matches the page's setup: lines 42–51 still tell readers to clone
soroban-examplesatv23.0.0, and the source links on this page also point to that tag, where the implementation usesdeploy_v2and does not importContractExecutable. Update every pinned clone/reference on this page to a revision containing the v28 changes fromstellar/soroban-examples#421; otherwise readers cannot run the code shown here.
.deploy_contract(ContractExecutable::Wasm(wasm_hash), constructor_args);
docs/build/guides/conventions/upgrading-contracts.mdx:75
- The page's download link and source citations remain pinned to
soroban-examples/v23.0.0, whose contract usesupdate_current_contract_wasmand has noContractExecutableimport. Point all of those references to a revision containing the v28 update fromstellar/soroban-examples#421so the cited runnable source agrees with this snippet.
env.deployer()
.update_current_contract(ContractExecutable::Wasm(new_wasm_hash));
docs/build/guides/conventions/deploy-contract.mdx:105
- This page instructs readers to clone
soroban-examples/main, but that branch currently still usesdeploy_v2; only the open companion PR #421 contains this API. Ensure #421 lands before publishing this change, or pin the setup link and clone command to a landed revision containing it, so the runnable example matches the displayed code.
.deploy_contract(ContractExecutable::Wasm(wasm_hash), constructor_args);
- Files reviewed: 8/8 changed files
- Comments generated: 0 new
- Review effort level: Balanced
What
Update the deployer, contract-upgrade, and token code examples and surrounding prose to match rs-soroban-sdk v28.0.0's
deploy_contract/update_current_contract(ContractExecutable)deployment API and theApproveevent'slive_until_ledgerfield rename.Why
rs-soroban-sdk v28.0.0 deprecates
deploy_v2andupdate_current_contract_wasmin favor ofContractExecutable-based deployment (CAP-85) and renames theApproveevent'sexpiration_ledgerfield tolive_until_ledger(CAP-86); the affected docs pages mirrored the pre-v28 soroban-examples code and would otherwise show contracts that no longer build or compile against the new SDK. See stellar/soroban-examples#421 for the corresponding example updates.