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

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

const _abi = [
  {
    type: "constructor",
    inputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "cancelOrderByCloid",
    inputs: [
      {
        name: "spotIndex",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "cloid",
        type: "uint128",
        internalType: "uint128",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "parentHandler",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "address",
        internalType: "address",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "submitSpotLimitOrder",
    inputs: [
      {
        name: "finalTokenInfo",
        type: "tuple",
        internalType: "struct FinalTokenInfo",
        components: [
          {
            name: "spotIndex",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "isBuy",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "feePpm",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "suggestedDiscountBps",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "swapHandler",
            type: "address",
            internalType: "contract SwapHandler",
          },
        ],
      },
      {
        name: "limitPriceX1e8",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "sizeX1e8",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "cloid",
        type: "uint128",
        internalType: "uint128",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "sweepErc20",
    inputs: [
      {
        name: "token",
        type: "address",
        internalType: "address",
      },
      {
        name: "amount",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "transferFundsToSelfOnCore",
    inputs: [
      {
        name: "erc20EVMAddress",
        type: "address",
        internalType: "address",
      },
      {
        name: "erc20CoreIndex",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "amountEVM",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "decimalDiff",
        type: "int8",
        internalType: "int8",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "transferFundsToUserOnCore",
    inputs: [
      {
        name: "erc20CoreIndex",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "to",
        type: "address",
        internalType: "address",
      },
      {
        name: "amountCore",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "destinationDex",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "error",
    name: "InsufficientAmountForAccountActivation",
    inputs: [],
  },
  {
    type: "error",
    name: "InvalidTif",
    inputs: [],
  },
  {
    type: "error",
    name: "LimitPxIsZero",
    inputs: [],
  },
  {
    type: "error",
    name: "OrderSizeIsZero",
    inputs: [],
  },
] as const;

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