Open
Conversation
…tworkEnvironment type to include local_test - Add localTestChains configuration for Anvil forks - Implement auto-detection based on RPC URL - Update NetworkProvider with automatic environment switching - Add local chains to wagmi configuration - Extend testnet indicator to show local test mode - Add comprehensive documentation for local testing setup
…ervice.ts for contract reading and event discovery - Add graphql-client.adapter.ts for seamless data source switching - Implement LocalDataDebug component for real-time contract monitoring - Integrate debug panel into builders page for local test mode - Support BuilderSubnetsV2 and Builders contract functions - Auto-discover subnets/pools from blockchain events - Transform contract data to GraphQL-compatible format - Provide zero-config solution that works automatically with localhost RPCs
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…actData - Replace Set usage with state updates for discovered IDs and enhance logging for better clarity
…ocal test chain definitions and integrate local RPC URLs directly into existing chain configurations for Arbitrum and Base
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.
Create a PR description that addresses the implementation of the local testing solution as well as ability ot index local data
🚀 PR: Local Anvil Testing & Local Data Indexing System
📌 Objective
Provide a zero-config, first-class local-testing experience for developers by:
local_testenvironment that auto-detects localhost RPCs.🆕 Key Features
local_testenvironmentNetworkEnvironment+localTestChainswith your contract addresses.localhostor127.0.0.1, app switches tolocal_test.localArbitrum(ID 42161, port 8545) &localBase(ID 8453, port 8546) added to wagmi config.local-data.service.tsSubnetCreated/BuilderPoolCreatedevents.• Reads on-chain state (
subnets,subnetsMetadata,builderPools, etc.) with wagmi/viem.• Transforms to GraphQL-compatible objects.
graphql-client.adapter.ts• mainnet / testnet → remote GraphQL
• local_test → local contracts
LocalDataDebugcomponent• Live discovered subnets & pools
• Refresh button
• Raw debug JSON
LOCAL TEST MODE.docs/local-anvil-testing.mdLOCAL_DATA_INDEXING_SUMMARY.md🗄️ Code Structure
🧩 How It Works
Detect
Wallet connects to
http://127.0.0.1:8545/8546→environment = 'local_test'.Discover
local-data.servicescans blocks 0 → latest for creation events and caches subnet/pool IDs.Read
For each ID, read:
Transform
Contract tuples → GraphQL‐style
BuilderSubnet,BuilderProject, etc.Serve
graphql-client.adapterreturns those objects; existing hooks/components render them.Debug
<LocalDataDebug />shows a live dashboard + manual refresh.🔬 Testing Instructions
🛡️ Backward Compatibility
environment === 'local_test'.📝 Future Work (Optional)
🎉 This PR delivers a full end-to-end local testing workflow – create a subnet on your Anvil fork and watch it appear in the dashboard instantly, no config required!