Skip to content

build: update deps: oz 0.8, soroban-sdk 28 - #284

Merged
chadoh merged 3 commits into
mainfrom
build/up-to-sorosdk28-oz0.8
Oct 22, 2026
Merged

chadoh merged 3 commits into
mainfrom
build/up-to-sorosdk28-oz0.8

Conversation

@chadoh

@chadoh chadoh commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

SDK 29/30 must wait: OpenZeppelin 0.8 requires SDK 28.x. The CLI’s SDK version isn’t itself a strict coupling because contracts compile separately, but 28 matches it anyway.

First commit kept existing __constructor logic in GuessTheNumber, but testing setup changes in SDK 28 meant we needed a different __constructor for tests vs real. Me no likey. And this was entirely because we were doing a transfer from admin to the contract in the constructor, rather than waiting until reset.

  • The original design called for doing this only in reset
  • The tutorial says it's done in reset
  • reset is called by the after_deploy script in scaffold.yml

So I simplified. See the 2nd commit and its message for the full details.

SDK 29/30 must wait: OpenZeppelin 0.8 requires SDK 28.x. The CLI’s SDK version isn’t itself a strict coupling because contracts compile separately, but 28 matches it anyway.

Migrated the affected NFT API and guessing-game test setup. The deployed constructor’s arguments remain unchanged. Lockfile regeneration also reconciled the existing stellar-registry = "0.1.0" requirement to 0.1.1.

Validation:
•  All 14 tests passed
•  All 3 Wasm contracts built
•  Clippy passed with existing style warnings
•  No whitespace errors

Co-Authored-By: Warp <agent@warp.dev>
@socket-security

socket-security Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

chadoh and others added 2 commits October 22, 2026 15:37
Move the admin's 1 XLM contribution from construction to the admin-only
reset method. Scaffold already calls reset after local deployment, so the
normal flow still starts with a funded pot while subsequent resets
replenish it. Remove add_funds to give this beginner template one clear
way to fund a new round.

SDK 28 prohibits test generators inside contract invocations. Deferring
funding lets tests register the game first, then create and configure the
test asset outside an invocation. This keeps the constructor interface
identical in tests and production, without a test-only asset parameter.
Choose the number during reset and fail explicitly before the first round.

Restore teaching comments explaining no_std test setup, authorization,
asset registration, contract-context storage, funding, and payouts.
Readability for newcomers matters more than minimizing changed lines.
Initialize the admin directly in the constructor, but retain set_admin as
a useful administration-transfer endpoint instead of a setter that always
panics after initialization. Require the currently stored admin's auth
before replacing their address: the proposed new admin cannot appoint
themselves, and the old admin loses authority once the transfer succeeds.

Consolidate overlapping game tests while retaining pre-reset behavior,
pot accumulation, and payouts across rounds. Check the public interface
rather than private storage keys where possible. Keep explicit tests for
nested-transfer authorization and insufficient-funds rollback, and add
coverage that unauthorized admin transfers leave storage unchanged and
reset permissions and funding move to the new admin. Rename and move the
test asset helper module to eliminate the Clippy layout warnings.

Validation: all 15 workspace tests pass on SDK 28/OpenZeppelin 0.8;
workspace Clippy passes with -D warnings; the updated game Wasm builds.

Co-Authored-By: Warp <agent@warp.dev>
Quickstart's floating latest image moved to Core/RPC 30 while its local network still defaults to ledger protocol 28. RPC 30's protocol-29/30 simulation hosts cannot simulate that ledger, causing deployment simulations for all three contracts to fail with Context/InternalError.

Pin the Quickstart image and protocol to Scaffold CLI's v678-b1525.1-testing and protocol 29 settings. Scaffold cannot replace CI's already-running container on port 8000, so the workflow must start a compatible network itself. Log RPC version information and assert the ledger protocol before deployment to catch future drift early.

Validated successful unsigned Wasm-upload simulations for all three contracts on protocol 29, preflight acceptance of protocol 29 and rejection of protocol 28, and workflow formatting and whitespace checks.

Co-Authored-By: Warp <agent@warp.dev>
@chadoh
chadoh merged commit 7b84a2c into main Oct 22, 2026
3 checks passed
@chadoh
chadoh deleted the build/up-to-sorosdk28-oz0.8 branch October 22, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant