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

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

const _abi = [
  {
    type: "function",
    name: "HYPE_TOKEN_INDEX",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "USDC_TOKEN_INDEX",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "_getMaxLeverage",
    inputs: [
      {
        name: "perpIndex",
        type: "uint16",
        internalType: "uint16",
      },
    ],
    outputs: [
      {
        name: "",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "_liquidateUser",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "coreUserExists",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeNativeTransfer",
    inputs: [
      {
        name: "",
        type: "address",
        internalType: "address",
      },
      {
        name: "from",
        type: "address",
        internalType: "address",
      },
      {
        name: "value",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "executePerpLimitOrder",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.LimitOrderAction",
        components: [
          {
            name: "asset",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "isBuy",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "limitPx",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "sz",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "reduceOnly",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "encodedTif",
            type: "uint8",
            internalType: "uint8",
          },
          {
            name: "cloid",
            type: "uint128",
            internalType: "uint128",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeRawAction",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "kind",
        type: "uint24",
        internalType: "uint24",
      },
      {
        name: "data",
        type: "bytes",
        internalType: "bytes",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "executeSpotLimitOrder",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.LimitOrderAction",
        components: [
          {
            name: "asset",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "isBuy",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "limitPx",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "sz",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "reduceOnly",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "encodedTif",
            type: "uint8",
            internalType: "uint8",
          },
          {
            name: "cloid",
            type: "uint128",
            internalType: "uint128",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeSpotSend",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.SpotSendAction",
        components: [
          {
            name: "destination",
            type: "address",
            internalType: "address",
          },
          {
            name: "token",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "_wei",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeStakingDeposit",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.StakingDepositAction",
        components: [
          {
            name: "_wei",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeStakingWithdraw",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.StakingWithdrawAction",
        components: [
          {
            name: "_wei",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeTokenDelegate",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.TokenDelegateAction",
        components: [
          {
            name: "validator",
            type: "address",
            internalType: "address",
          },
          {
            name: "_wei",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "isUndelegate",
            type: "bool",
            internalType: "bool",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeTokenTransfer",
    inputs: [
      {
        name: "",
        type: "address",
        internalType: "address",
      },
      {
        name: "token",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "from",
        type: "address",
        internalType: "address",
      },
      {
        name: "value",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "executeUsdClassTransfer",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.UsdClassTransferAction",
        components: [
          {
            name: "ntl",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "toPerp",
            type: "bool",
            internalType: "bool",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "executeVaultTransfer",
    inputs: [
      {
        name: "sender",
        type: "address",
        internalType: "address",
      },
      {
        name: "action",
        type: "tuple",
        internalType: "struct CoreState.VaultTransferAction",
        components: [
          {
            name: "vault",
            type: "address",
            internalType: "address",
          },
          {
            name: "isDeposit",
            type: "bool",
            internalType: "bool",
          },
          {
            name: "usd",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "forceAccountActivation",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "forceDelegation",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "validator",
        type: "address",
        internalType: "address",
      },
      {
        name: "amount",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "lockedUntilTimestamp",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "forcePerpBalance",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "usd",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "forceSpot",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "token",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "_wei",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "forceStaking",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "_wei",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "forceTokenInfo",
    inputs: [
      {
        name: "index",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "name",
        type: "string",
        internalType: "string",
      },
      {
        name: "evmContract",
        type: "address",
        internalType: "address",
      },
      {
        name: "szDecimals",
        type: "uint8",
        internalType: "uint8",
      },
      {
        name: "weiDecimals",
        type: "uint8",
        internalType: "uint8",
      },
      {
        name: "evmExtraWeiDecimals",
        type: "int8",
        internalType: "int8",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "forceVaultEquity",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "vault",
        type: "address",
        internalType: "address",
      },
      {
        name: "usd",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "lockedUntilTimestamp",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "isLiquidatable",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "liquidatePositions",
    inputs: [],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "processPendingOrders",
    inputs: [],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "processStakingWithdrawals",
    inputs: [],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "readAccountMarginSummary",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.AccountMarginSummary",
        components: [
          {
            name: "accountValue",
            type: "int64",
            internalType: "int64",
          },
          {
            name: "marginUsed",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "ntlPos",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "rawUsd",
            type: "int64",
            internalType: "int64",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readDelegation",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
      {
        name: "validator",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "delegation",
        type: "tuple",
        internalType: "struct PrecompileLib.Delegation",
        components: [
          {
            name: "validator",
            type: "address",
            internalType: "address",
          },
          {
            name: "amount",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "lockedUntilTimestamp",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readDelegations",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "userDelegations",
        type: "tuple[]",
        internalType: "struct PrecompileLib.Delegation[]",
        components: [
          {
            name: "validator",
            type: "address",
            internalType: "address",
          },
          {
            name: "amount",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "lockedUntilTimestamp",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readDelegatorSummary",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "summary",
        type: "tuple",
        internalType: "struct PrecompileLib.DelegatorSummary",
        components: [
          {
            name: "delegated",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "undelegated",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "totalPendingWithdrawal",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "nPendingWithdrawals",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readMarkPx",
    inputs: [
      {
        name: "perp",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [
      {
        name: "",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "readPosition",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
      {
        name: "perp",
        type: "uint16",
        internalType: "uint16",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.Position",
        components: [
          {
            name: "szi",
            type: "int64",
            internalType: "int64",
          },
          {
            name: "entryNtl",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "isolatedRawUsd",
            type: "int64",
            internalType: "int64",
          },
          {
            name: "leverage",
            type: "uint32",
            internalType: "uint32",
          },
          {
            name: "isIsolated",
            type: "bool",
            internalType: "bool",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readSpotBalance",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
      {
        name: "token",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.SpotBalance",
        components: [
          {
            name: "total",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "hold",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "entryNtl",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "readSpotPx",
    inputs: [
      {
        name: "spotMarketId",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [
      {
        name: "",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readTokenInfo",
    inputs: [
      {
        name: "index",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.TokenInfo",
        components: [
          {
            name: "name",
            type: "string",
            internalType: "string",
          },
          {
            name: "spots",
            type: "uint64[]",
            internalType: "uint64[]",
          },
          {
            name: "deployerTradingFeeShare",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "deployer",
            type: "address",
            internalType: "address",
          },
          {
            name: "evmContract",
            type: "address",
            internalType: "address",
          },
          {
            name: "szDecimals",
            type: "uint8",
            internalType: "uint8",
          },
          {
            name: "weiDecimals",
            type: "uint8",
            internalType: "uint8",
          },
          {
            name: "evmExtraWeiDecimals",
            type: "int8",
            internalType: "int8",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readUserVaultEquity",
    inputs: [
      {
        name: "user",
        type: "address",
        internalType: "address",
      },
      {
        name: "vault",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.UserVaultEquity",
        components: [
          {
            name: "equity",
            type: "uint64",
            internalType: "uint64",
          },
          {
            name: "lockedUntilTimestamp",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "readWithdrawable",
    inputs: [
      {
        name: "account",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [
      {
        name: "",
        type: "tuple",
        internalType: "struct PrecompileLib.Withdrawable",
        components: [
          {
            name: "withdrawable",
            type: "uint64",
            internalType: "uint64",
          },
        ],
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "registerTokenInfo",
    inputs: [
      {
        name: "index",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "registerValidator",
    inputs: [
      {
        name: "validator",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setMarkPx",
    inputs: [
      {
        name: "perp",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "priceDiffBps",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "isIncrease",
        type: "bool",
        internalType: "bool",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setMarkPx",
    inputs: [
      {
        name: "perp",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "markPx",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setSpotPx",
    inputs: [
      {
        name: "spotMarketId",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "spotPx",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setSpotPx",
    inputs: [
      {
        name: "spotMarketId",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "priceDiffBps",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "isIncrease",
        type: "bool",
        internalType: "bool",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setVaultMultiplier",
    inputs: [
      {
        name: "vault",
        type: "address",
        internalType: "address",
      },
      {
        name: "multiplier",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "tokenExists",
    inputs: [
      {
        name: "token",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "event",
    name: "SlotFound",
    inputs: [
      {
        name: "who",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "fsig",
        type: "bytes4",
        indexed: false,
        internalType: "bytes4",
      },
      {
        name: "keysHash",
        type: "bytes32",
        indexed: false,
        internalType: "bytes32",
      },
      {
        name: "slot",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "WARNING_UninitedSlot",
    inputs: [
      {
        name: "who",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "slot",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
    ],
    anonymous: false,
  },
  {
    type: "error",
    name: "PrecompileLib__AccountMarginSummaryPrecompileFailed",
    inputs: [],
  },
  {
    type: "error",
    name: "PrecompileLib__MarkPxPrecompileFailed",
    inputs: [],
  },
  {
    type: "error",
    name: "PrecompileLib__SpotInfoPrecompileFailed",
    inputs: [],
  },
  {
    type: "error",
    name: "PrecompileLib__SpotPxPrecompileFailed",
    inputs: [],
  },
  {
    type: "error",
    name: "SafeCastOverflowedUintDowncast",
    inputs: [
      {
        name: "bits",
        type: "uint8",
        internalType: "uint8",
      },
      {
        name: "value",
        type: "uint256",
        internalType: "uint256",
      },
    ],
  },
  {
    type: "error",
    name: "SafeERC20FailedOperation",
    inputs: [
      {
        name: "token",
        type: "address",
        internalType: "address",
      },
    ],
  },
] as const;

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