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