API for onchain summer
Describe the feature you'd like to request
What I am envisioning re API:
- Custom QGL endpoint that is maintained for ~3 months or however long we need
- The "project registry" so to speak is effectively an attestation that contains a farcasterId and a contractAddress
- When you call the API with a list of projects (attestationId) and metrics, you get a record for every project with its relevant metrics
Critically, there is no need for projects to create a separate project identity on Open Source Observer (eg, by making a pull request to our registry of projects). The project identity is ephemeral just for onchain summer and limited to a specific contract per FID.
Describe the solution you'd like
Working API spec is here:
- https://hackmd.io/@carlb/H15K38tSC
Other relevant docs:
- OP doc: https://docs.google.com/document/d/1q-5KtIZTv57BXisapgH2tX7GNUqEUifXBuxjpI7JgII/edit?usp=sharing
- Gitcoin PRD: https://docs.google.com/document/d/14fwrdIROtAav1U36k3kB_6C-cHpdzzGFqNvZrqOGlGY/edit?usp=sharing
Describe alternatives you've considered
na
ya I think there are just 3 things
- Add these artifacts to the list of all artifacts we track
- Compute onchain_metrics_by_artifact
- Capy any models that we want to serve via API to the database seems reasonable.
I think once we have a clear set of tactical steps we should replace this issue with more actionable steps
Latest list of potential metrics https://docs.google.com/spreadsheets/d/1pqPgr1jJk8_5ILpkAaZ7vr_ZKjkm5hzMuszzNKSqRhU/edit?usp=sharing
Updated requirements here: https://docs.google.com/document/d/1gzs6ps2be-gaEmnkNWu5j0gfYAUByfet_Lc-MF4nQVY/edit?usp=sharing
update: this will now be satisfied via a static CSV / JSON
API endpoint:
curl 'https://ezrf-impact.vercel.app/api/trpc/projects.list?input=%7B%22json%22%3A%7B%22limit%22%3A1000%2C%22cursor%22%3A0%7D%7D' \
-H 'content-type: application/json' \
-H 'round-id: the-sunnys' | pbcopy
All the analysis scripts are in the Insights repo. Here's a write-up