Description
Review WatchRegistry.sol; confirm the on-chain eventType numbering matches EVENT_TYPE_ID in onchain.service.ts; add NatSpec. Remove recordEvent (decision D1 — backend only uses anchorProof). Enable a real contract test suite.
Affected areas
contracts/contracts/WatchRegistry.sol, contracts/test/, contracts/package.json.
Dependencies / order
First task; nothing blocks it.
Acceptance criteria
Definition of done
Description
Review
WatchRegistry.sol; confirm the on-chaineventTypenumbering matchesEVENT_TYPE_IDinonchain.service.ts; add NatSpec. RemoverecordEvent(decision D1 — backend only usesanchorProof). Enable a real contract test suite.Affected areas
contracts/contracts/WatchRegistry.sol,contracts/test/,contracts/package.json.Dependencies / order
First task; nothing blocks it.
Acceptance criteria
recordEventremoved;anchorProofretained.anchorProof,Unauthorizedrevert for a non-writer, andsetAuthorizedWritertoggling access.npx hardhat testpasses and thecontractstestscript runs it (no longer a stub).eventTypeenum is documented and matchesEVENT_TYPE_IDexactly.Definition of done
staging(nevermain).stagingpreview stack.