import { Result } from "@ethersproject/abi";
import { Contract, Event, EventFilter } from "ethers";
import { Log, SortableEvent } from "../interfaces";
export declare function spreadEvent(args: Result | Record<string, unknown>): {
    [key: string]: any;
};
export interface EventSearchConfig {
    from: number;
    to: number;
    maxLookBack?: number;
}
export declare const eventToLog: (event: Event) => Log;
export declare function paginatedEventQuery(contract: Contract, filter: EventFilter, searchConfig: EventSearchConfig, retryCount?: number): Promise<Log[]>;
/**
 * @dev Warning: this is a specialized function!! Its functionality is not obvious.
 * This function attempts to return block ranges to repeat ranges as much as possible. To do so, it may include blocks that
 * are outside the provided range. The guarantee is that it will always include _at least_ the blocks requested.
 * @param eventSearchConfig contains fromBlock, toBlock, and maxBlockLookBack.
 * The range is inclusive, so the results will include events in the fromBlock and in the toBlock.
 * maxBlockLookback defined the maximum number of blocks to search. Because the range is inclusive, the maximum diff
 * in the returned pairs is maxBlockLookBack - 1. This is a bit non-intuitive here, but this is meant so that this
 * parameter more closely aligns with the more commonly understood definition of a max query range that node providers
 * use.
 * @returns an array of disjoint fromBlock, toBlock ranges that should be queried. These cover at least the entire
 * input range, but can include blocks outside of the desired range, so results should be filtered. Results
 * are ordered from smallest to largest.
 */
export declare function getPaginatedBlockRanges({ from, to, maxLookBack }: EventSearchConfig): [number, number][];
export declare function logToSortableEvent(log: Log): SortableEvent;
export declare function spreadEventWithBlockNumber(event: Log): SortableEvent;
type PartialSortableEvent = Pick<SortableEvent, "blockNumber" | "logIndex">;
export declare function sortEventsAscending<T extends PartialSortableEvent>(events: T[]): T[];
export declare function sortEventsAscendingInPlace<T extends PartialSortableEvent>(events: T[]): T[];
export declare function sortEventsDescending<T extends PartialSortableEvent>(events: T[]): T[];
export declare function sortEventsDescendingInPlace<T extends PartialSortableEvent>(events: T[]): T[];
export declare function isEventOlder<T extends PartialSortableEvent>(ex: T, ey: T): boolean;
export declare function getTransactionRefs(events: SortableEvent[]): string[];
export declare function duplicateEvent(a: SortableEvent, b: SortableEvent): boolean;
export {};
