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 AcrossOrderDataStruct = {
    inputToken: string;
    inputAmount: BigNumberish;
    outputToken: string;
    outputAmount: BigNumberish;
    destinationChainId: BigNumberish;
    recipient: BytesLike;
    exclusiveRelayer: string;
    depositNonce: BigNumberish;
    exclusivityPeriod: BigNumberish;
    message: BytesLike;
};
export type AcrossOrderDataStructOutput = [
    string,
    BigNumber,
    string,
    BigNumber,
    BigNumber,
    string,
    string,
    BigNumber,
    number,
    string
] & {
    inputToken: string;
    inputAmount: BigNumber;
    outputToken: string;
    outputAmount: BigNumber;
    destinationChainId: BigNumber;
    recipient: string;
    exclusiveRelayer: string;
    depositNonce: BigNumber;
    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 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 interface AcrossOriginSettlerInterface extends utils.Interface {
    functions: {
        "PERMIT2()": FunctionFragment;
        "QUOTE_BEFORE_DEADLINE()": FunctionFragment;
        "SPOKE_POOL()": FunctionFragment;
        "computeDepositId(uint256,address)": FunctionFragment;
        "decode(bytes,bytes)": FunctionFragment;
        "destinationSettlers(uint256)": FunctionFragment;
        "getCurrentTime()": FunctionFragment;
        "multicall(bytes[])": FunctionFragment;
        "open((uint32,bytes32,bytes))": FunctionFragment;
        "openFor((address,address,uint256,uint256,uint32,uint32,bytes32,bytes),bytes,bytes)": FunctionFragment;
        "owner()": FunctionFragment;
        "renounceOwnership()": FunctionFragment;
        "resolve((uint32,bytes32,bytes))": FunctionFragment;
        "resolveFor((address,address,uint256,uint256,uint32,uint32,bytes32,bytes),bytes)": FunctionFragment;
        "setDestinationSettler(uint256,address)": FunctionFragment;
        "transferOwnership(address)": FunctionFragment;
    };
    getFunction(nameOrSignatureOrTopic: "PERMIT2" | "QUOTE_BEFORE_DEADLINE" | "SPOKE_POOL" | "computeDepositId" | "decode" | "destinationSettlers" | "getCurrentTime" | "multicall" | "open" | "openFor" | "owner" | "renounceOwnership" | "resolve" | "resolveFor" | "setDestinationSettler" | "transferOwnership"): FunctionFragment;
    encodeFunctionData(functionFragment: "PERMIT2", values?: undefined): string;
    encodeFunctionData(functionFragment: "QUOTE_BEFORE_DEADLINE", values?: undefined): string;
    encodeFunctionData(functionFragment: "SPOKE_POOL", values?: undefined): string;
    encodeFunctionData(functionFragment: "computeDepositId", values: [BigNumberish, string]): string;
    encodeFunctionData(functionFragment: "decode", values: [BytesLike, BytesLike]): string;
    encodeFunctionData(functionFragment: "destinationSettlers", values: [BigNumberish]): string;
    encodeFunctionData(functionFragment: "getCurrentTime", values?: undefined): string;
    encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string;
    encodeFunctionData(functionFragment: "open", values: [OnchainCrossChainOrderStruct]): string;
    encodeFunctionData(functionFragment: "openFor", values: [GaslessCrossChainOrderStruct, BytesLike, BytesLike]): string;
    encodeFunctionData(functionFragment: "owner", values?: undefined): string;
    encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
    encodeFunctionData(functionFragment: "resolve", values: [OnchainCrossChainOrderStruct]): string;
    encodeFunctionData(functionFragment: "resolveFor", values: [GaslessCrossChainOrderStruct, BytesLike]): string;
    encodeFunctionData(functionFragment: "setDestinationSettler", values: [BigNumberish, string]): string;
    encodeFunctionData(functionFragment: "transferOwnership", values: [string]): string;
    decodeFunctionResult(functionFragment: "PERMIT2", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "QUOTE_BEFORE_DEADLINE", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "SPOKE_POOL", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "computeDepositId", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "decode", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "destinationSettlers", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getCurrentTime", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "open", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "openFor", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "resolve", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "resolveFor", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setDestinationSettler", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
    events: {
        "Open(bytes32,tuple)": EventFragment;
        "OwnershipTransferred(address,address)": EventFragment;
        "SetDestinationSettler(uint256,address,address)": EventFragment;
    };
    getEvent(nameOrSignatureOrTopic: "Open"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "SetDestinationSettler"): EventFragment;
}
export interface OpenEventObject {
    orderId: string;
    resolvedOrder: ResolvedCrossChainOrderStructOutput;
}
export type OpenEvent = TypedEvent<[
    string,
    ResolvedCrossChainOrderStructOutput
], OpenEventObject>;
export type OpenEventFilter = TypedEventFilter<OpenEvent>;
export interface OwnershipTransferredEventObject {
    previousOwner: string;
    newOwner: string;
}
export type OwnershipTransferredEvent = TypedEvent<[
    string,
    string
], OwnershipTransferredEventObject>;
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
export interface SetDestinationSettlerEventObject {
    chainId: BigNumber;
    prevDestinationSettler: string;
    destinationSettler: string;
}
export type SetDestinationSettlerEvent = TypedEvent<[
    BigNumber,
    string,
    string
], SetDestinationSettlerEventObject>;
export type SetDestinationSettlerEventFilter = TypedEventFilter<SetDestinationSettlerEvent>;
export interface AcrossOriginSettler extends BaseContract {
    connect(signerOrProvider: Signer | Provider | string): this;
    attach(addressOrName: string): this;
    deployed(): Promise<this>;
    interface: AcrossOriginSettlerInterface;
    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]>;
        SPOKE_POOL(overrides?: CallOverrides): Promise<[string]>;
        computeDepositId(depositNonce: BigNumberish, depositor: string, overrides?: CallOverrides): Promise<[BigNumber]>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[
            AcrossOrderDataStructOutput,
            AcrossOriginFillerDataStructOutput
        ]>;
        destinationSettlers(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
        getCurrentTime(overrides?: CallOverrides): Promise<[number]>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, originFillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        owner(overrides?: CallOverrides): Promise<[string]>;
        renounceOwnership(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;
        }>;
        setDestinationSettler(chainId: BigNumberish, destinationSettler: string, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
        transferOwnership(newOwner: string, overrides?: Overrides & {
            from?: string;
        }): Promise<ContractTransaction>;
    };
    PERMIT2(overrides?: CallOverrides): Promise<string>;
    QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
    SPOKE_POOL(overrides?: CallOverrides): Promise<string>;
    computeDepositId(depositNonce: BigNumberish, depositor: string, overrides?: CallOverrides): Promise<BigNumber>;
    decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[AcrossOrderDataStructOutput, AcrossOriginFillerDataStructOutput]>;
    destinationSettlers(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
    getCurrentTime(overrides?: CallOverrides): Promise<number>;
    multicall(data: BytesLike[], overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, originFillerData: BytesLike, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    owner(overrides?: CallOverrides): Promise<string>;
    renounceOwnership(overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
    resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
    setDestinationSettler(chainId: BigNumberish, destinationSettler: string, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    transferOwnership(newOwner: string, overrides?: Overrides & {
        from?: string;
    }): Promise<ContractTransaction>;
    callStatic: {
        PERMIT2(overrides?: CallOverrides): Promise<string>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
        SPOKE_POOL(overrides?: CallOverrides): Promise<string>;
        computeDepositId(depositNonce: BigNumberish, depositor: string, overrides?: CallOverrides): Promise<BigNumber>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<[
            AcrossOrderDataStructOutput,
            AcrossOriginFillerDataStructOutput
        ]>;
        destinationSettlers(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
        getCurrentTime(overrides?: CallOverrides): Promise<number>;
        multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
        open(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<void>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, originFillerData: BytesLike, overrides?: CallOverrides): Promise<void>;
        owner(overrides?: CallOverrides): Promise<string>;
        renounceOwnership(overrides?: CallOverrides): Promise<void>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<ResolvedCrossChainOrderStructOutput>;
        setDestinationSettler(chainId: BigNumberish, destinationSettler: string, overrides?: CallOverrides): Promise<void>;
        transferOwnership(newOwner: string, overrides?: CallOverrides): Promise<void>;
    };
    filters: {
        "Open(bytes32,tuple)"(orderId?: BytesLike | null, resolvedOrder?: null): OpenEventFilter;
        Open(orderId?: BytesLike | null, resolvedOrder?: null): OpenEventFilter;
        "OwnershipTransferred(address,address)"(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
        OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
        "SetDestinationSettler(uint256,address,address)"(chainId?: BigNumberish | null, prevDestinationSettler?: string | null, destinationSettler?: string | null): SetDestinationSettlerEventFilter;
        SetDestinationSettler(chainId?: BigNumberish | null, prevDestinationSettler?: string | null, destinationSettler?: string | null): SetDestinationSettlerEventFilter;
    };
    estimateGas: {
        PERMIT2(overrides?: CallOverrides): Promise<BigNumber>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<BigNumber>;
        SPOKE_POOL(overrides?: CallOverrides): Promise<BigNumber>;
        computeDepositId(depositNonce: BigNumberish, depositor: string, overrides?: CallOverrides): Promise<BigNumber>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        destinationSettlers(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        getCurrentTime(overrides?: CallOverrides): Promise<BigNumber>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, originFillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        owner(overrides?: CallOverrides): Promise<BigNumber>;
        renounceOwnership(overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<BigNumber>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        setDestinationSettler(chainId: BigNumberish, destinationSettler: string, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
        transferOwnership(newOwner: string, overrides?: Overrides & {
            from?: string;
        }): Promise<BigNumber>;
    };
    populateTransaction: {
        PERMIT2(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        QUOTE_BEFORE_DEADLINE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        SPOKE_POOL(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        computeDepositId(depositNonce: BigNumberish, depositor: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        decode(orderData: BytesLike, fillerData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        destinationSettlers(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getCurrentTime(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        open(order: OnchainCrossChainOrderStruct, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        openFor(order: GaslessCrossChainOrderStruct, signature: BytesLike, originFillerData: BytesLike, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        renounceOwnership(overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        resolve(order: OnchainCrossChainOrderStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        resolveFor(order: GaslessCrossChainOrderStruct, originFillerData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        setDestinationSettler(chainId: BigNumberish, destinationSettler: string, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
        transferOwnership(newOwner: string, overrides?: Overrides & {
            from?: string;
        }): Promise<PopulatedTransaction>;
    };
}
