feat: add configurable RPC endpoint for on-chain interactions#250
Merged
unifiedh merged 1 commit intoConway-Research:mainfrom Mar 3, 2026
Merged
Conversation
Add rpcUrl config option and AUTOMATON_RPC_URL env var to override the default public RPC used by all Base chain interactions (ERC-8004 registry, x402 payments, agent discovery). Priority: config rpcUrl > AUTOMATON_RPC_URL env var > viem default. Closes Conway-Research#240
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.
Summary
Fixes #240
Adds a configurable RPC endpoint for all Base chain interactions, allowing users to use their own RPC provider instead of relying on the default public RPC.
rpcUrl?: stringtoAutomatonConfiginsrc/types.tsAUTOMATON_RPC_URLenvironment variable as fallbackcreatePublicClient/createWalletClientcalls insrc/registry/erc8004.ts(6 functions:preflight,registerAgent,updateAgentURI,leaveFeedback,queryAgent,getTotalAgents,getRegisteredAgentsByEvents,hasRegisteredAgent)src/conway/x402.tsto use env var for USDC balance checksrpcUrlthroughsrc/registry/discovery.ts(discoverAgents,searchAgents)ctx.config.rpcUrlfrom agent tools insrc/agent/tools.tssrc/setup/configure.tsResolution priority: explicit
rpcUrlparam >AUTOMATON_RPC_URLenv var > viem default (public RPC)Test plan
pnpm typecheckpassesdiscovery-abi.test.ts(12 tests) passessocial.test.ts(52 tests, includesleaveFeedbackvalidation) passesAUTOMATON_RPC_URLand verify RPC calls use itrpcUrlinautomaton.jsonand verify it overrides env var