"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ERC7683OrderDepositorExternal__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: "contract SpokePool",
                name: "_spokePool",
                type: "address",
            },
            {
                internalType: "contract IPermit2",
                name: "_permit2",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "_quoteBeforeDeadline",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        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",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "previousOwner",
                type: "address",
            },
            {
                indexed: true,
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
        ],
        name: "OwnershipTransferred",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "uint256",
                name: "chainId",
                type: "uint256",
            },
            {
                indexed: true,
                internalType: "address",
                name: "prevDestinationSettler",
                type: "address",
            },
            {
                indexed: true,
                internalType: "address",
                name: "destinationSettler",
                type: "address",
            },
        ],
        name: "SetDestinationSettler",
        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: [],
        name: "SPOKE_POOL",
        outputs: [
            {
                internalType: "contract SpokePool",
                name: "",
                type: "address",
            },
        ],
        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: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "destinationSettlers",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getCurrentTime",
        outputs: [
            {
                internalType: "uint32",
                name: "",
                type: "uint32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes[]",
                name: "data",
                type: "bytes[]",
            },
        ],
        name: "multicall",
        outputs: [
            {
                internalType: "bytes[]",
                name: "results",
                type: "bytes[]",
            },
        ],
        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: "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: [],
        name: "owner",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "renounceOwnership",
        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",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "chainId",
                type: "uint256",
            },
            {
                internalType: "address",
                name: "destinationSettler",
                type: "address",
            },
        ],
        name: "setDestinationSettler",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
        ],
        name: "transferOwnership",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
class ERC7683OrderDepositorExternal__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    deploy(_spokePool, _permit2, _quoteBeforeDeadline, overrides) {
        return super.deploy(_spokePool, _permit2, _quoteBeforeDeadline, overrides || {});
    }
    getDeployTransaction(_spokePool, _permit2, _quoteBeforeDeadline, overrides) {
        return super.getDeployTransaction(_spokePool, _permit2, _quoteBeforeDeadline, overrides || {});
    }
    attach(address) {
        return super.attach(address);
    }
    connect(signer) {
        return super.connect(signer);
    }
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.ERC7683OrderDepositorExternal__factory = ERC7683OrderDepositorExternal__factory;
ERC7683OrderDepositorExternal__factory.bytecode = _bytecode;
ERC7683OrderDepositorExternal__factory.abi = _abi;
