Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
29 lines (26 loc) · 1.5 KB
/
Copy path.env.example
File metadata and controls
29 lines (26 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# copy to .env — read by `pnpm index` (one cron tick) and `wrangler dev` on
# top of the vars in wrangler.jsonc, and by `next dev`/`next build` for
# NEXT_PUBLIC_STATS_URL. CHAIN_ID, the contract addresses and START_BLOCK live
# in wrangler.jsonc; don't repeat them here, a .env value overrides them.
# arbitrum sepolia (chain 421614) json-rpc — NOT arb1.arbitrum.io, that's mainnet.
# the public endpoint below works but is rate-limited; alchemy/quicknode are faster.
# in prod it's a secret: `wrangler secret put RPC_URL`.
RPC_URL=https://sepolia-rollup.arbitrum.io/rpc
# --- r2 (local indexer runs against the real bucket) ---
# leave these empty to use the STATS bucket *binding* from wrangler.jsonc — in
# prod that's the real bucket, locally an emulation in .wrangler/state. set
# them to have `pnpm index` write the real bucket over R2's S3 API instead.
# they come from the cloudflare dashboard: R2 → Manage R2 API Tokens.
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_S3_ENDPOINT= # https://<account-id>.r2.cloudflarestorage.com
R2_BUCKET=decdn-stats
# the token *value* from the same screen is a cloudflare API token, not an S3
# credential — only needed as CLOUDFLARE_API_TOKEN for non-interactive
# `wrangler deploy` (CI).
# --- page ---
# the page (under `pnpm dev`, or exported by `pnpm build`) fetches the public
# production file, https://data.decdn.org/stats-421614.json, in the browser.
# set this to read another URL instead (it must send CORS headers). baked in
# at build time.
# NEXT_PUBLIC_STATS_URL=