LogsSubscription
Hierarchy
- Web3Subscription<{ changed: EventLog & { removed: true }; connected: number; data: EventLog; error: Error }, { abi: AbiEventFragment; address?: HexString; topics?: (Topic | Topic[])[] }>
- LogsSubscription
Index
Constructors
publicconstructor
Parameters
args: { abi: AbiBaseFragment & { anonymous?: boolean; inputs?: readonly AbiParameter[]; name: string; type: string } & { signature: string }; address?: string; jsonInterface: ContractAbiWithSignature; topics?: (string | string[])[] }
options: { requestManager: Web3RequestManager<EthExecutionAPI>; returnFormat?: DataFormat }
Returns LogsSubscription
Properties
publicreadonlyabi
The JSON Interface of the event.
publicoptionalreadonlyaddress
Address of tye contract
readonlyargs
Type declaration
abi: AbiEventFragment
optionaladdress?: string
optionaltopics?: (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
removeAllListeners
Returns EventEmitter
resubscribe
Returns Promise<void>
setMaxListenerWarningThreshold
Parameters
maxListenersWarningThreshold: number
Returns void
subscribe
Returns Promise<void>
unsubscribe
Returns Promise<void>
LogSubscription to be used to subscribe to events logs.
Following events are supported and can be accessed with either LogsSubscription.once or $LogsSubscription.on methods.
removed: true
.