[
  {
    "type": "function",
    "name": "fillOrder",
    "stateMutability": "nonpayable",
    "inputs": [
      {
        "name": "order",
        "type": "tuple",
        "components": [
          {
            "name": "maker",
            "type": "address"
          },
          {
            "name": "orderExpiryTimestamp",
            "type": "uint256"
          },
          {
            "name": "collateral",
            "type": "address"
          },
          {
            "name": "isCall",
            "type": "bool"
          },
          {
            "name": "priceFeed",
            "type": "address"
          },
          {
            "name": "implementation",
            "type": "address"
          },
          {
            "name": "isLong",
            "type": "bool"
          },
          {
            "name": "maxCollateralUsable",
            "type": "uint256"
          },
          {
            "name": "strikes",
            "type": "uint256[]"
          },
          {
            "name": "expiry",
            "type": "uint256"
          },
          {
            "name": "price",
            "type": "uint256"
          },
          {
            "name": "minFillContracts",
            "type": "uint256"
          },
          {
            "name": "numContracts",
            "type": "uint256"
          },
          {
            "name": "extraOptionData",
            "type": "bytes"
          }
        ]
      },
      {
        "name": "signature",
        "type": "bytes"
      },
      {
        "name": "referrer",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "optionAddress",
        "type": "address"
      }
    ]
  },
  {
    "type": "function",
    "name": "cancelOrder",
    "stateMutability": "nonpayable",
    "inputs": [
      {
        "name": "order",
        "type": "tuple",
        "components": [
          {
            "name": "maker",
            "type": "address"
          },
          {
            "name": "orderExpiryTimestamp",
            "type": "uint256"
          },
          {
            "name": "collateral",
            "type": "address"
          },
          {
            "name": "isCall",
            "type": "bool"
          },
          {
            "name": "priceFeed",
            "type": "address"
          },
          {
            "name": "implementation",
            "type": "address"
          },
          {
            "name": "isLong",
            "type": "bool"
          },
          {
            "name": "maxCollateralUsable",
            "type": "uint256"
          },
          {
            "name": "strikes",
            "type": "uint256[]"
          },
          {
            "name": "expiry",
            "type": "uint256"
          },
          {
            "name": "price",
            "type": "uint256"
          },
          {
            "name": "minFillContracts",
            "type": "uint256"
          },
          {
            "name": "numContracts",
            "type": "uint256"
          },
          {
            "name": "extraOptionData",
            "type": "bytes"
          }
        ]
      }
    ],
    "outputs": []
  },
  {
    "type": "function",
    "name": "cancelOrdersExpiringBefore",
    "stateMutability": "nonpayable",
    "inputs": [
      {
        "name": "cutoffTimestamp",
        "type": "uint256"
      }
    ],
    "outputs": []
  },
  {
    "type": "function",
    "name": "hashOrder",
    "stateMutability": "view",
    "inputs": [
      {
        "name": "order",
        "type": "tuple",
        "components": [
          {
            "name": "maker",
            "type": "address"
          },
          {
            "name": "orderExpiryTimestamp",
            "type": "uint256"
          },
          {
            "name": "collateral",
            "type": "address"
          },
          {
            "name": "isCall",
            "type": "bool"
          },
          {
            "name": "priceFeed",
            "type": "address"
          },
          {
            "name": "implementation",
            "type": "address"
          },
          {
            "name": "isLong",
            "type": "bool"
          },
          {
            "name": "maxCollateralUsable",
            "type": "uint256"
          },
          {
            "name": "strikes",
            "type": "uint256[]"
          },
          {
            "name": "expiry",
            "type": "uint256"
          },
          {
            "name": "price",
            "type": "uint256"
          },
          {
            "name": "minFillContracts",
            "type": "uint256"
          },
          {
            "name": "numContracts",
            "type": "uint256"
          },
          {
            "name": "extraOptionData",
            "type": "bytes"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32"
      }
    ]
  },
  {
    "type": "function",
    "name": "computeNonce",
    "stateMutability": "pure",
    "inputs": [
      {
        "name": "order",
        "type": "tuple",
        "components": [
          {
            "name": "maker",
            "type": "address"
          },
          {
            "name": "orderExpiryTimestamp",
            "type": "uint256"
          },
          {
            "name": "collateral",
            "type": "address"
          },
          {
            "name": "isCall",
            "type": "bool"
          },
          {
            "name": "priceFeed",
            "type": "address"
          },
          {
            "name": "implementation",
            "type": "address"
          },
          {
            "name": "isLong",
            "type": "bool"
          },
          {
            "name": "maxCollateralUsable",
            "type": "uint256"
          },
          {
            "name": "strikes",
            "type": "uint256[]"
          },
          {
            "name": "expiry",
            "type": "uint256"
          },
          {
            "name": "price",
            "type": "uint256"
          },
          {
            "name": "minFillContracts",
            "type": "uint256"
          },
          {
            "name": "numContracts",
            "type": "uint256"
          },
          {
            "name": "extraOptionData",
            "type": "bytes"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ]
  },
  {
    "type": "function",
    "name": "LIMIT_ORDER_TYPEHASH",
    "stateMutability": "view",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32"
      }
    ]
  },
  {
    "type": "function",
    "name": "getValidNumContracts",
    "stateMutability": "view",
    "inputs": [
      {
        "name": "implementation",
        "type": "address"
      },
      {
        "name": "strikes",
        "type": "uint256[]"
      },
      {
        "name": "desiredContracts",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "result",
        "type": "tuple",
        "components": [
          {
            "name": "validContracts",
            "type": "uint256"
          },
          {
            "name": "collateralRequired",
            "type": "uint256"
          }
        ]
      }
    ]
  }
]
