Skip to content

Remove Ponder: read cohort events from the chain - #4

Merged
carletex merged 1 commit into
mainfrom
remove-ponder
Aug 26, 2026
Merged

Remove Ponder: read cohort events from the chain#4
carletex merged 1 commit into
mainfrom
remove-ponder

Conversation

@carletex

Copy link
Copy Markdown
Member

Replaces the urql/GraphQL layer that queried the bg-ponder-indexer Railway service with a direct eth_getLogs call via Alchemy.

Context: BuidlGuidl/bg-redirects#1 (step 2).

Changes

  • New services/web3/cohortEvents.ts — one getLogs for SandGardenStreams from its deploy block, parsed with the contract ABI, plus batched getBlock calls for the Withdraw timestamps. Cached per browser session and shared by both hooks.
  • useCohortWithdrawEvents and useAddBuilderEvents rewritten on top of it, keeping their { data, isLoading } shape. AddBuilder now returns plain addresses, so members.tsx drops the id-splitting.
  • urql client and provider removed from _app.tsx; urql dep dropped.
  • SandGardenStreams fromBlock set to 20291636.
  • Stale root builderList.ts deleted, along with its commented-out usage in the hardhat deploy script.

Verification

Against mainnet: 105 Withdraw and 9 unique AddBuilder events, 0 missing timestamps, 0 duplicate ids, sorted newest first (2026-08-06 → 2024-09-02).

UI checked on /members and /projects — both render correctly, with no requests to bg-ponder-indexer-production.up.railway.app.

next:check-types, next:lint, hardhat:lint, and next build all pass.

After merge

Railway service + Postgres teardown.

🤖 Generated with Claude Code

https://claude.ai/code/session_011KuwowZj4dS3eshnHT5uoM

Replace the urql/GraphQL layer that queried the bg-ponder-indexer
Railway service with a direct eth_getLogs call via Alchemy.

- Add services/web3/cohortEvents.ts: one getLogs for SandGardenStreams
  from its deploy block, parsed with the contract ABI, plus batched
  getBlock calls for the Withdraw timestamps. Cached per browser session
  and shared by both hooks.
- Rewrite useCohortWithdrawEvents and useAddBuilderEvents on top of it,
  keeping their { data, isLoading } shape. AddBuilder now returns plain
  addresses, so members.tsx drops the id-splitting.
- Drop the urql client and provider from _app.tsx and the urql dep.
- Set SandGardenStreams fromBlock to 20291636.
- Delete the stale root builderList.ts and its commented-out usage.

Verified on mainnet: 105 Withdraw and 9 unique AddBuilder events.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KuwowZj4dS3eshnHT5uoM
@carletex
carletex merged commit dae5896 into main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant