Class: EventFetcher
utils/eventFetcher.EventFetcher
Fetches and parses blockchain logs
Methods
getEvents
getEvents<TContract
, TEventFilter
>(contractFactory
, topicGenerator
, filter
): Promise
<FetchedEvent
<TEventOf
<TEventFilter
>>[]>
Fetch logs and parse logs
Type parameters
Name | Type |
---|---|
TContract | extends Contract <TContract > |
TEventFilter | extends TypedEventFilter <TypedEvent <any , any >, TEventFilter > |
Parameters
Name | Type | Description |
---|---|---|
contractFactory | TypeChainContractFactory <TContract > | A contract factory for generating a contract of type TContract at the addr |
topicGenerator | (t : TContract ) => TEventFilter | Generator function for creating |
filter | Object | Block and address filter parameters |
filter.address? | string | - |
filter.fromBlock | BlockTag | - |
filter.toBlock | BlockTag | - |
Returns
Promise
<FetchedEvent
<TEventOf
<TEventFilter
>>[]>