LogsSubscription
Hierarchy
- Web3Subscription<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }, { abi: AbiEventFragment; address?: HexString; topics?: (Topic | Topic[] | null)[] }>
- LogsSubscription
Index
Constructors
Properties
Accessors
Methods
Constructors
publicconstructor
Parameters
args: { abi: AbiBaseFragment & { anonymous?: boolean; inputs?: readonly AbiParameter[]; name: string; type: string } & { signature: string }; address?: string; jsonInterface: ContractAbiWithSignature; topics?: (null | string | string[])[] }
options: { returnFormat?: DataFormat; subscriptionManager: Web3SubscriptionManager<unknown, {}> }
Returns LogsSubscription
Properties
publicreadonlyabi
The JSON Interface of the event.
publicoptionalreadonlyaddress
Address of tye contract
readonlyargs
Type declaration
abi: AbiEventFragment
optionaladdress?: string
optionaltopics?: (null | string | string[])[]
publicreadonlyjsonInterface
publicoptionalreadonlytopics
The list of topics subscribed
Accessors
id
Returns undefined | string
lastBlock
Returns undefined | BlockOutput
Methods
emit
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
params: { changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }[K]
Returns void
eventNames
Returns (string | symbol)[]
getMaxListeners
Returns number
listenerCount
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
Returns number
listeners
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
Returns Function[]
off
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }[K]>
Returns void
on
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }[K]>
Returns void
once
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }[K]>
Returns void
processSubscriptionData
Parameters
Returns void
removeAllListeners
Returns EventEmitter
resubscribe
Returns Promise<void>
sendSubscriptionRequest
Returns Promise<string>
sendUnsubscribeRequest
Returns Promise<void>
setMaxListenerWarningThreshold
Parameters
maxListenersWarningThreshold: number
Returns void
subscribe
Returns Promise<string>
unsubscribe
Returns Promise<void>
LogSubscription to be used to subscribe to events logs.
Following events are supported and can be accessed with either once or $on methods.
removed: true
.