package web3 import ( "context" "errors" ) // Pool is the multi-chain RPC client surface. Each chain has one or // more upstream URLs; Pool.Call selects an upstream, applies // per-method caching via deps.Base, and meters compute units via // deps.Commerce. // // TODO(bootnode-port): port from bootnode/core/chains/rpc.py — the // production version maintains per-upstream health, sticky-session // routing for `eth_getLogs`, and exponential backoff. Prefer // `luxfi/geth` or `luxfi/ethclient` over upstream go-ethereum. type Pool interface { Call(ctx context.Context, chain string, method string, params any) (any, error) } // ErrNoUpstream is returned when no upstream URL is configured for a // chain. var ErrNoUpstream = errors.New("web3: no upstream configured for chain") // NewPool returns a placeholder pool that always errors. Wired by // superbase once the real implementation lands. func NewPool(_ map[string][]string) Pool { return &emptyPool{} } type emptyPool struct{} func (e *emptyPool) Call(_ context.Context, _ string, _ string, _ any) (any, error) { return nil, ErrNoUpstream }