Skip to content

Upgrade template to soroban-sdk 25.x + OZ v0.7.x #208

@oceans404

Description

@oceans404

Context

#190 stabilized the quickstart on OZ v0.6.0 + soroban-sdk 23.4.0 as a stopgap. The next step is upgrading to OZ v0.7.x, which requires soroban-sdk 25.x.

OZ v0.7.0 shipped Apr 3 and v0.7.1 shipped Apr 10. Both require soroban-sdk 25.x (see OpenZeppelin/stellar-contracts#559).

The CLI repo (scaffold-stellar) is already on soroban-sdk 25.1.0, so this template is the only thing that's behind.

What needs to change

  • Cargo.toml — bump soroban-sdk from 23.4.0 to 25.x, bump OZ crate tags from v0.6.0 to v0.7.0 (or v0.7.1)
  • contracts/fungible-allowlist/src/contract.rs — revert macro syntax from #[contractimpl(contracttrait)] back to #[default_impl] + #[contractimpl] (v0.7.x API)
  • contracts/nft-enumerable/src/contract.rs — same
  • environments.toml — update constructor args if signatures changed in v0.7.x
  • rust-toolchain.toml — may need updating for soroban-sdk 25.x

Dependency order

This must land before theahaco/scaffold-stellar#465 (bump LATEST_SUPPORTED_OZ_RELEASE in CLI). If the CLI pin is bumped first, scaffold init will pull v0.7.x OZ examples into a template still on soroban-sdk 23.4.0, recreating the same version mismatch.

Related

  • Elizabeth's #157 (OZ v0.6.0 upgrade from Jan) can be closed since #190 superseded it
  • Elizabeth's closed theahaco/scaffold-stellar#365 was a previous attempt at the soroban-sdk 25.x upgrade

Prior art

The contract code on main was briefly using v0.7.x syntax (#[default_impl]) before #190 reverted it to v0.6.0. So the contract changes are mostly just undoing that revert — the real unknown is whether the soroban-sdk 23→25 jump introduces other breaking changes in the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions