Remove Ponder: read cohort events from the chain - #4
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the urql/GraphQL layer that queried the
bg-ponder-indexerRailway service with a directeth_getLogscall via Alchemy.Context: BuidlGuidl/bg-redirects#1 (step 2).
Changes
services/web3/cohortEvents.ts— onegetLogsforSandGardenStreamsfrom its deploy block, parsed with the contract ABI, plus batchedgetBlockcalls for theWithdrawtimestamps. Cached per browser session and shared by both hooks.useCohortWithdrawEventsanduseAddBuilderEventsrewritten on top of it, keeping their{ data, isLoading }shape.AddBuildernow returns plain addresses, somembers.tsxdrops the id-splitting._app.tsx;urqldep dropped.SandGardenStreamsfromBlockset to20291636.builderList.tsdeleted, along with its commented-out usage in the hardhat deploy script.Verification
Against mainnet: 105
Withdrawand 9 uniqueAddBuilderevents, 0 missing timestamps, 0 duplicate ids, sorted newest first (2026-08-06 → 2024-09-02).UI checked on
/membersand/projects— both render correctly, with no requests tobg-ponder-indexer-production.up.railway.app.next:check-types,next:lint,hardhat:lint, andnext buildall pass.After merge
Railway service + Postgres teardown.
🤖 Generated with Claude Code
https://claude.ai/code/session_011KuwowZj4dS3eshnHT5uoM