/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import { Contract, Signer, utils } from "ethers";
import type { Provider } from "@ethersproject/providers";
import type {
  IOriginSettler,
  IOriginSettlerInterface,
} from "../IOriginSettler";

const _abi = [
  {
    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: "",
        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: "",
        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,
  },
] as const;

export class IOriginSettler__factory {
  static readonly abi = _abi;
  static createInterface(): IOriginSettlerInterface {
    return new utils.Interface(_abi) as IOriginSettlerInterface;
  }
  static connect(
    address: string,
    signerOrProvider: Signer | Provider
  ): IOriginSettler {
    return new Contract(address, _abi, signerOrProvider) as IOriginSettler;
  }
}
