import { Contract, providers } from "ethers";
import { FillStatus, FillWithBlock, RelayData } from "../../interfaces";
import { BigNumber } from "../../utils";
type BlockTag = providers.BlockTag;
export { populateV3Relay, getTimestampForBlock, fillStatusArray } from "../evm/SpokeUtils";
/**
 * @notice Retrieve the on-chain time at a specific block number.
 * TRON does not support historical eth_call so block timestamps are used
 * instead of SpokePool.getCurrentTime(). In production these are equivalent.
 */
export declare function getTimeAt(spokePool: Contract, blockNumber: number): Promise<number>;
/**
 * @notice Return the maximum fill deadline buffer across a block range.
 * TRON does not support historical eth_call, so we read the current value.
 * If a contract upgrade (EIP-1967 Upgraded event) occurred within the range,
 * the value may have changed at the upgrade boundary. In that case, return
 * the greater of the current value and a conservative 6-hour fallback.
 */
export declare function getMaxFillDeadlineInRange(spokePool: Contract, startBlock: number, endBlock: number): Promise<number>;
/**
 * @notice Not supported on TVM — callers should use findDepositBlock instead.
 */
export declare function getDepositIdAtBlock(_contract: Contract, _blockTag: number): Promise<BigNumber>;
/**
 * @notice Find the block at which a deposit was created.
 * TRON does not support historical eth_call, so event queries replace the
 * EVM binary-search over numberOfDeposits().
 */
export declare function findDepositBlock(spokePool: Contract, depositId: BigNumber, lowBlock: number, highBlock?: number): Promise<number | undefined>;
/**
 * @notice Determine the fill status of a relay at a given block.
 * For "latest" queries, delegates to the EVM implementation (TRON's
 * eth_call works normally for "latest"). For historical queries the
 * status is reconstructed from on-chain events because TRON does not
 * support eth_call with historical blockTags.
 */
export declare function relayFillStatus(spokePool: Contract, relayData: RelayData, blockTag?: BlockTag, destinationChainId?: number): Promise<FillStatus>;
/**
 * @notice Find the block at which a fill was completed.
 * TRON does not support historical eth_call, so event queries replace the
 * EVM binary-search over fillStatuses().
 */
export declare function findFillBlock(spokePool: Contract, relayData: RelayData, lowBlockNumber: number, highBlockNumber?: number): Promise<number | undefined>;
/**
 * @notice Find the fill event for a deposit.
 * Queries fill events directly rather than binary-searching then re-querying.
 */
export declare function findFillEvent(spokePool: Contract, relayData: RelayData, lowBlockNumber: number, highBlockNumber?: number): Promise<FillWithBlock | undefined>;
//# sourceMappingURL=SpokeUtils.d.ts.map