event
Type Aliases
EventArgs<T>
type EventArgs<T>: T extends TypedEvent<infer _, infer TObj> ? TObj : never;
The type of the event arguments. Gets the second generic arg
Type Parameters
Type Parameter |
---|
T |
Defined in
EventFromFilter<TFilter>
type EventFromFilter<TFilter>: TFilter extends TypedEventFilter<infer TEvent> ? TEvent : never;
The event type of a filter Gets the first generic arg
Type Parameters
Type Parameter |
---|
TFilter |
Defined in
TypeChainContractFactory<TContract>
type TypeChainContractFactory<TContract>: object;
Typechain contract factories have additional properties
Type Parameters
Type Parameter |
---|
TContract extends Contract |
Type declaration
Name | Type | Defined in |
---|---|---|
connect | TContract | dataEntities/event.ts:42 |
createInterface | Interface | dataEntities/event.ts:43 |
Defined in
Functions
parseTypedLog()
function parseTypedLog<TContract, TFilterName>(
contractFactory: TypeChainContractFactory<TContract>,
log: Log,
filterName: TFilterName): null | EventArgs<EventFromFilter<ReturnType<TContract["filters"][TFilterName]>>>
Type Parameters
Type Parameter |
---|
TContract extends Contract <TContract > |
TFilterName extends string |
Parameters
Parameter | 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
parseTypedLogs()
function parseTypedLogs<TContract, TFilterName>(
contractFactory: TypeChainContractFactory<TContract>,
logs: Log[],
filterName: TFilterName): EventArgs<EventFromFilter<ReturnType<TContract["filters"][TFilterName]>>>[]
Type Parameters
Type Parameter |
---|
TContract extends Contract <TContract > |
TFilterName extends string |
Parameters
Parameter | Type | Description |
---|---|---|
contractFactory | TypeChainContractFactory <TContract > | |
logs | Log [] | The logs to parse |
filterName | TFilterName |
Returns
EventArgs
<EventFromFilter
<ReturnType
<TContract
["filters"
][TFilterName
]>>>[]