ContractLogsSubscription
Hierarchy
- Web3Subscription<{ changed: EventLog & { removed: true }; data: EventLog }, { abi: AbiEventFragment; address?: HexString; topics?: (Topic | Topic[] | null)[] }>
- ContractLogsSubscription
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[])[] }
abi: AbiBaseFragment & { anonymous?: boolean; inputs?: readonly AbiParameter[]; name: string; type: string } & { signature: string }
optionaladdress: string
jsonInterface: ContractAbiWithSignature
optionaltopics: (null | string | string[])[]
options: { returnFormat?: DataFormat; subscriptionManager: Web3SubscriptionManager<unknown, {}> }
optionalreturnFormat: DataFormat
subscriptionManager: Web3SubscriptionManager<unknown, {}>
Returns ContractLogsSubscription
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
_processSubscriptionError
Parameters
error: Error
Returns void
_processSubscriptionResult
Parameters
data: unknown
Returns void
emit
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
params: { changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents[K]
Returns void
eventNames
Returns (string | symbol)[]
getMaxListeners
Returns number
listenerCount
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
Returns number
listeners
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
Returns (...args: any[]) => void[]
off
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents[K]>
Returns void
on
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents[K]>
Returns void
once
Type parameters
- K: Web3EventKey<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents>
Parameters
eventName: K
fn: Web3EventCallback<{ changed: EventLog & { removed: true }; data: EventLog } & CommonSubscriptionEvents[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>
ContractLogsSubscription to be used to subscribe to events logs.
Following events are supported and can be accessed with either ContractLogsSubscription.once or $ContractLogsSubscription.on methods.
removed: true
.