Repository navigation
build: update deps: oz 0.8, soroban-sdk 28 - #284
Merged
Merged
Conversation
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>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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>
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.
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
__constructorlogic in GuessTheNumber, but testing setup changes in SDK 28 meant we needed a different__constructorfor 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 untilreset.resetresetresetis called by theafter_deployscript inscaffold.ymlSo I simplified. See the 2nd commit and its message for the full details.