GistPin — GrantFox bounty issue. Reviewed against the acceptance criteria below. Read contracts/README.md first — it has the full ABI, event schema, and error codes for the deployed contract.
Context
The contract exposes read-only state (is_active, report_count,
get_admin) that isn't surfaced over HTTP yet.
Problem
There's no way for a client of the REST API to check whether a specific gist
is still active, how many reports it has, or who the current moderator is —
all of which are already computed on-chain (and, after the indexer issues
land, mirrored in Postgres).
Scope
In scope:
GET /v1/gists/:id response includes is_active and report_count
(sourced from Postgres, not a live chain call, for performance — the
indexer keeps this fresh).
- New lightweight endpoint
GET /v1/moderator (or similar — your call, keep
it RESTful) returning the current moderator address.
- Swagger docs (
@ApiProperty/@ApiOperation) for all new fields/routes,
consistent with the existing style in gists.controller.ts.
Out of scope: the report-submission endpoint itself (separate issue),
any write operations.
Acceptance Criteria
How to verify your own work
cd Backend && npm run start:dev
curl http://localhost:3000/v1/gists/<some-id>
open http://localhost:3000/v1/docs
Depends on: the "hidden column" and "event persistence" issues for the
data to be meaningful (can be built against a manually-seeded DB in the
meantime).
Estimated effort: Small (a day or less). Good pick if you want a
self-contained, low-risk first contribution. Suitable for a first-time contributor.
Context
The contract exposes read-only state (
is_active,report_count,get_admin) that isn't surfaced over HTTP yet.Problem
There's no way for a client of the REST API to check whether a specific gist
is still active, how many reports it has, or who the current moderator is —
all of which are already computed on-chain (and, after the indexer issues
land, mirrored in Postgres).
Scope
In scope:
GET /v1/gists/:idresponse includesis_activeandreport_count(sourced from Postgres, not a live chain call, for performance — the
indexer keeps this fresh).
GET /v1/moderator(or similar — your call, keepit RESTful) returning the current moderator address.
@ApiProperty/@ApiOperation) for all new fields/routes,consistent with the existing style in
gists.controller.ts.Out of scope: the report-submission endpoint itself (separate issue),
any write operations.
Acceptance Criteria
GET /v1/gists/:idincludesis_activeandreport_count/v1/docs) documents all new/changed response fieldsnpm run build && npm run test:covpassHow to verify your own work
Depends on: the "hidden column" and "event persistence" issues for the
data to be meaningful (can be built against a manually-seeded DB in the
meantime).
Estimated effort: Small (a day or less). Good pick if you want a
self-contained, low-risk first contribution. Suitable for a first-time contributor.