Skip to main content

ContractEvents class

Listen to Contract events in real time

Signature:

export declare class ContractEvents<TContract extends BaseContract>

Constructors

ConstructorModifiersDescription
(constructor)(contractWrapper)Constructs a new instance of the ContractEvents class

Properties

PropertyModifiersTypeDescription
contractWrapperprotectedContractWrapper<TContract>

Methods

MethodModifiersDescription
addEventListener(eventName, listener)Subscribe to contract events
addTransactionListener(listener)Subscribe to transactions in this contract.
getAllEvents(filters)Get All Events
getEvents(eventName, options)Get Events
listenToAllEvents(listener)Listen to all events emitted from this contract
removeAllListeners()Remove all listeners on this contract
removeEventListener(eventName, listener)Remove an event listener from this contract
removeTransactionListener(listener)Remove a transaction listener