EvmRpcInterface constructor

EvmRpcInterface({
  1. bool useQueuedManager = true,
  2. bool awaitRefresh = true,
  3. Duration? refreshIntervall,
  4. bool eagerError = false,
  5. RefreshType refreshType = RefreshType.onTask,
  6. required List<EvmRpcClient> clients,
  7. 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,
            );