UNPKG

evx-sdk

Version:

The Evx SDK is a developer toolkit designed to simplify interaction with the Evx decentralized liquidity protocol. It provides an abstraction layer over the smart contracts, allowing developers to easily build applications, integrate liquidity pools, fetc

45 lines (44 loc) 1.83 kB
import { GovernanceContract } from '@contracts'; import { IEventListener } from '../../interfaces/listeners/IEventListener'; import { IProposalCanceledEvent } from '../../interfaces/events/governance/IProposalCanceledEvent'; /** * @title Proposal Canceled Event Listener * @notice Listens for ProposalCanceled events from the Governance contract * @dev This listener monitors the governance contract for proposal cancellation events */ export declare class ProposalCanceledListener implements IEventListener<IProposalCanceledEvent> { private readonly governanceContract; private isListening; private eventFilter; private callbacks; constructor(governanceContract: GovernanceContract); /** * @notice Start listening for ProposalCanceled events * @param callback Function to call when event is received */ start(callback: (event: IProposalCanceledEvent) => void | Promise<void>): Promise<void>; /** * @notice Add a callback to the listener * @param callback Function to call when event is received */ addCallback(callback: (event: IProposalCanceledEvent) => void | Promise<void>): void; /** * @notice Remove a callback from the listener * @param callback Function to remove */ removeCallback(callback: (event: IProposalCanceledEvent) => void | Promise<void>): void; /** * @notice Stop listening for events */ stop(): void; /** * @notice Get historical ProposalCanceled events * @param fromBlock Starting block number * @param toBlock Ending block number (optional, defaults to latest) */ getHistoricalEvents(fromBlock: number, toBlock?: number | 'latest'): Promise<IProposalCanceledEvent[]>; /** * @notice Check if the listener is currently active */ get listening(): boolean; }