Skip to content

Update deployer/upgrade docs for soroban-sdk 28.0.0 - #2864

Open
leighmcculloch wants to merge 3 commits into
mainfrom
sdk-v28-docs-update
Open

leighmcculloch wants to merge 3 commits into
mainfrom
sdk-v28-docs-update

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Sep 18, 2026

Copy link
Copy Markdown
Member

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 the Approve event's live_until_ledger field rename.

Why

rs-soroban-sdk v28.0.0 deprecates deploy_v2 and update_current_contract_wasm in favor of ContractExecutable-based deployment (CAP-85) and renames the Approve event's expiration_ledger field to live_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.

Copilot AI balanced review requested due to automatic review settings September 18, 2026 05:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);
Comment thread docs/learn/migrate/evm/smart-contract-deployment.mdx
Comment on lines +74 to +75
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);
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings September 18, 2026 05:24
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-examples v23.0.0 (docs/build/smart-contracts/example-contracts/deployer.mdx:42,46,51,114,178,213), whose contract uses SDK 23.0.1 and deploy_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-examples v23.0.0 (docs/build/guides/conventions/upgrading-contracts.mdx:39,82,191), where SDK 23.0.1 uses update_current_contract_wasm and does not import ContractExecutable. 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

Comment on lines +257 to +261
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"] }
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings September 18, 2026 05:32
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 with expiration_ledger; live_until_ledger exists 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-examples at v23.0.0, and the source links on this page also point to that tag, where the implementation uses deploy_v2 and does not import ContractExecutable. Update every pinned clone/reference on this page to a revision containing the v28 changes from stellar/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 uses update_current_contract_wasm and has no ContractExecutable import. Point all of those references to a revision containing the v28 update from stellar/soroban-examples#421 so 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 uses deploy_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

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Preview builds for PRs by SDF employees.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants