Skip to main content

ContractEvents.removeEventListener() method

Remove an event listener from this contract

Example

contract.events.removeEventListener("TokensMinted", (event) => {
console.log(event);
});

Signature:

removeEventListener(eventName: keyof TContract["filters"] | (string & {}), listener: providers.Listener): void;

Parameters

ParameterTypeDescription
eventNamekeyof TContract["filters"] | (string & {})the event name as defined in the contract
listenerproviders.Listenerthe listener to unregister

Returns:

void

Remarks

Remove a listener that was added with addEventListener