Skip to main content

eventFetcher

Classes

EventFetcher

Fetches and parses blockchain logs

Methods

getEvents()
getEvents<TContract, TEventFilter>(
contractFactory: TypeChainContractFactory<TContract>,
topicGenerator: (t: TContract) => TEventFilter,
filter: object): Promise<FetchedEvent<TEventOf<TEventFilter>>[]>

Fetch logs and parse logs

Type parameters
Type parameter
TContract extends Contract<TContract>
TEventFilter extends TypedEventFilter<TypedEvent<any, any>, TEventFilter>
Parameters
ParameterTypeDescription
contractFactoryTypeChainContractFactory<TContract>A contract factory for generating a contract of type TContract at the addr
topicGenerator(t: TContract) => TEventFilterGenerator function for creating
filterobjectBlock and address filter parameters
filter.address?string-
filter.fromBlockBlockTag-
filter.toBlockBlockTag-
Returns

Promise<FetchedEvent<TEventOf<TEventFilter>>[]>

Source

utils/eventFetcher.ts:57