Skip to main content

Module: 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
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) => TEventFilterGenerator function for creating
filterobjectBlock and address filter parameters
filter.address?string-
filter.fromBlockBlockTag-
filter.toBlockBlockTag-
Returns

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

Source

arbitrum-sdk/src/lib/utils/eventFetcher.ts:57