"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 = [
    {
        type: "function",
        name: "PERMIT2",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "address",
                internalType: "contract IPermit2",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "QUOTE_BEFORE_DEADLINE",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "computeDepositId",
        inputs: [
            {
                name: "depositNonce",
                type: "uint256",
                internalType: "uint256",
            },
            {
                name: "depositor",
                type: "address",
                internalType: "address",
            },
        ],
        outputs: [
            {
                name: "",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "decode",
        inputs: [
            {
                name: "orderData",
                type: "bytes",
                internalType: "bytes",
            },
            {
                name: "fillerData",
                type: "bytes",
                internalType: "bytes",
            },
        ],
        outputs: [
            {
                name: "",
                type: "tuple",
                internalType: "struct AcrossOrderData",
                components: [
                    {
                        name: "inputToken",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "inputAmount",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "outputToken",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "outputAmount",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "destinationChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "recipient",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "exclusiveRelayer",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "depositNonce",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "exclusivityPeriod",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "message",
                        type: "bytes",
                        internalType: "bytes",
                    },
                ],
            },
            {
                name: "",
                type: "tuple",
                internalType: "struct AcrossOriginFillerData",
                components: [
                    {
                        name: "exclusiveRelayer",
                        type: "address",
                        internalType: "address",
                    },
                ],
            },
        ],
        stateMutability: "pure",
    },
    {
        type: "function",
        name: "getCurrentTime",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "uint32",
                internalType: "uint32",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "open",
        inputs: [
            {
                name: "order",
                type: "tuple",
                internalType: "struct OnchainCrossChainOrder",
                components: [
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderDataType",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "orderData",
                        type: "bytes",
                        internalType: "bytes",
                    },
                ],
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "openFor",
        inputs: [
            {
                name: "order",
                type: "tuple",
                internalType: "struct GaslessCrossChainOrder",
                components: [
                    {
                        name: "originSettler",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "user",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "nonce",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "originChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "openDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderDataType",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "orderData",
                        type: "bytes",
                        internalType: "bytes",
                    },
                ],
            },
            {
                name: "signature",
                type: "bytes",
                internalType: "bytes",
            },
            {
                name: "originFillerData",
                type: "bytes",
                internalType: "bytes",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "resolve",
        inputs: [
            {
                name: "order",
                type: "tuple",
                internalType: "struct OnchainCrossChainOrder",
                components: [
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderDataType",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "orderData",
                        type: "bytes",
                        internalType: "bytes",
                    },
                ],
            },
        ],
        outputs: [
            {
                name: "resolvedOrder",
                type: "tuple",
                internalType: "struct ResolvedCrossChainOrder",
                components: [
                    {
                        name: "user",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "originChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "openDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderId",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "maxSpent",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "minReceived",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "fillInstructions",
                        type: "tuple[]",
                        internalType: "struct FillInstruction[]",
                        components: [
                            {
                                name: "destinationChainId",
                                type: "uint64",
                                internalType: "uint64",
                            },
                            {
                                name: "destinationSettler",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "originData",
                                type: "bytes",
                                internalType: "bytes",
                            },
                        ],
                    },
                ],
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "resolveFor",
        inputs: [
            {
                name: "order",
                type: "tuple",
                internalType: "struct GaslessCrossChainOrder",
                components: [
                    {
                        name: "originSettler",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "user",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "nonce",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "originChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "openDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderDataType",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "orderData",
                        type: "bytes",
                        internalType: "bytes",
                    },
                ],
            },
            {
                name: "originFillerData",
                type: "bytes",
                internalType: "bytes",
            },
        ],
        outputs: [
            {
                name: "resolvedOrder",
                type: "tuple",
                internalType: "struct ResolvedCrossChainOrder",
                components: [
                    {
                        name: "user",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "originChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "openDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderId",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "maxSpent",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "minReceived",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "fillInstructions",
                        type: "tuple[]",
                        internalType: "struct FillInstruction[]",
                        components: [
                            {
                                name: "destinationChainId",
                                type: "uint64",
                                internalType: "uint64",
                            },
                            {
                                name: "destinationSettler",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "originData",
                                type: "bytes",
                                internalType: "bytes",
                            },
                        ],
                    },
                ],
            },
        ],
        stateMutability: "view",
    },
    {
        type: "event",
        name: "Open",
        inputs: [
            {
                name: "orderId",
                type: "bytes32",
                indexed: true,
                internalType: "bytes32",
            },
            {
                name: "resolvedOrder",
                type: "tuple",
                indexed: false,
                internalType: "struct ResolvedCrossChainOrder",
                components: [
                    {
                        name: "user",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "originChainId",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "openDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "fillDeadline",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "orderId",
                        type: "bytes32",
                        internalType: "bytes32",
                    },
                    {
                        name: "maxSpent",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "minReceived",
                        type: "tuple[]",
                        internalType: "struct Output[]",
                        components: [
                            {
                                name: "token",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                            {
                                name: "recipient",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "chainId",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "fillInstructions",
                        type: "tuple[]",
                        internalType: "struct FillInstruction[]",
                        components: [
                            {
                                name: "destinationChainId",
                                type: "uint64",
                                internalType: "uint64",
                            },
                            {
                                name: "destinationSettler",
                                type: "bytes32",
                                internalType: "bytes32",
                            },
                            {
                                name: "originData",
                                type: "bytes",
                                internalType: "bytes",
                            },
                        ],
                    },
                ],
            },
        ],
        anonymous: false,
    },
    {
        type: "error",
        name: "InvalidBytes32",
        inputs: [],
    },
    {
        type: "error",
        name: "NoDestinationSettlerForChain",
        inputs: [
            {
                name: "chainId",
                type: "uint256",
                internalType: "uint256",
            },
        ],
    },
    {
        type: "error",
        name: "WrongChainId",
        inputs: [],
    },
    {
        type: "error",
        name: "WrongExclusiveRelayer",
        inputs: [],
    },
    {
        type: "error",
        name: "WrongOrderDataType",
        inputs: [],
    },
    {
        type: "error",
        name: "WrongSettlementContract",
        inputs: [],
    },
];
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;
