Module alloy_provider::layers
source · Expand description
Useful layer implementations for the provider. Currently this
module contains the AnvilLayer
, AnvilProvider
and ChainLayer
types.
Structs§
- A layer that wraps an
Anvil
config. - A provider that wraps an
AnvilInstance
, preventing the instance from being dropped while the provider is in use. - A provider layer that caches RPC responses and serves them on subsequent requests.
- The
CacheProvider
holds the underlying in-memory LRU cache and overrides methods from theProvider
trait. It attempts to fetch from the cache and fallbacks to the RPC in case of a cache miss. - A layer that wraps a
NamedChain
. The layer will be used to set the client’s poll interval based on the average block time for this chain. - Shareable cache.