"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ERC7683OrderDepositor__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [],
        name: "WrongChainId",
        type: "error",
    },
    {
        inputs: [],
        name: "WrongExclusiveRelayer",
        type: "error",
    },
    {
        inputs: [],
        name: "WrongOrderDataType",
        type: "error",
    },
    {
        inputs: [],
        name: "WrongSettlementContract",
        type: "error",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "orderId",
                type: "bytes32",
            },
            {
                components: [
                    {
                        internalType: "address",
                        name: "user",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "originChainId",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "openDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderId",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "maxSpent",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "minReceived",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "uint64",
                                name: "destinationChainId",
                                type: "uint64",
                            },
                            {
                                internalType: "bytes32",
                                name: "destinationSettler",
                                type: "bytes32",
                            },
                            {
                                internalType: "bytes",
                                name: "originData",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct FillInstruction[]",
                        name: "fillInstructions",
                        type: "tuple[]",
                    },
                ],
                indexed: false,
                internalType: "struct ResolvedCrossChainOrder",
                name: "resolvedOrder",
                type: "tuple",
            },
        ],
        name: "Open",
        type: "event",
    },
    {
        inputs: [],
        name: "PERMIT2",
        outputs: [
            {
                internalType: "contract IPermit2",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "QUOTE_BEFORE_DEADLINE",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "orderData",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "fillerData",
                type: "bytes",
            },
        ],
        name: "decode",
        outputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "inputToken",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "inputAmount",
                        type: "uint256",
                    },
                    {
                        internalType: "address",
                        name: "outputToken",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "outputAmount",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "destinationChainId",
                        type: "uint32",
                    },
                    {
                        internalType: "address",
                        name: "recipient",
                        type: "address",
                    },
                    {
                        internalType: "address",
                        name: "exclusiveRelayer",
                        type: "address",
                    },
                    {
                        internalType: "uint32",
                        name: "exclusivityPeriod",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes",
                        name: "message",
                        type: "bytes",
                    },
                ],
                internalType: "struct AcrossOrderData",
                name: "",
                type: "tuple",
            },
            {
                components: [
                    {
                        internalType: "address",
                        name: "exclusiveRelayer",
                        type: "address",
                    },
                ],
                internalType: "struct AcrossOriginFillerData",
                name: "",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "getCurrentTime",
        outputs: [
            {
                internalType: "uint32",
                name: "",
                type: "uint32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderDataType",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes",
                        name: "orderData",
                        type: "bytes",
                    },
                ],
                internalType: "struct OnchainCrossChainOrder",
                name: "order",
                type: "tuple",
            },
        ],
        name: "open",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "originSettler",
                        type: "address",
                    },
                    {
                        internalType: "address",
                        name: "user",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "originChainId",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "openDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderDataType",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes",
                        name: "orderData",
                        type: "bytes",
                    },
                ],
                internalType: "struct GaslessCrossChainOrder",
                name: "order",
                type: "tuple",
            },
            {
                internalType: "bytes",
                name: "signature",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "fillerData",
                type: "bytes",
            },
        ],
        name: "openFor",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderDataType",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes",
                        name: "orderData",
                        type: "bytes",
                    },
                ],
                internalType: "struct OnchainCrossChainOrder",
                name: "order",
                type: "tuple",
            },
        ],
        name: "resolve",
        outputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "user",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "originChainId",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "openDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderId",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "maxSpent",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "minReceived",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "uint64",
                                name: "destinationChainId",
                                type: "uint64",
                            },
                            {
                                internalType: "bytes32",
                                name: "destinationSettler",
                                type: "bytes32",
                            },
                            {
                                internalType: "bytes",
                                name: "originData",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct FillInstruction[]",
                        name: "fillInstructions",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct ResolvedCrossChainOrder",
                name: "resolvedOrder",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "originSettler",
                        type: "address",
                    },
                    {
                        internalType: "address",
                        name: "user",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "originChainId",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "openDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderDataType",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes",
                        name: "orderData",
                        type: "bytes",
                    },
                ],
                internalType: "struct GaslessCrossChainOrder",
                name: "order",
                type: "tuple",
            },
            {
                internalType: "bytes",
                name: "originFillerData",
                type: "bytes",
            },
        ],
        name: "resolveFor",
        outputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "user",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "originChainId",
                        type: "uint256",
                    },
                    {
                        internalType: "uint32",
                        name: "openDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "fillDeadline",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes32",
                        name: "orderId",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "maxSpent",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "bytes32",
                                name: "token",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "amount",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "recipient",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "chainId",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct Output[]",
                        name: "minReceived",
                        type: "tuple[]",
                    },
                    {
                        components: [
                            {
                                internalType: "uint64",
                                name: "destinationChainId",
                                type: "uint64",
                            },
                            {
                                internalType: "bytes32",
                                name: "destinationSettler",
                                type: "bytes32",
                            },
                            {
                                internalType: "bytes",
                                name: "originData",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct FillInstruction[]",
                        name: "fillInstructions",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct ResolvedCrossChainOrder",
                name: "resolvedOrder",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
class ERC7683OrderDepositor__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.ERC7683OrderDepositor__factory = ERC7683OrderDepositor__factory;
ERC7683OrderDepositor__factory.abi = _abi;
