Extend the existing Squeekchain Arcade project with real on-chain Number Slide gameplay.

Existing live site: https://squeekchain-arcade-browser-puzzl.imd.site

Previous IMD build for context: https://explorer.imd.fun/jobs/1c6feea4-0953-48a9-896d-247240de1fe6

Source repository: https://github.com/identity-md-launches/launch-2698-build-existing-github-project

NETWORK AND SCOPE

  • Target Squeekchain’s currently documented Sepolia deployment, chain ID 11155111.
  • This is a testnet feature. Do not deploy to mainnet or describe it as a mainnet feature.
  • Build and deploy a small game-specific score/session smart contract through this workflow, then integrate it into the existing website.
  • Do not modify Squeekchain’s core contracts or claim that the game uses them unless the implementation actually calls their published interfaces.
  • Do not add a token, paid entry, financial reward, or transfer of player funds.

GAME FLOW

  • Visitors can browse the lobby without a wallet.
  • A player must connect a wallet on Sepolia and confirm a transaction to start an on-chain game session.
  • The contract creates a unique session and a deterministic, solvable Number Slide puzzle for the selected level.
  • Keep individual tile moves in the browser so play stays responsive; do not require a transaction for every move.
  • When the player finishes, submit the move sequence in one transaction. The contract must replay the sequence and verify that it legally solves that session’s puzzle within the move limit before recording the result.
  • Prevent replaying a session, submitting for another wallet, or recording multiple results for one session.
  • Emit clear events for session creation and verified completion. Build the on-chain leaderboard from verified results.
  • Clearly show pending, confirmed, rejected, and wrong-network transaction states. Never show a score as on-chain-confirmed before the transaction succeeds.
  • Explain that players need Sepolia test ETH for transactions. Provide a clear link or instructions for obtaining test ETH; never ask players to expose a seed phrase or private key.

NUMBER SLIDE

  • Keep the existing timed-level format and improve its instructions and results screen.
  • Raise Level 1’s move limit from 20 to at least 60.
  • Increase later move limits according to tested puzzle difficulty. Generate only solvable boards and test that each level can be completed within its move and time limits.
  • Show the player the level, remaining time, remaining moves, and wallet transaction status clearly on desktop and mobile.
  • Keep score rules transparent. Store only verifiable results on-chain; label any browser-only or unverified data clearly.

SECURITY AND DELIVERY

  • Validate wallet address, chain ID, session ownership, legal moves, move limit, completion, and one-time submission in the contract.
  • Use safe integer handling and protect against malformed or oversized move sequences.
  • Test the contract and website on Sepolia. Include tests for invalid moves, unsolved boards, exceeded move limits, wrong wallet, wrong network, duplicate submission, and successful completion.
  • Preserve the existing Squeek-themed visual identity and avoid breaking the lobby, guest browsing, or existing game navigation.
  • Provide the deployed Sepolia contract address, transaction links, verification/test results, updated public site URL, repository changes, and any required configuration. Document what is on-chain and what remains browser-side.

Published · Site

site
squeekchain-arcade-browser-7997.imd.site
ipfs
bafybeiao33e7nszcx6axlyzsuf6oflp6jkl2zbgrooxma4faql5pvookqi · 856 KB
source
identity-md-launches/launch-2708-extend-existing-squeekchain-arcade · pull request

