Skip to main content

ContractEvents.addTransactionListener() method

Subscribe to transactions in this contract.

Example

contract.events.addTransactionListener((event) => {
console.log(event);
}

Signature:

addTransactionListener(listener: EventEmitter.ListenerFn): void;

Parameters

ParameterTypeDescription
listenerEventEmitter.ListenerFnthe callback function that will be called on every transaction

Returns:

void

Remarks

Will emit an "event" object containing the transaction status ('submitted' and 'completed') and hash