fix(docs): fix errors in Clown Beatdown tutorial walkthrough#136
Merged
mHaines9219 merged 2 commits intodocs/frontend-tutorial-and-audit-fixesfrom Mar 25, 2026
Merged
Conversation
Walked through the Clown Beatdown tutorial start to finish and fixed all errors that would block a developer: - Add --force flag to sforge init (directory already exists in monorepo) - Replace mv -t with mv src/ (macOS doesn't support GNU -t flag) - Add missing bun add -d @vitejs/plugin-react-swc install step - Fix Config import to use type keyword (breaks Vite production build) - Fix ShieldedPublicClient/ShieldedWalletClient to type imports - Add missing supporting files: store, theme, pages, ExplorerToast, useToastNotifications, stylesheets
Additional fixes found during end-to-end testing: - Bump seismic-viem from 1.0.9 to 1.1.1 in CLI package.json (1.0.9 doesn't export sanvil/seismicTestnet chain configs) - Split deploy script: constructor-only deploy via sforge script, then add secrets via scast send (sforge script --broadcast crashes when broadcasting shielded writes like addSecret) - Add hexToString decoding to CLI rob() method so secrets display as readable strings instead of raw hex
35f4480
into
docs/frontend-tutorial-and-audit-fixes
2 checks passed
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.
Summary
Walked through the entire Clown Beatdown tutorial end-to-end (project setup → contract → tests → deploy → CLI → frontend) and fixed every error that would block a developer.
Errors found and fixed
Project Setup
sforge initfails without--force— thepackages/contractsdirectory already exists from the monorepo setup step, sosforge initrefuses to run. Added--forceflag.mv -t src index.tsfails on macOS — the-tflag is GNU-only and doesn't exist on macOS. Changed tomv index.ts src/.Frontend (Chapter 1)
@vitejs/plugin-react-swc—vite.config.tsimports@vitejs/plugin-react-swcbut thereact-tstemplate only installs@vitejs/plugin-react. Added install step.Configtype import breaks build —import { Config, WagmiProvider }from wagmi fails in Vite production builds becauseConfigis a type-only export. Fixed toimport { type Config, WagmiProvider }.main.tsxandApp.tsximportstore/store,theme,pages/Home,pages/NotFound,App.css, andindex.cssbut these are never defined in the tutorial. Added a "Supporting files" section.Frontend (Chapter 2)
ShieldedPublicClient/ShieldedWalletClienttype imports break build — these are type-only exports fromseismic-viem. Fixed totypeimports.ExplorerToastanduseToastNotifications—useGameActionsimports these but they're never provided. Added a "Supporting components" section beforeuseGameActions.What worked correctly
sforge build && sforge testsforge script --broadcastcrashes with a known sforge infrastructure bug on shielded writes)Test plan
sforge init --forceworks in the monorepo setupmv index.ts src/works on macOSbun add -d @vitejs/plugin-react-swc+npx vite buildsucceeds