EvmRpcInterface constructor
- bool useQueuedManager = true,
- bool awaitRefresh = true,
- Duration? refreshIntervall,
- bool eagerError = false,
- RefreshType refreshType = RefreshType.onTask,
- required List<
EvmRpcClient> clients, - required EVMNetworkType type,
clients
- A list of clients to use for the manager
useQueuedManager
- If true, the manager will use a QueuedRpcManager and requests will be queued
awaitRefresh
- If true, the manager will wait for the clients to be refreshed before performing a task
refreshIntervall
- The rate at which the clients are refreshed if null the clients will only be refreshed once
eagerError
- If true a task will throw the first error it encounters, if false it will try all clients before throwing an error
Implementation
EvmRpcInterface({
bool useQueuedManager = true,
bool awaitRefresh = true,
Duration? refreshIntervall,
bool eagerError = false,
RefreshType refreshType = RefreshType.onTask,
required List<EvmRpcClient> clients,
required this.type,
}) : _manager = useQueuedManager
? QueuedRpcManager(
awaitRefresh: awaitRefresh,
clientRefreshRate: refreshIntervall,
allClients: clients,
eagerError: eagerError,
refreshType: refreshType,
)
: SimpleRpcManager(
awaitRefresh: awaitRefresh,
clientRefreshRate: refreshIntervall,
allClients: clients,
eagerError: eagerError,
refreshType: refreshType,
);