Module: dataEntities/event
Type Aliases
EventArgs
EventArgs<T
>: T
extends TypedEvent
<infer _, infer TObj> ? TObj
: never
The type of the event arguments. Gets the second generic arg
Type parameters
Name |
---|
T |
Defined in
src/lib/dataEntities/event.ts:10
EventFromFilter
EventFromFilter<TFilter
>: TFilter
extends TypedEventFilter
<infer TEvent> ? TEvent
: never
The event type of a filter Gets the first generic arg
Type parameters
Name |
---|
TFilter |
Defined in
src/lib/dataEntities/event.ts:18
TypeChainContractFactory
TypeChainContractFactory<TContract
>: Object
Typechain contract factories have additional properties
Type parameters
Name | Type |
---|---|
TContract | extends Contract |
Type declaration
Name | Type |
---|---|
connect | (address : string , provider : Provider ) => TContract |
createInterface | () => Interface |
Defined in
src/lib/dataEntities/event.ts:41
Functions
parseTypedLog
parseTypedLog<TContract
, TFilterName
>(contractFactory
, log
, filterName
): null
| EventArgs
<EventFromFilter
<ReturnType
<TContract
["filters"
][`TFilterName`]>>>
Parse a log that matches a given filter name.
Type parameters
Name | Type |
---|---|
TContract | extends Contract <TContract > |
TFilterName | extends string |
Parameters
Name | Type | Description |
---|---|---|
contractFactory | TypeChainContractFactory <TContract > | |
log | Log | The log to parse |
filterName | TFilterName |
Returns
null
| EventArgs
<EventFromFilter
<ReturnType
<TContract
["filters"
][`TFilterName`]>>>
Null if filter name topic does not match log topic
Defined in
src/lib/dataEntities/event.ts:53
parseTypedLogs
parseTypedLogs<TContract
, TFilterName
>(contractFactory
, logs
, filterName
): EventArgs
<EventFromFilter
<ReturnType
<TContract
["filters"
][`TFilterName`]>>>[]
Parses an array of logs. Filters out any logs whose topic does not match provided the filter name topic.
Type parameters
Name | Type |
---|---|
TContract | extends Contract <TContract > |
TFilterName | extends string |
Parameters
Name | Type | Description |
---|---|---|
contractFactory | TypeChainContractFactory <TContract > | |
logs | Log [] | The logs to parse |
filterName | TFilterName |
Returns
EventArgs
<EventFromFilter
<ReturnType
<TContract
["filters"
][`TFilterName`]>>>[]