mirror of
https://github.com/anonklub/anonklub.git
synced 2026-05-03 03:00:04 -04:00
* add gcloud to `.tool-versions` * refactor: define cache at module level * feat: handle dune out of credit error with specific exception And add more logs * fix: use keyFile path instead of parsed json string to auth bitgquery requests * Revert "fix: use keyFile path instead of parsed json string to auth bitgquery requests" This reverts commit 75cd26ebe219bc88a7d5e97b770fbeb881f5ac0a. * refactor: rename GOOGLE_APPLICATION_CREDENTIALS to GOOGLE_APPLICATION_CREDENTIALS_JSON_STR GOOGLE_APPLICATION_CREDENTIALS is what `gcloud` CLI uses by default. It expects a path, not a JSON string * update .env.example * fix .lintstagedrc prettier should only be ran for files extension that it supports
Query API
Develop
-
Authenticate requests
Data Provider Register/Get Credentials For node script BigQuery Define Google Service Account and export google credentials in a .key.jsonfileecho "GOOGLE_CLOUD_PROJECT=your-project-id\GOOGLE_APPLICATION_CREDENTIALS='$(cat .key.json)'" > .envDune Analytics Create Dune Account echo "DUNE_API_KEY=yourduneapikey" >> .envThe Graph Subgraph Studio echo "GRAPH_API_KEY=yourapikey" >> .env -
Source
.envfile:source .env -
Start
- node script
pnpm i pnpm start.dev
- node script
The Graph
In case new queries are added or existing ones are updated, re-create the artifacts with:
pnpm build.graph
Deploy
Automatic with deploy-*.yml GitHub workflows
Or manually
Install [`flyctl`](https://fly.io/docs/flyctl/installing/).
flyctl deploy \
--config apis/query/fly-staging.toml \
--dockerfile apis/query/Dockerfile \
--remote-only