Skip to content

Commit 194ab82

Browse files
TranspaChain Buildercursoragent
andcommitted
Switch to free public Sepolia RPCs (PublicNode + dRPC), slow indexer polling; bump submodules
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6cd3655 commit 194ab82

6 files changed

Lines changed: 26 additions & 9 deletions

File tree

.env.example

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
# Copy to .env on EC2 (~/transpachain/.env) and fill in values
22
# See each submodule's .env.example for details
33

4+
# Primary Sepolia RPC — free public endpoint (no API key). ALCHEMY_SEPOLIA_URL still
5+
# works as an alias and takes precedence when set; leave it empty to stay on free RPCs.
6+
SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
7+
# Fallback when primary is rate-limited or down
8+
SEPOLIA_RPC_FALLBACK_URL=https://sepolia.drpc.org
49
ALCHEMY_SEPOLIA_URL=
10+
# Indexer live-poll interval (ms) — 60000 conserves public-RPC quota
11+
INDEXER_POLL_INTERVAL_MS=60000
512
DEPLOYER_PRIVATE_KEY=
613
ETHERSCAN_API_KEY=
714
PINATA_API_KEY=
815
PINATA_SECRET_KEY=
916
MONGODB_URI=mongodb://localhost:27017/transpachain
1017
CORS_ORIGIN=https://transpachain.site
11-
# Block when contracts were deployed (Etherscan). Omit or 0 to skip backfill.
12-
# Alchemy free tier: keep range small OR set INDEXER_LOG_CHUNK_SIZE=10 (default).
13-
DEPLOY_FROM_BLOCK=11146320
18+
# Block when contracts were deployed (Etherscan). 0 = skip backfill (set 0 once backfill is done).
19+
# On free/public RPC tiers: keep range small OR set INDEXER_LOG_CHUNK_SIZE=10 (default).
20+
DEPLOY_FROM_BLOCK=0
1421
INDEXER_LOG_CHUNK_SIZE=10
1522

1623
# Backend indexer + API
@@ -23,6 +30,7 @@ IMPACT_NFT_ADDRESS=0xF2556FcccaE36A6d8Da0C75a863CA7368FC6761a
2330
# GHCR deploy (EC2): FRONTEND_TAG=<sha> ./scripts/deploy-frontend-ec2.sh
2431
# FRONTEND_IMAGE=ghcr.io/levianth146/transpachain-frontend:${FRONTEND_TAG:-latest}
2532
FRONTEND_TAG=latest
33+
# Optional — leave empty to use free PublicNode/dRPC transports in the browser
2634
NEXT_PUBLIC_ALCHEMY_KEY=
2735
NEXT_PUBLIC_CHARITY_CORE_ADDRESS=0xCE017838BfE2785CB2458bb205770663bEB9b0B8
2836
NEXT_PUBLIC_DONATION_VAULT_ADDRESS=0xEb421D07E885EeB2B8E9ea408FF284013F872Db1

backend

docker-compose.prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ services:
4040
CORS_ORIGIN: ${CORS_ORIGIN:-https://transpachain.site}
4141
DEPLOY_FROM_BLOCK: ${DEPLOY_FROM_BLOCK:-}
4242
INDEXER_LOG_CHUNK_SIZE: ${INDEXER_LOG_CHUNK_SIZE:-10}
43+
INDEXER_POLL_INTERVAL_MS: ${INDEXER_POLL_INTERVAL_MS:-60000}
4344
healthcheck:
4445
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3001/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
4546
interval: 10s

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
CORS_ORIGIN: ${CORS_ORIGIN:-https://transpachain.site}
3333
DEPLOY_FROM_BLOCK: ${DEPLOY_FROM_BLOCK:-}
3434
INDEXER_LOG_CHUNK_SIZE: ${INDEXER_LOG_CHUNK_SIZE:-10}
35+
INDEXER_POLL_INTERVAL_MS: ${INDEXER_POLL_INTERVAL_MS:-60000}
3536
healthcheck:
3637
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3001/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
3738
interval: 10s

docs/deploy.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ Copy `.env.example` → `.env` on EC2. Critical values:
4848
```env
4949
# Production
5050
CORS_ORIGIN=https://transpachain.site
51-
ALCHEMY_SEPOLIA_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY
51+
# Free public RPCs — no API key required. ALCHEMY_SEPOLIA_URL is an optional
52+
# paid-RPC alias that takes precedence when set; leave it empty otherwise.
53+
SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
54+
SEPOLIA_RPC_FALLBACK_URL=https://sepolia.drpc.org
55+
ALCHEMY_SEPOLIA_URL=
5256
MONGODB_URI=mongodb://mongodb:27017/transpachain
5357
54-
# Indexer — Sepolia contract deploy block (Etherscan). 0 = skip backfill.
55-
DEPLOY_FROM_BLOCK=11146320
58+
# Indexer — Sepolia contract deploy block (Etherscan). 0 = skip backfill (already done).
59+
DEPLOY_FROM_BLOCK=0
5660
INDEXER_LOG_CHUNK_SIZE=10
61+
# Live-poll interval (ms) — 60000 conserves public-RPC quota
62+
INDEXER_POLL_INTERVAL_MS=60000
5763
5864
# Backend contract addresses
5965
CHARITY_CORE_ADDRESS=0xCE017838BfE2785CB2458bb205770663bEB9b0B8
@@ -62,7 +68,8 @@ GOVERNANCE_DAO_ADDRESS=0xd655d85ddACc386901487CE8E1ec45BD4F872A19
6268
IMPACT_NFT_ADDRESS=0xF2556FcccaE36A6d8Da0C75a863CA7368FC6761a
6369
6470
# Frontend build-args (baked into client JS at docker build)
65-
NEXT_PUBLIC_ALCHEMY_KEY=your_key
71+
# Optional — leave empty to use free PublicNode/dRPC transports in the browser
72+
NEXT_PUBLIC_ALCHEMY_KEY=
6673
NEXT_PUBLIC_CHARITY_CORE_ADDRESS=0xCE017838BfE2785CB2458bb205770663bEB9b0B8
6774
NEXT_PUBLIC_DONATION_VAULT_ADDRESS=0xEb421D07E885EeB2B8E9ea408FF284013F872Db1
6875
NEXT_PUBLIC_GOVERNANCE_DAO_ADDRESS=0xd655d85ddACc386901487CE8E1ec45BD4F872A19

frontend

0 commit comments

Comments
 (0)