[
  {
    "type": "constructor",
    "inputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "authority",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "cancelOrders",
    "inputs": [
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "orderIds",
        "type": "uint40[]",
        "internalType": "RestingOrderId[]"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "cleanExpiredEpochs",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "maxEpochs",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "cleaned",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "computeImpactPrices",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "indexPrice",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "computeOrderbookChecksum",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "maxLevels",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getAccountRegistry",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IAccountRegistry"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getAllOpenOrders",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint40[]",
        "internalType": "RestingOrderId[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBestPrice",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "side",
        "type": "uint8",
        "internalType": "enum IOrdersManager.OrderSide"
      },
      {
        "name": "stepPrice",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBookConfig",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct IOrdersManager.Config",
        "components": [
          {
            "name": "stepSize",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "stepPrice",
            "type": "uint64",
            "internalType": "uint64"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getDeferredPending",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      }
    ],
    "outputs": [
      {
        "name": "pendingSteps",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "tick",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "feeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getEpochBucketSize",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getEpochInterval",
    "inputs": [],
    "outputs": [
      {
        "name": "duration",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "genesisTimestamp",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getEpochsBehind",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getExpiryQueueInfo",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getHeaderVersion",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "blockNumber",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getHookBitmap",
    "inputs": [
      {
        "name": "hookAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getOpenOrders",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "startIndex",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "limit",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint40[]",
        "internalType": "RestingOrderId[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getOrder",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct IOrdersManager.Order",
        "components": [
          {
            "name": "sizeSteps",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "filledSteps",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "builderFeeBps",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "tick",
            "type": "uint24",
            "internalType": "Tick"
          },
          {
            "name": "epochId",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "builderId",
            "type": "uint16",
            "internalType": "uint16"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getOrderSeqId",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      }
    ],
    "outputs": [
      {
        "name": "seqId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getOrdersInEpoch",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "epochId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getProjectedFillChunks",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "chunks",
        "type": "tuple[]",
        "internalType": "struct IOrdersManager.ProjectedFillChunk[]",
        "components": [
          {
            "name": "claimSize",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "claimQuoteAmount",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "fundingSnapshotX128",
            "type": "int128",
            "internalType": "int128"
          },
          {
            "name": "feeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "side",
            "type": "uint8",
            "internalType": "enum IOrdersManager.OrderSide"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTakerContext",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct IOrdersManager.TakerContext",
        "components": [
          {
            "name": "marketId",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "takerOrderId",
            "type": "uint56",
            "internalType": "WideOrderId"
          },
          {
            "name": "takerFeeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "makerFeeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "builderFeeBps",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "builderId",
            "type": "uint16",
            "internalType": "uint16"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTickLevelInfo",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "tick",
        "type": "uint24",
        "internalType": "Tick"
      }
    ],
    "outputs": [
      {
        "name": "orderIdsLength",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "liveOrders",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "totalSizeSteps",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTotalOpenOrders",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getTotalSizeUntilPrice",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "side",
        "type": "uint8",
        "internalType": "enum IOrdersManager.OrderSide"
      },
      {
        "name": "price",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getUserSelfSizeSteps",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "tick",
        "type": "uint24",
        "internalType": "Tick"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "selfSizeSteps",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "initialize",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "genesisTs",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "epochDur",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "bucketSize",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "accountRegistry",
        "type": "address",
        "internalType": "contract IAccountRegistry"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "isAllowed",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isConsumingScheduledOp",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isDeferredMode",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pause",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "pauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "paused",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pausedFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "peekDirtyLevel",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "sideHint",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "outputs": [
      {
        "name": "level",
        "type": "tuple",
        "internalType": "struct IPendingSettlementCleaner.DirtyLevel",
        "components": [
          {
            "name": "exists",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "side",
            "type": "uint8",
            "internalType": "uint8"
          },
          {
            "name": "tick",
            "type": "uint24",
            "internalType": "uint24"
          },
          {
            "name": "pendingSegments",
            "type": "uint32",
            "internalType": "uint32"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingWorkCount",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "placeOrder",
    "inputs": [
      {
        "name": "params",
        "type": "tuple",
        "internalType": "struct IOrdersManager.PlaceOrderParams",
        "components": [
          {
            "name": "marketId",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "sizeSteps",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "priceTicks",
            "type": "uint24",
            "internalType": "uint24"
          },
          {
            "name": "ttlUnits",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "side",
            "type": "uint8",
            "internalType": "enum IOrdersManager.OrderSide"
          },
          {
            "name": "stpMode",
            "type": "uint8",
            "internalType": "enum IOrdersManager.STPMode"
          },
          {
            "name": "orderType",
            "type": "uint8",
            "internalType": "enum IOrdersManager.OrderType"
          },
          {
            "name": "postOnly",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "reduceOnly",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "timeInForce",
            "type": "uint8",
            "internalType": "enum IOrdersManager.TimeInForce"
          },
          {
            "name": "headerVersion",
            "type": "uint8",
            "internalType": "uint8"
          },
          {
            "name": "builderId",
            "type": "uint16",
            "internalType": "uint16"
          }
        ]
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "makerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "takerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "builderFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "fundingSnapshotX128",
        "type": "int128",
        "internalType": "int128"
      }
    ],
    "outputs": [
      {
        "name": "orderId",
        "type": "uint56",
        "internalType": "WideOrderId"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "pumpDirtyLevels",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "maxLevels",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "maxOrders",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "maxSegments",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "progress",
        "type": "tuple",
        "internalType": "struct IPendingSettlementCleaner.PumpProgress",
        "components": [
          {
            "name": "processedLevels",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "processedOrders",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "processedSegments",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "done",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "pumpForUser",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "progress",
        "type": "tuple",
        "internalType": "struct IPendingSettlementCleaner.PumpProgress",
        "components": [
          {
            "name": "processedLevels",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "processedOrders",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "processedSegments",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "done",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "registerHooks",
    "inputs": [
      {
        "name": "hookBitmap",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setAuthority",
    "inputs": [
      {
        "name": "newAuthority",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setBookConfig",
    "inputs": [
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "config",
        "type": "tuple",
        "internalType": "struct IOrdersManager.Config",
        "components": [
          {
            "name": "stepSize",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "stepPrice",
            "type": "uint64",
            "internalType": "uint64"
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setDeferredMode",
    "inputs": [
      {
        "name": "marketId",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "enabled",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setHeaderVersion",
    "inputs": [
      {
        "name": "version",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "unpause",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "unpauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "AuthorityUpdated",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BatchSettled",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "side",
        "type": "uint8",
        "indexed": false,
        "internalType": "uint8"
      },
      {
        "name": "tick",
        "type": "uint24",
        "indexed": false,
        "internalType": "uint24"
      },
      {
        "name": "processedOrders",
        "type": "uint32",
        "indexed": false,
        "internalType": "uint32"
      },
      {
        "name": "processedSegments",
        "type": "uint32",
        "indexed": false,
        "internalType": "uint32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CancelOrder",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "orderId",
        "type": "uint56",
        "indexed": true,
        "internalType": "WideOrderId"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "EpochConfigInitialized",
    "inputs": [
      {
        "name": "genesisTimestamp",
        "type": "uint32",
        "indexed": false,
        "internalType": "uint32"
      },
      {
        "name": "epochDuration",
        "type": "uint32",
        "indexed": false,
        "internalType": "uint32"
      },
      {
        "name": "maxBucketSize",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "HooksRegistered",
    "inputs": [
      {
        "name": "hookAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "hookBitmap",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Initialized",
    "inputs": [
      {
        "name": "version",
        "type": "uint64",
        "indexed": false,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "MatchOrder",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "makerOrderId",
        "type": "uint40",
        "indexed": true,
        "internalType": "RestingOrderId"
      },
      {
        "name": "takerOrderId",
        "type": "uint56",
        "indexed": false,
        "internalType": "WideOrderId"
      },
      {
        "name": "matchedSize",
        "type": "uint128",
        "indexed": false,
        "internalType": "uint128"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OrderbookChecksum",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "checksum",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Paused",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "PausedFunction",
    "inputs": [
      {
        "name": "by",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": true,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "PlaceOrder",
    "inputs": [
      {
        "name": "protocol",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "marketId",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      },
      {
        "name": "orderId",
        "type": "uint56",
        "indexed": true,
        "internalType": "WideOrderId"
      },
      {
        "name": "orderParams",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IOrdersManager.PlaceOrderParams",
        "components": [
          {
            "name": "marketId",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "sizeSteps",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "priceTicks",
            "type": "uint24",
            "internalType": "uint24"
          },
          {
            "name": "ttlUnits",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "side",
            "type": "uint8",
            "internalType": "enum IOrdersManager.OrderSide"
          },
          {
            "name": "stpMode",
            "type": "uint8",
            "internalType": "enum IOrdersManager.STPMode"
          },
          {
            "name": "orderType",
            "type": "uint8",
            "internalType": "enum IOrdersManager.OrderType"
          },
          {
            "name": "postOnly",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "reduceOnly",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "timeInForce",
            "type": "uint8",
            "internalType": "enum IOrdersManager.TimeInForce"
          },
          {
            "name": "headerVersion",
            "type": "uint8",
            "internalType": "uint8"
          },
          {
            "name": "builderId",
            "type": "uint16",
            "internalType": "uint16"
          }
        ]
      },
      {
        "name": "fee",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IOrdersManager.OrderFee",
        "components": [
          {
            "name": "makerFeeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "takerFeeBps",
            "type": "int16",
            "internalType": "int16"
          },
          {
            "name": "builderFeeBps",
            "type": "uint16",
            "internalType": "uint16"
          }
        ]
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Unpaused",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UnpausedFunction",
    "inputs": [
      {
        "name": "by",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": true,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AccessManagedInvalidAuthority",
    "inputs": [
      {
        "name": "authority",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "AccessManagedRequiredDelay",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "delay",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "AccessManagedUnauthorized",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "AlreadyExistsError",
    "inputs": []
  },
  {
    "type": "error",
    "name": "BelowMinOrderSize",
    "inputs": [
      {
        "name": "size",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "ClaimedExceedsQueued",
    "inputs": [
      {
        "name": "claimed",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "queued",
        "type": "uint64",
        "internalType": "uint64"
      }
    ]
  },
  {
    "type": "error",
    "name": "DeferredInitZeroQueuedSteps",
    "inputs": []
  },
  {
    "type": "error",
    "name": "EmptyError",
    "inputs": []
  },
  {
    "type": "error",
    "name": "EnforcedPause",
    "inputs": []
  },
  {
    "type": "error",
    "name": "EnforcedPauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "EpochBucketFull",
    "inputs": [
      {
        "name": "epochId",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "bucketSize",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "EpochConfigNotInitialized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "EpochQueueNotCaughtUp",
    "inputs": [
      {
        "name": "epochsBehind",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "EpochQueueNotInitialized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ExpectedPause",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ExpectedPauseFunction",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "FillOrKillOrderNotFilled",
    "inputs": [
      {
        "name": "size",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "filledSize",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "FilledExceedsSize",
    "inputs": [
      {
        "name": "filled",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "size",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "FinalizeClaimedMismatch",
    "inputs": [
      {
        "name": "claimed",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "queued",
        "type": "uint64",
        "internalType": "uint64"
      }
    ]
  },
  {
    "type": "error",
    "name": "IndexOutOfBounds",
    "inputs": []
  },
  {
    "type": "error",
    "name": "IndexOutOfBounds",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidBuilderFeeBps",
    "inputs": [
      {
        "name": "builderFeeBps",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidEpochConfig",
    "inputs": [
      {
        "name": "genesisTimestamp",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "epochDuration",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "maxBucketSize",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidExpiry",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidExpiry",
    "inputs": [
      {
        "name": "currentTimestamp",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "expiry",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidHeaderVersion",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidHookResponse",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidInitialization",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidOrderSize",
    "inputs": [
      {
        "name": "size",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidPrice",
    "inputs": [
      {
        "name": "price",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidPrice",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidSelector",
    "inputs": [
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ]
  },
  {
    "type": "error",
    "name": "InvalidTick",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidTimeInForceForMarketOrder",
    "inputs": [
      {
        "name": "timeInForce",
        "type": "uint8",
        "internalType": "enum IOrdersManager.TimeInForce"
      }
    ]
  },
  {
    "type": "error",
    "name": "NegativeNetFee",
    "inputs": [
      {
        "name": "makerFeeBps",
        "type": "int16",
        "internalType": "int16"
      },
      {
        "name": "takerFeeBps",
        "type": "int16",
        "internalType": "int16"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotInitializing",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OpenOrdersExceedsLimit",
    "inputs": [
      {
        "name": "numOpenOrders",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "OpenOrdersOverflow",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OrderCannotBeCancelled",
    "inputs": [
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      }
    ]
  },
  {
    "type": "error",
    "name": "OrderNotExists",
    "inputs": [
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      }
    ]
  },
  {
    "type": "error",
    "name": "OrderNotOwned",
    "inputs": [
      {
        "name": "orderId",
        "type": "uint40",
        "internalType": "RestingOrderId"
      },
      {
        "name": "userId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "PostOnlyOrderMatched",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ProjectedFillChunksTooLarge",
    "inputs": [
      {
        "name": "size",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "maxSize",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "ReentrancyGuardReentrantCall",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TickLevelCapacityExceeded",
    "inputs": [
      {
        "name": "tick",
        "type": "uint24",
        "internalType": "Tick"
      },
      {
        "name": "nextSeqId",
        "type": "uint32",
        "internalType": "uint32"
      }
    ]
  },
  {
    "type": "error",
    "name": "TickLevelFull",
    "inputs": [
      {
        "name": "maxSeqId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ]
  },
  {
    "type": "error",
    "name": "ZeroAddress",
    "inputs": []
  }
]
