All notable changes to this project will be documented in this file.
UniversalRpc.scheduleCatalogRefreshIfStale()— checks whether the persisted RPC catalog is past its refresh interval and, if so, starts a deduplicated background download without blocking the caller.- Unit tests for catalog caching with ethers (
WaterfallRpc.createProvider) and viem (createWaterfallTransport), with shared fixtures undertests/rpc-cache.fixtures.ts.
- Optimisation: When a cache file already exists,
UniversalRpc.getInstance()loads it immediately and returns; stale catalogs refresh in the background instead of awaiting a full network merge at startup. If there is no cache yet, behavior is unchanged (still awaits the initial download). needUpdate()reads from in-memorycachedDatawhen available before hitting storage.- After a successful JSON-RPC response, ethers
WaterfallRpcand the viem waterfall transport callscheduleCatalogRefreshIfStale()so periodic catalog updates are considered without slowing reads.
- Waterfall failover no longer stops on every
CALL_EXCEPTION(ethers) or JSON-RPC execution reverted (viem code3) when the error has no concrete revert payload (datamissing or not hex-encoded revert bytes). Those responses are treated as flaky endpoints and the next RPC is tried; real on-chain reverts (non-emptydataincluding at least a 4-byte selector) still abort failover immediately.