Skip to content

feat: add configurable RPC endpoint for on-chain interactions#250

Merged
unifiedh merged 1 commit intoConway-Research:mainfrom
tyxben:feat/configurable-rpc-endpoint
Mar 3, 2026
Merged

feat: add configurable RPC endpoint for on-chain interactions#250
unifiedh merged 1 commit intoConway-Research:mainfrom
tyxben:feat/configurable-rpc-endpoint

Conversation

@tyxben
Copy link
Contributor

@tyxben tyxben commented Mar 1, 2026

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.

  • Adds rpcUrl?: string to AutomatonConfig in src/types.ts
  • Adds AUTOMATON_RPC_URL environment variable as fallback
  • Updates all createPublicClient / createWalletClient calls in src/registry/erc8004.ts (6 functions: preflight, registerAgent, updateAgentURI, leaveFeedback, queryAgent, getTotalAgents, getRegisteredAgentsByEvents, hasRegisteredAgent)
  • Updates src/conway/x402.ts to use env var for USDC balance checks
  • Threads rpcUrl through src/registry/discovery.ts (discoverAgents, searchAgents)
  • Passes ctx.config.rpcUrl from agent tools in src/agent/tools.ts
  • Adds RPC endpoint to interactive setup in src/setup/configure.ts

Resolution priority: explicit rpcUrl param > AUTOMATON_RPC_URL env var > viem default (public RPC)

Test plan

  • pnpm typecheck passes
  • discovery-abi.test.ts (12 tests) passes
  • social.test.ts (52 tests, includes leaveFeedback validation) passes
  • Manual: set AUTOMATON_RPC_URL and verify RPC calls use it
  • Manual: set rpcUrl in automaton.json and verify it overrides env var

Open with Devin

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
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@unifiedh unifiedh merged commit 21ff766 into Conway-Research:main Mar 3, 2026
3 checks 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.

feat(discovery): configurable RPC endpoint for agent discovery

2 participants