Underlying viem public client, exposed for callers that need direct
chain access (e.g. reading tx calldata for boundParamsHash).
The viem PublicClient bound to the configured RPC URL
Build an RPCProvider bound to a specific contract and RPC endpoint.
Address of the RAILGUN proxy contract to watch
HTTP(S) JSON-RPC endpoint
Contract ABI used to decode event logs
Viem chain descriptor (e.g. mainnet, sepolia, arbitrum);
must match the network rpcURL points at, otherwise viem will reject
requests on chain-id mismatch
Shared rate-limiter / batcher for outbound requests
Optional settings
OptionalfetchFn?: FetchLikeNetwork call for every JSON-RPC request. Defaults to the global fetch
Finalized block number on the chain, used by SourceAggregator and
from() to decide how far this source can cover.
Finalized block number as bigint
Stream EVMBlocks for the requested height range. Fetches historical
logs in chunks of chunkSize (default 500), yielding blocks in order.
The history ends at the finalized block. When liveSync is true and no
endHeight is set, the live watcher starts at the head, so the blocks
between finalized and the head are not returned.
Sync options (start/end height, chunk size, live flag)
Stop all active live-event iterators created by this provider.
Must be called to release watchEvent subscriptions.
RPC-backed
DataSourcethat fetches RAILGUN contract events directly from a JSON-RPC endpoint and formats them intoEVMBlocks.Historical range sync: uses
eth_getLogsagainst the connection manager so requests are batched / queued. Live sync: subscribes viawatchEventand pushes new blocks through an async iterator.Always treated as a live provider, suitable as the tail source in a
SourceAggregatorafter a historical indexer like Subsquid.