fix: stabilize quickstart on OZ v0.6.0 — deps, contract code, and constructor args#190
Merged
zachfedor merged 5 commits intotheahaco:mainfrom Apr 13, 2026
Merged
Conversation
The `fungible_allowlist_example` constructor requires `--name` and `--symbol`, and `nft_enumerable_example` requires `--uri`, `--name`, and `--symbol`. Without these, contract client generation fails with "Missing required argument" after successful compilation and deploy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CLI pulls OZ v0.6.0 examples which require soroban-sdk 23.4.0. The template was pinned to soroban-sdk 23.1.0 and OZ v0.5.1, causing compile errors (unknown `contracttrait` attribute, type mismatches). Note: the CLI's dest_path fix (scaffold-stellar#451) will auto-update the OZ tags going forward, but the soroban-sdk version still needs to be compatible in the template as a baseline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3b15b28 to
5cb4a68
Compare
The contract code on main was updated to v0.7.x syntax (#[default_impl]) but the deps were never bumped to match, so nothing compiles. This reverts to v0.6.0 syntax (#[contractimpl(contracttrait)]) which matches the deps bumped in the previous commits and what scaffold init generates. Changes: - Replace #[default_impl] + #[contractimpl] with #[contractimpl(contracttrait)] - Remove stellar_macros::default_impl imports - Accept name/symbol/uri as constructor params instead of hardcoding - Fix grant_role_no_auth argument order for v0.6.0 API Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
--workspace=packages targets a workspace named "packages" which doesn't exist. The config is "packages/*" so the actual workspaces are the individual subdirectories. --workspaces targets all of them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zachfedor
approved these changes
Apr 13, 2026
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.
Problem
The quickstart is broken. Running
stellar scaffold init+npm run devfails for 2 of 3 example contracts (fungible-allowlistandnft-enumerable). There are three compounding issues:Dep version mismatch:
Cargo.tomlpins OZ crates tov0.5.1and soroban-sdk to23.1.0, but OZ v0.6.0 requiressoroban-sdk ^23.4.0. The CLI (after theahaco/scaffold-stellar#451) pulls v0.6.0 examples, which fail to resolve against the template's pinned deps.Contract code uses v0.7.x syntax: The contract source on main was updated to use
#[default_impl](OZ v0.7.x), but the deps were never bumped to match — sostellar_macros::default_impldoesn't exist and compilation fails regardless of this PR.Missing constructor args:
fungible_allowlist_exampleis missing--nameand--symbol.nft_enumerable_exampleis missing--uri,--name, and--symbol. Client generation fails withMissing required argument.Additionally, the
install:contractsscript inpackage.jsonuses--workspace=packages(targeting a workspace named "packages" which doesn't exist) instead of--workspaces(targeting all workspaces). This causes CI failures.What this PR does
Stabilizes everything on OZ v0.6.0 (the latest stable release that works with soroban-sdk 23.x):
Change 1: Bump deps to v0.6.0 (
Cargo.toml)soroban-sdk:23.1.0→23.4.0stellar-access,stellar-macros,stellar-tokens:v0.5.1→v0.6.0Change 2: Revert contract code to v0.6.0 syntax
#[default_impl]+#[contractimpl]with#[contractimpl(contracttrait)](v0.6.0 API)stellar_macros::default_implimportsname/symbol/urias constructor params instead of hardcoding themgrant_role_no_authargument order for v0.6.0 APIChange 3: Add missing constructor args (
environments.toml)fungible_allowlist_example: add--name ExampleToken --symbol EXTnft_enumerable_example: add--uri https://example.com/nft/ --name ExampleNFT --symbol ENFTChange 4: Fix
install:contractsscript (package.json)--workspace=packages→--workspaces(plural, targets all workspaces)v0.7.x upgrade path
This PR intentionally targets v0.6.0 to unblock the quickstart now. OZ v0.7.0 (stable Apr 3) and v0.7.1 (Apr 10) require soroban-sdk 25.x, which is a larger upgrade. The contract code for v0.7.x is already written — a follow-up PR just needs to bump
Cargo.tomlto soroban-sdk 25.x + OZ v0.7.x and revert the macro syntax back to#[default_impl].Test plan
stellar scaffold init+npm run devbuilds, deploys, and generates clients for all 3 contracts with zero errors/debugworks for all 3 contractsCompanion to theahaco/scaffold-stellar#451 (merged).
Closes theahaco/scaffold-stellar#450.
Addresses theahaco/scaffold-stellar#370.