This is a project for blockchain developers. Candidates fix bugs and add missing code across smart contract simulation, backend APIs, and frontend.
-
Duration: 12 hours from the time you receive invitation from GitHub.
-
Format: Take-home project
-
Submission: Upon completion, make a public repository, submit your deliverables with your name on GitHub and contact gauge@crewspacex.com
- Frontend: TypeScript, Vite, React
- Backend: Node.js, CommonJS, Express
- Contracts: In-memory JS simulation (TokenVault-style contract)
From the repo root:
npm install
npm run devA single npm run dev starts both the backend and the frontend. Backend runs at http://localhost:3001, frontend at http://localhost:5173 with API proxy to the backend.
The assessment includes: the wallet API returns a non-JSON-serializable balance so the Wallet section fails at runtime when fetching balance; the contract balance endpoint returns a non-JSON-serializable value so the Contract section fails at runtime when fetching balance; the chain blocks endpoint returns the first N blocks instead of the latest N, so the Chain section shows the wrong blocks until the route is fixed and the frontend passes the limit.
-
Backend - Wallet API
Fix the response so the frontend can display the wallet balance. -
Backend - Contract balance
The TokenVaultbalanceOfresult includes a non-JSON-serializable value. Return the contract balance in a JSON-safe format. -
Backend - Withdraw access control
InTokenVault.withdraw, ensure only the contract owner can call withdraw. Return a clear error for unauthorized callers. -
Backend - Chain blocks
GET /api/chain/blocks?limit=Nshould return the latest N blocks (e.g. last 5), not the first N. Fix the route logic. -
Backend - Error handling
Add a global Express error handler that responds with{ error: message }and status 500 for unhandled errors. -
Frontend - Wallet display
The wallet balance from the API may be a string or number. Ensure the Wallet section always displays the balance correctly (no[object Object]or serialization issues). -
Frontend - Chain section
When fetching “latest blocks”, pass thelimit(e.g. 5) to the API so the backend returns the correct slice. Use the existinglimitvariable in the component.
Candidates should fix the above so that:
- Backend stays running and all listed endpoints behave correctly.
- Frontend can check health, view wallet balance, view/use contract deposit/withdraw, and list latest blocks without errors.