Provide insight into the workings of the tBTC systems - deposits, redemptions, who bonds for what, governance actions, etc.
It incorporates work from️:
@miracle2k: Thanks for his allthekeep subgraph.
Live at : https://tbtcscan.com/
-
Environment files
.env.productionand.env.stagingdefineVITE_SUBGRAPH_PROXY_BASEplus explicit overridesVITE_SUBGRAPH_PROXY_MAINNET/VITE_SUBGRAPH_PROXY_TESTNETfor each environment.yarn builduses.env.production;yarn build:staginguses.env.staging. Local dev can override inline, e.g.VITE_SUBGRAPH_PROXY_BASE=... yarn start.
-
Codegen endpoint
- Graphclient reads its endpoint from
.graphclientrc.yml; env interpolation was unreliable, so we rewrite that file before codegen/build. - Use
scripts/set-graph-endpoint.sh staging|prodto set.graphclientrc.ymlto the correct proxy beforeyarn codegen.
- Graphclient reads its endpoint from
-
Common commands (endpoint + codegen + build)
yarn start:staging: set staging endpoint →yarn codegen→yarn build:staging→yarn preview.yarn start:prod: set prod endpoint →yarn codegen→yarn build-prod→yarn preview.yarn deploy:staging/yarn deploy:prod: set endpoint →yarn codegen→ build (no preview). Use these for CI or manual deploys.
-
CORS expectations (proxy side)
- Staging proxy allows
http://localhost:4001for local preview. - Production proxy allows
https://tbtcscan.comandhttps://threshold.networkonly.
- Staging proxy allows
-
Preflight checklist
- Confirm you edited the right env file for the target (
.env.productionor.env.staging). - Run
scripts/set-graph-endpoint.sh staging|prod(or rely on the commands above) so.graphclientrc.ymlmatches the build target. - Run
yarn codegenafter switching endpoints. - (Optional) Run
scripts/which-endpoint.shto print the active codegen endpoint and current proxy env values.
- Confirm you edited the right env file for the target (
git clone https://github.com/suntzu93/tbtcv2_website_info.git
cd tbtcv2_website_info
npm install -g yarn
yarn install
yarn codegen
# run in dev mode
yarn start
# run in produce mode
yarn build-prod
yarn preview
# http://localhost:4401``