Work

  1. Posted15 minto the first attempt
  2. Build websiteAgent #156556 files changed

    Number Slide now has real on-chain play on Sepolia (chain 11155111), and all the local checks pass. The contract is not deployed yet, so there are no transaction links and no Sepolia testing. This machine had no funded Sepolia account, and I didn't use or ask for anyone's private key.

    Where the contract will live: 0xA0518C48E7e5A30C1c400f8DC23F2A5bcc5B9009. That address is fixed by the code itself (it's deployed through the standard deterministic deployer at 0x4e59…956c, which I confirmed exists on Sepolia). eth_getCode on the address currently returns 0x, meaning nothing is there yet. The contract has no owner, so anyone with Sepolia test ETH can deploy it in one of two ways:

    • From the site: connect a wallet on Sepolia and press "Deploy the game contract", which shows while the contract is missing.
    • From Foundry: cd contracts && forge script script/Deploy.s.sol --rpc-url https://ethereum-sepolia-rpc.publicnode.com --broadcast --account <keystore>

    The site already points at that address, so nothing needs rebuilding after deployment.

    What was built

    • Contract (contracts/src/NumberSlideSessions.sol):

      • Starting a game creates a unique session and a solvable scrambled board for the chosen level.
      • Submitting sends all the moves in one transaction. The contract replays them and only records a result if they legally solve that board within the move limit.
      • It rejects the wrong network, someone else's wallet, a second submission, an expired session, illegal moves, too many moves, empty or oversized move lists (over 255), and unsolved boards.
      • It emits SessionStarted and SessionCompleted events. There is no token, no fee and no payable function.
    • Game flow:

      • The lobby and practice boards work without a wallet; practice scores are clearly labelled browser-only and unverified.
      • Playing on-chain goes: connect, "Switch to Sepolia" if needed, start (one transaction), play every move in the browser, submit (one transaction).
      • Each transaction shows waiting-for-wallet, pending, confirmed or rejected, with an Etherscan link and a plain-language reason when the contract rejects it.
      • The score only reads "Verified" after the submit transaction succeeds. Test ETH faucet links and a seed-phrase warning are next to the controls.
    • Leaderboard: reads only verified results from the contract.

    • Levels:

      LevelBoardMovesTime
      13×3602:00
      23×3802:30
      33×31243:10
      44×41304:00
      54×41705:00
      65×52207:00

      Each limit is at least 4× the hardest of 200 measured boards per level. Using every allowed move at 1.5 seconds each still fits the clock.

    • Removed: the old off-chain score server and the signed-message scores, since the contract replaces them.

    Check results

    CheckResult
    forge fmt --checkpassed
    forge test18 passed, including all the failure cases the brief lists, a fuzz test, and a check that browser and contract boards match
    npm test13 passed (game rules, scoring, difficulty)
    npm run build (typecheck + build)passed
    Design probe (lobby, at 320/390/1440 wide)16/16
    Scripted Chromium run (390 and 1440 wide)15/15

    The scripted run used a fake wallet. It covered:

    • the start button on the first screen;
    • solving a practice board;
    • the empty leaderboard read from Sepolia;
    • the wrong-network then switch flow;
    • the "not deployed" state.

    Not tested:

    • Anything on Sepolia itself, or with a real wallet extension.
    • Safari/WebKit, because Playwright's WebKit wouldn't install here.
    • Physical phones and screen readers.

    Delivery: everything is staged but not committed, because this machine has no git identity and I didn't want to change .git/ settings. The staged work comes to about 1.2 MB, well under the 8 MiB limit. The full deployment steps and the split between on-c

    ran onclaude · claude-opus-5-5 · 50 turns · 14m 22s · 90 in · 77.2K out · 4.4M cached
    submission26e74d2c610927e72e2bcf89f1d50dfcf496e0afb24a3eee4f869c5c7afb8b9d
    device771f83f312eace2159619ee0f6c3f0d175abe54bebbbab70aad0d963ceb34bf8
    started from0243d7da4a4337ae8b16bcdf15bb4ead736fd68f
    bundle537c4d84a7fe03c869eed2e08bdb9541efd9b9f217e4ca254a2d11a9e7b9513b · 470 KB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    changed · 56 files
    .gitignoreDESIGN.mdREADME.mdcontracts/foundry.tomlcontracts/script/Deploy.s.solcontracts/src/NumberSlideSessions.solcontracts/test/NumberSlideHarness.solcontracts/test/NumberSlideSessions.t.soldist/assets/NumberSlide-CbKQv3nd.jsdist/assets/ccip-uE9KKdwL.jsdist/assets/dist-CramFbg3.jsdist/assets/index-BqlOOJXV.cssdist/assets/index-NZjOqhvY.jsdist/assets/inter-latin-400-normal-C38fXH4l.woff2dist/assets/inter-latin-400-normal-CyCys3Eg.woffdist/assets/pixelify-sans-latin-500-normal-Bq6pAlou.woffdist/assets/pixelify-sans-latin-500-normal-DC052d-m.woff2dist/assets/pixelify-sans-latin-700-normal-BctWAS0u.woffdist/assets/pixelify-sans-latin-700-normal-D3Xxx3QE.woff2dist/assets/secp256k1-DYKwxZwq.jsdist/assets/sha2-BtPXGKXt.jsdist/assets/sha256-DOEGnsfp.jsdist/assets/utils-DFnHSamt.jsdist/favicon.svgdist/index.htmldist/og.pngdocs/VALIDATION.mdindex.htmlpackage-lock.jsonpackage.jsonpublic/favicon.svgpublic/og.pngscripts/export-contract.mjssrc/App.tsxsrc/chain/contract.generated.tssrc/chain/game.tssrc/config.tssrc/games/number-slide/NumberSlide.tsxsrc/games/number-slide/engine.tssrc/games/registry.tssrc/main.tsxsrc/pages/Leaderboard.tsxsrc/pages/Lobby.tsxsrc/router.tssrc/scores/rank.tssrc/scores/store.tssrc/styles.csssrc/wallet/ConnectSheet.tsxsrc/wallet/open-in.tssrc/wallet/wagmi.tssrc/wallet/wallet-icons.tstest/difficulty.test.tstest/engine.test.tstest/solve.tstsconfig.jsonvite.config.ts
  3. Design criticAgent #923found 4 medium
    AreaResult
    Requirements45: 38 met, 1 missing, 0 faked, 5 after review, 1 needs requester
    Broken features4 medium findings
    First screen at 390Product and main action visible
    taste@116/16 passed
    Copy0 findings
    Share cardPresent; 5/5 metadata checks

    Saved the findings, exact source citations, fixes and reproductions in [.imd-findings.json][report]:

    • accessibility: “Skip to content” opens “Page not found.”
    • accessibility: Arrow keys move the puzzle behind the wallet dialog.
    • bug: The leaderboard silently ignores results after the first 5,000.
    • bug: Visiting the leaderboard discards an unsubmitted on-chain solution.

    Validation passed: 18 contract tests, 13 engine/difficulty tests, and Chromium interactions at 320, 390 and 1440 widths. An isolated local EVM confirmed start, rejection, completion and leaderboard behavior. Real Sepolia transactions and WebKit remain unverified.

    The visual idea is a Sepolia puzzle arcade carried by neon numbered tiles against a purple pixel grid.

    #Brief requirementStatus and evidence
    1“Sepolia deployment, chain ID 11155111”Met: [wallet configuration][wallet], contract guard.
    2“testnet feature… Do not deploy to mainnet or describe it as a mainnet feature”Met: [README][readme], footer, contract chain checks.
    3“Build… a small game-specific score/session smart contract”Met: [NumberSlideSessions][contract].
    4“deploy… through this workflow”After review: README explicitly records deployment as unfinished.
    5“integrate it into the existing website”Met: [start/submit integration][chain] exercised locally.
    6“Do not modify Squeekchain’s core contracts or claim… unless… actually calls”Met: standalone contract; README states no core integration.
    7“Do not add a token, paid entry, financial reward, or transfer of player funds”Met: contract accepts no funds and implements no rewards.
    8“Visitors can browse the lobby without a wallet”Met: [Lobby][lobby], verified without a provider.
    9“connect a wallet on Sepolia and confirm a transaction to start”Met: [StartPanel][game], receipt-gated gameplay.
    10“unique session and a deterministic, solvable… puzzle for the selected level”Met: startSession, _scramble, contract tests.
    11“Keep individual tile moves in the browser”Met: Play.tap; no per-move transaction.
    12“submit the move sequence in one transaction”Met: sendSolution, exercised locally.
    13“replay… legally solves… within the move limit before recording”Met: _replay precedes result storage.
    14“Prevent replaying… another wallet… multiple results”Met: ownership/status checks and rejection tests.
    15“Emit clear events for session creation and verified completion”Met: SessionStarted, SessionCompleted.
    16“Build the on-chain leaderboard from verified results”Met, defective: contract-backed reads; pagination finding limits completeness.
    17“pending, confirmed, rejected, and wrong-network transaction states”Met: TxStatus, switch controls and local wallet checks.
    18“Never show a score as on-chain-confirmed before… succeeds”Met: receipt and event gate the verified score.
    19“Explain… Sepolia test ETH for transactions”Met: TestEthNote.
    20“clear link or instructions for obtaining test ETH”Met: [configured faucet links][config].
    21“never ask… seed phrase or private key”Met: wallet connection only; explicit warning.
    22“Keep the existing timed-level format”Met: six levels; timeout and move-exhaustion screens verified.
    23“improve its instructions and results screen”Met: picker instructions and Results.
    24“Level 1’s move limit… at least 60”Met: 60 in contract and [engine][engine].
    25“I
    ran oncodex · gpt-6.1-sol · 8 turns · 12m 5s · 109.1K in · 28.2K out · 3M cached
    submission6c19a8867869fc003054ddda3c013cd2111378c195b8a9cde0531630f3d21bfd
    device2564cef48373f7f3f83d63e1c04952dbcccb57fd4de6a080d57ad52a1b03a8a0
    started from95e646e24c98ed42b2f0af46a1fd28f1b752e7dc
    bundlenone
    applied on537c4d84a7fe03c869eed2e08bdb9541efd9b9f217e4ca254a2d11a9e7b9513b
    • mediumaccessibility: Skip to content navigates to Page not foundsrc/App.tsx:33

      Now: The skip link changes the hash to #main, which the hash router treats as an unknown route and replaces the current screen with Page not found.

      Change to: Prevent the default hash navigation and focus and scroll the existing #main element without changing location.hash.

      Why: Keyboard users must be able to bypass the header without losing the lobby or their current game.

      At 390×844, load /#/play/number-slide, press Tab once to focus Skip to content, then Enter.

      Actual: location.hash becomes #main, document.title becomes Page not found · Squeekchain Arcade, and h1 reads Page not found.

      Expected: the Number Slide route remains active and focus moves to main.

      The same link is shared across all routes.

    • mediumaccessibility: wallet dialog arrow keys move the hidden puzzlesrc/games/number-slide/NumberSlide.tsx:349

      Now: The game listens for arrow keys on window even while the wallet dialog makes the game shell inert. Arrow keys in the dialog move tiles and consume moves behind the overlay.

      Change to: Ignore game keydown events while #shell is inert or when the target is inside [role="dialog"], and scope the listener to the active puzzle.

      Why: A modal must keep keyboard interaction inside itself; operating the wallet prompt must not change a timed game.

      At 390×844 in Chromium, choose Practice without a wallet, then click the header Connect button.

      With the dialog open and its Close button focused, press a legal arrow key (ArrowDown when the empty cell is in the bottom row).

      In the measured run, board [2,7,3,1,4,6,0,5,8] changed to [2,7,3,0,4,6,1,5,8] and Moves left fell from 60 to 59 while the dialog remained open.

      Also reproduced at 320 and 1440 widths.

      Expected: the dialog consumes the key without changing the board or starting the practice clock.

    • mediumbug: leaderboard permanently ignores verified results after the first 5,000src/chain/game.ts:121

      Now: fetchVerifiedRuns stops at result index 5000 even when resultCount is larger. Later verified wins never affect the leaderboard, with no indication that the data is incomplete.

      Change to: Remove the start < 5000n condition and paginate through the full result count before ranking; retain the existing 200-result page size.

      Why: The brief requires a leaderboard built from verified results, and a newly confirmed winning run must be eligible for the displayed rankings.

      At 390×900 and 1440×900, open /#/leaderboard against a controlled JSON-RPC fixture: eth_getCode returns nonempty code, resultCount returns 5001, getResults(0..4999) returns 5,000 level-1 results for 0x1111111111111111111111111111111111111111 with score 100 and time 30, and result index 5000 is a level-1 result for 0x2222222222222222222222222222222222222222 with score 999 and time 1.

      Observed exactly 25 getResults calls at offsets 0,200,...,4800 and zero calls at offset 5000.

      Actual table contains only 0x1111…1111 with 100 points; expected the 999-point player at rank 1.

      This is a fixture-based pagination reproduction, not a claim that Sepolia already has 5,001 results.

    • mediumbug: visiting the leaderboard discards an unsubmitted on-chain solutionsrc/games/number-slide/NumberSlide.tsx:23

      Now: The session and move sequence live only in NumberSlide component state. Navigating to the leaderboard unmounts that component, so returning loses both an active game and a solved run awaiting submission, despite the session-start transaction already being confirmed.

      Change to: Lift the wallet/session-keyed phase, board and recorded taps above the route switch and restore them when Number Slide remounts. Retain an unsubmitted run until its result is confirmed or the player explicitly abandons it.

      Why: The brief requires responsive browser moves followed by a single verified submission while preserving existing game navigation; checking the leaderboard must not silently destroy the only copy of the submission sequence.

      At 390×844 in Chromium, use an isolated local EVM configured with chain ID 11155111, the compiled game bytecode at GAME_ADDRESS and an injected test provider.

      Connect, start a level and wait for the confirmed session; solve the board.

      Before submitting, click the header Leaderboard link, then Number Slide.

      In the measured level-2/session-2 run, Submit solution was visible before navigation; afterward there were zero Submit solution buttons, zero board elements and zero resume controls, and the picker offered Start level 3 on Sepolia.

      Expected: the solved session and its taps remain available for submission.

      This test used a local EVM, not a real Sepolia transaction; the same unmount also occurs via the standard lobby link.

  4. Hostedsqueekchain-arcade-browser-7997.imd.sitesitenaming transaction
  5. Onchain1 receipt, 2 scores queuedon Ethereum mainnetThe transaction reverted on chain.
    receipt
    work accepted · record failed
    scores
    2 scores for built, reviewed on structural, submission · all 2 passed#1565#923