import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../common";
export type OutputStruct = {
    token: BytesLike;
    amount: BigNumberish;
    recipient: BytesLike;
    chainId: BigNumberish;
};
export type OutputStructOutput = [string, BigNumber, string, BigNumber] & {
    token: string;
    amount: BigNumber;
    recipient: string;
    chainId: BigNumber;
};
export type FillInstructionStruct = {
    destinationChainId: BigNumberish;
    destinationSettler: BytesLike;
    originData: BytesLike;
};
export type FillInstructionStructOutput = [BigNumber, string, string] & {
    destinationChainId: BigNumber;
    destinationSettler: string;
    originData: string;
};
export type ResolvedCrossChainOrderStruct = {
    user: string;
    originChainId: BigNumberish;
    openDeadline: BigNumberish;
    fillDeadline: BigNumberish;
    orderId: BytesLike;
    maxSpent: OutputStruct[];
    minReceived: OutputStruct[];
    fillInstructions: FillInstructionStruct[];
};
export type ResolvedCrossChainOrderStructOutput = [
    string,
    BigNumber,
    number,
    number,
    string,
    OutputStructOutput[],
    OutputStructOutput[],
    FillInstructionStructOutput[]
] & {
    user: string;
    originChainId: BigNumber;
    openDeadline: number;
    fillDeadline: number;
    orderId: string;
    maxSpent: OutputStructOutput[];
    minReceived: OutputStructOutput[];
    fillInstructions: FillInstructionStructOutput[];
};
export type AcrossOrderDataStruct = {
    inputToken: string;
    inputAmount: BigNumberish;
    outputToken: string;
    outputAmount: BigNumberish;
    destinationChainId: BigNumberish;
    recipient: string;
    exclusiveRelayer: string;
    exclusivityPeriod: BigNumberish;
    message: BytesLike;
};
export type AcrossOrderDataStructOutput = [
    string,
    BigNumber,
    string,
    BigNumber,
    number,
    string,
    string,
    number,
    string
] & {
    inputToken: string;
    inputAmount: BigNumber;
    outputToken: string;
    outputAmount: BigNumber;
    destinationChainId: number;
    recipient: string;
    exclusiveRelayer: string;
    exclusivityPeriod: number;
    message: string;
};
export type AcrossOriginFillerDataStruct = {
    exclusiveRelayer: string;
};
export type AcrossOriginFillerDataStructOutput = [string] & {
    exclusiveRelayer: string;
};
export type OnchainCrossChainOrderStruct = {
    fillDeadline: BigNumberish;
    orderDataType: BytesLike;
    orderData: BytesLike;
};
export type OnchainCrossChainOrderStructOutput = [number, string, string] & {
    fillDeadline: number;
    orderDataType: string;
    orderData: string;
};
export type GaslessCrossChainOrderStruct = {
    originSettler: string;
    user: string;
    nonce: BigNumberish;
    originChainId: BigNumberish;
    openDeadline: BigNumberish;
    fillDeadline: BigNumberish;
    orderDataType: BytesLike;
    orderData: BytesLike;
};
export type GaslessCrossChainOrderStructOutput = [
    string,
    string,
    BigNumber,
    BigNumber,
    number,
    number,
    string,
    string
] & {
    originSettler: string;
    user: string;
    nonce: BigNumber;
    originChainId: BigNumber;
    openDeadline: number;
    fillDeadline: number;
    orderDataType: string;
    orderData: string;
};
export interface ERC7683OrderDepositorInterface extends utils.Interface {
    functions: {
        "PERMIT2()": FunctionFragment;
        "QUOTE_BEFORE_DEADLINE()": FunctionFragment;
        "decode(bytes,bytes)": FunctionFragment;
        "getCurrentTime()": FunctionFragment;
        "open((uint32,bytes32,bytes))": FunctionFragment;
        "openFor((address,address,uint256,uint256,uint32,uint32,bytes32,bytes),bytes,bytes)": FunctionFragment;
        "resolve((uint32,bytes32,bytes))": FunctionFragment;
        "resolveFor((address,address,uint256,uint256,uint32,uint32,bytes32,bytes),bytes)": FunctionFragment;
    };
    getFunction(nameOrSignatureOrTopic: "PERMIT2" | "QUOTE_BEFORE_DEADLINE" | "decode" | "getCurrentTime" | "open" | "openFor" | "resolve" | "resolveFor"): FunctionFragment;
    encodeFunctionData(functionFragment: "PERMIT2", values?: undefined): string;
    encodeFunctionData(functionFragment: "QUOTE_BEFORE_DEADLINE", values?: undefined): string;
    encodeFunctionData(functionFragment: "decode", values: [BytesLike, BytesLike]): string;
    encodeFunctionData(functionFragment: "getCurrentTime", values?: undefined): string;
    encodeFunctionData(functionFragment: "open", values: [OnchainCrossChainOrderStruct]): string;
    encodeFunctionData(functionFragment: "openFor", values: [GaslessCrossChainOrderStruct, BytesLike, BytesLike]): string;
    encodeFunctionData(functionFragment: "resolve", values: [OnchainCrossChainOrderStruct]): string;
    encodeFunctionData(functionFragment: "resolveFor", values: [GaslessCrossChainOrderStruct, BytesLike]): string;
    decodeFunctionResult(functionFragment: "PERMIT2", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "QUOTE_BEFORE_DEADLINE", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "decode", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getCurrentTime", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "open", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "openFor", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "resolve", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "resolveFor", data: BytesLike): Result;
    events: {
        "Open(bytes32,tuple)": EventFragment;
    };
    getEvent(nameOrSignatureOrTopic: "Open"): EventFragment;
}
export interface OpenEventObject {
    orderId: string;
    resolvedOrder: ResolvedCrossChainOrderStructOutput;
}
export type OpenEvent = TypedEvent<[
    string,
    ResolvedCrossChainOrderStructOutput
], OpenEventObject>;
export type OpenEventFilter = TypedEventFilter<OpenEvent>;
export interface ERC7683OrderDepositor extends BaseContract {
    connect(signerOrProvider: Signer | Provider | string): this;
    attach(addressOrName: string): this;
    deployed(): Promise<this>;
    interface: ERC7683OrderDepositorInterface;
    queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
    listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
    listeners(eventName?: string): Array<Listener>;
    removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
    removeAllListeners(eventName?: string): this;
    off: OnEvent<this>;
    on: OnEvent<this>;
    once: OnEvent<this>;
    removeListener: OnEvent<this>;
    functions: {
        PERMIT2(overrides?: CallOverrides): Promise<[string]>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<[BigNumber]>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[
            AcrossOrderDataStructOutput,
            AcrossOriginFillerDataStructOutput
        ]>;
        getCurrentTime(overrides?: CallOverrides): Promise<[number]>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, fillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<[
            ResolvedCrossChainOrderStructOutput
        ] & {
            resolvedOrder: ResolvedCrossChainOrderStructOutput;
        }>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<[
            ResolvedCrossChainOrderStructOutput
        ] & {
            resolvedOrder: ResolvedCrossChainOrderStructOutput;
        }>;
    };
    PERMIT2(overrides?: CallOverrides): Promise<string>;
    QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
    decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[AcrossOrderDataStructOutput, AcrossOriginFillerDataStructOutput]>;
    getCurrentTime(overrides?: CallOverrides): Promise<number>;
    open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, fillerData: BytesLike, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
    resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
    callStatic: {
        PERMIT2(overrides?: CallOverrides): Promise<string>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[
            AcrossOrderDataStructOutput,
            AcrossOriginFillerDataStructOutput
        ]>;
        getCurrentTime(overrides?: CallOverrides): Promise<number>;
        open(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<void>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<void>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
    };
    filters: {
        "Open(bytes32,tuple)"(orderId?: BytesLike | null, resolvedOrder?: null): OpenEventFilter;
        Open(orderId?: BytesLike | null, resolvedOrder?: null): OpenEventFilter;
    };
    estimateGas: {
        PERMIT2(overrides?: CallOverrides): Promise<BigNumber>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        getCurrentTime(overrides?: CallOverrides): Promise<BigNumber>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, fillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<BigNumber>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
    };
    populateTransaction: {
        PERMIT2(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getCurrentTime(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, fillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
    };
}
