Skip to main content

ContractEvents.addTransactionListener() method

Subscribe to transactions in this contract.

Example

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

Signature:

addTransactionListener(listener: ListenerFn): void;

Parameters

ParameterTypeDescription
listenerListenerFnthe 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