{
  "abi": [
    {
      "inputs": [
        { "internalType": "string", "name": "name_", "type": "string" },
        { "internalType": "string", "name": "symbol_", "type": "string" }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "bool", "name": "invalidPositionId", "type": "bool" },
        { "internalType": "bool", "name": "positionInactive", "type": "bool" },
        { "internalType": "bool", "name": "isShort", "type": "bool" }
      ],
      "name": "AddingCollateralToInvalidPosition",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "spotPrice", "type": "uint256" }
      ],
      "name": "AdjustmentResultsInMinimumCollateralNotBeingMet",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" }
      ],
      "name": "AlreadyInitialised",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "bool", "name": "invalidPositionId", "type": "bool" },
        { "internalType": "bool", "name": "positionInactive", "type": "bool" },
        { "internalType": "bool", "name": "strikeMismatch", "type": "bool" },
        { "internalType": "bool", "name": "optionTypeMismatch", "type": "bool" }
      ],
      "name": "CannotAdjustInvalidPosition",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" }
      ],
      "name": "CannotClosePositionZero",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" }
      ],
      "name": "CannotOpenZeroAmount",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "setCollateralTo",
          "type": "uint256"
        }
      ],
      "name": "FullyClosingWithNonZeroSetCollateral",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "penaltyRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "liquidatorFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "smFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "minLiquidationFee",
              "type": "uint256"
            }
          ],
          "internalType": "struct OptionToken.PartialCollateralParameters",
          "name": "partialCollatParams",
          "type": "tuple"
        }
      ],
      "name": "InvalidPartialCollateralParameters",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "internalType": "uint256",
          "name": "originalPositionAmount",
          "type": "uint256"
        },
        { "internalType": "uint256", "name": "splitAmount", "type": "uint256" }
      ],
      "name": "InvalidSplitAmount",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" }
      ],
      "name": "MergingUnapprovedPosition",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" }
      ],
      "name": "MustMergeTwoOrMorePositions",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        {
          "internalType": "address",
          "name": "nominatedOwner",
          "type": "address"
        }
      ],
      "name": "OnlyNominatedOwner",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        { "internalType": "address", "name": "optionMarket", "type": "address" }
      ],
      "name": "OnlyOptionMarket",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        { "internalType": "address", "name": "owner", "type": "address" }
      ],
      "name": "OnlyOwner",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "address", "name": "trader", "type": "address" },
        { "internalType": "address", "name": "owner", "type": "address" }
      ],
      "name": "OnlyOwnerCanAdjustPosition",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        {
          "internalType": "address",
          "name": "shortCollateral",
          "type": "address"
        }
      ],
      "name": "OnlyShortCollateral",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "firstPosition",
          "type": "tuple"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "nextPosition",
          "type": "tuple"
        },
        { "internalType": "bool", "name": "ownerMismatch", "type": "bool" },
        { "internalType": "bool", "name": "strikeMismatch", "type": "bool" },
        {
          "internalType": "bool",
          "name": "optionTypeMismatch",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "duplicatePositionId",
          "type": "bool"
        }
      ],
      "name": "PositionMismatchWhenMerging",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "spotPrice", "type": "uint256" }
      ],
      "name": "PositionNotLiquidatable",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "spotPrice", "type": "uint256" }
      ],
      "name": "ResultingNewPositionLiquidatable",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "spotPrice", "type": "uint256" }
      ],
      "name": "ResultingOriginalPositionLiquidatable",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "address", "name": "caller", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" }
      ],
      "name": "SplittingUnapprovedPosition",
      "type": "error"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "thrower", "type": "address" },
        { "internalType": "uint256", "name": "strikeId", "type": "uint256" }
      ],
      "name": "StrikeIsSettled",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "approved",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "operator",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bool",
          "name": "approved",
          "type": "bool"
        }
      ],
      "name": "ApprovalForAll",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "oldOwner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnerChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnerNominated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "penaltyRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "liquidatorFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "smFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "minLiquidationFee",
              "type": "uint256"
            }
          ],
          "indexed": false,
          "internalType": "struct OptionToken.PartialCollateralParameters",
          "name": "partialCollateralParams",
          "type": "tuple"
        }
      ],
      "name": "PartialCollateralParamsSet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "positionId",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "enum OptionToken.PositionUpdatedType",
          "name": "updatedType",
          "type": "uint8"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "indexed": false,
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "timestamp",
          "type": "uint256"
        }
      ],
      "name": "PositionUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "string",
          "name": "URI",
          "type": "string"
        }
      ],
      "name": "URISet",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "acceptOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "amountCollateral",
          "type": "uint256"
        }
      ],
      "name": "addCollateral",
      "outputs": [
        {
          "internalType": "enum OptionMarket.OptionType",
          "name": "optionType",
          "type": "uint8"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            { "internalType": "bool", "name": "isBuy", "type": "bool" },
            { "internalType": "bool", "name": "isForceClose", "type": "bool" },
            {
              "internalType": "enum OptionMarket.TradeDirection",
              "name": "tradeDirection",
              "type": "uint8"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "expiry", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "strikePrice",
              "type": "uint256"
            },
            {
              "components": [
                {
                  "internalType": "uint256",
                  "name": "freeLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "burnableLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "usedCollatLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "pendingDeltaLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "usedDeltaLiquidity",
                  "type": "uint256"
                },
                { "internalType": "uint256", "name": "NAV", "type": "uint256" }
              ],
              "internalType": "struct LiquidityPool.Liquidity",
              "name": "liquidity",
              "type": "tuple"
            },
            {
              "components": [
                {
                  "internalType": "uint256",
                  "name": "spotPrice",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes32",
                  "name": "quoteKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "baseKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "uint256",
                  "name": "quoteBaseFeeRate",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "baseQuoteFeeRate",
                  "type": "uint256"
                }
              ],
              "internalType": "struct SynthetixAdapter.ExchangeParams",
              "name": "exchangeParams",
              "type": "tuple"
            }
          ],
          "internalType": "struct OptionMarket.TradeParameters",
          "name": "trade",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "strikeId", "type": "uint256" },
        { "internalType": "address", "name": "trader", "type": "address" },
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "uint256", "name": "optionCost", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "setCollateralTo",
          "type": "uint256"
        },
        { "internalType": "bool", "name": "isOpen", "type": "bool" }
      ],
      "name": "adjustPosition",
      "outputs": [
        { "internalType": "uint256", "name": "", "type": "uint256" },
        {
          "internalType": "int256",
          "name": "pendingCollateral",
          "type": "int256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "to", "type": "address" },
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "approve",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "owner", "type": "address" }
      ],
      "name": "balanceOf",
      "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "baseURI",
      "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "position",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "expiry", "type": "uint256" },
        { "internalType": "uint256", "name": "strikePrice", "type": "uint256" },
        { "internalType": "uint256", "name": "spotPrice", "type": "uint256" }
      ],
      "name": "canLiquidate",
      "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "getApproved",
      "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "gwavPremium", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "userPositionCollateral",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "convertedMinLiquidationFee",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "insolvencyMultiplier",
          "type": "uint256"
        }
      ],
      "name": "getLiquidationFees",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "returnCollateral",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "lpPremiums",
              "type": "uint256"
            },
            { "internalType": "uint256", "name": "lpFee", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "liquidatorFee",
              "type": "uint256"
            },
            { "internalType": "uint256", "name": "smFee", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "insolventAmount",
              "type": "uint256"
            }
          ],
          "internalType": "struct OptionToken.LiquidationFees",
          "name": "liquidationFees",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" }
      ],
      "name": "getOptionPosition",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "positionIds",
          "type": "uint256[]"
        }
      ],
      "name": "getOptionPositions",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition[]",
          "name": "",
          "type": "tuple[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "target", "type": "address" }
      ],
      "name": "getOwnerPositions",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            }
          ],
          "internalType": "struct OptionToken.OptionPosition[]",
          "name": "",
          "type": "tuple[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getPartialCollatParams",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "penaltyRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "liquidatorFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "smFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "minLiquidationFee",
              "type": "uint256"
            }
          ],
          "internalType": "struct OptionToken.PartialCollateralParameters",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" }
      ],
      "name": "getPositionState",
      "outputs": [
        {
          "internalType": "enum OptionToken.PositionState",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" }
      ],
      "name": "getPositionWithOwner",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            },
            { "internalType": "address", "name": "owner", "type": "address" }
          ],
          "internalType": "struct OptionToken.PositionWithOwner",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "positionIds",
          "type": "uint256[]"
        }
      ],
      "name": "getPositionsWithOwner",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "positionId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "strikeId",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "collateral",
              "type": "uint256"
            },
            {
              "internalType": "enum OptionToken.PositionState",
              "name": "state",
              "type": "uint8"
            },
            { "internalType": "address", "name": "owner", "type": "address" }
          ],
          "internalType": "struct OptionToken.PositionWithOwner[]",
          "name": "",
          "type": "tuple[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract OptionMarket",
          "name": "_optionMarket",
          "type": "address"
        },
        {
          "internalType": "contract OptionGreekCache",
          "name": "_greekCache",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_shortCollateral",
          "type": "address"
        },
        {
          "internalType": "contract SynthetixAdapter",
          "name": "_synthetixAdapter",
          "type": "address"
        }
      ],
      "name": "init",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "owner", "type": "address" },
        { "internalType": "address", "name": "operator", "type": "address" }
      ],
      "name": "isApprovedForAll",
      "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        {
          "components": [
            { "internalType": "bool", "name": "isBuy", "type": "bool" },
            { "internalType": "bool", "name": "isForceClose", "type": "bool" },
            {
              "internalType": "enum OptionMarket.TradeDirection",
              "name": "tradeDirection",
              "type": "uint8"
            },
            {
              "internalType": "enum OptionMarket.OptionType",
              "name": "optionType",
              "type": "uint8"
            },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "expiry", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "strikePrice",
              "type": "uint256"
            },
            {
              "components": [
                {
                  "internalType": "uint256",
                  "name": "freeLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "burnableLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "usedCollatLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "pendingDeltaLiquidity",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "usedDeltaLiquidity",
                  "type": "uint256"
                },
                { "internalType": "uint256", "name": "NAV", "type": "uint256" }
              ],
              "internalType": "struct LiquidityPool.Liquidity",
              "name": "liquidity",
              "type": "tuple"
            },
            {
              "components": [
                {
                  "internalType": "uint256",
                  "name": "spotPrice",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes32",
                  "name": "quoteKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "baseKey",
                  "type": "bytes32"
                },
                {
                  "internalType": "uint256",
                  "name": "quoteBaseFeeRate",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "baseQuoteFeeRate",
                  "type": "uint256"
                }
              ],
              "internalType": "struct SynthetixAdapter.ExchangeParams",
              "name": "exchangeParams",
              "type": "tuple"
            }
          ],
          "internalType": "struct OptionMarket.TradeParameters",
          "name": "trade",
          "type": "tuple"
        },
        { "internalType": "uint256", "name": "totalCost", "type": "uint256" }
      ],
      "name": "liquidate",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "returnCollateral",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "lpPremiums",
              "type": "uint256"
            },
            { "internalType": "uint256", "name": "lpFee", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "liquidatorFee",
              "type": "uint256"
            },
            { "internalType": "uint256", "name": "smFee", "type": "uint256" },
            {
              "internalType": "uint256",
              "name": "insolventAmount",
              "type": "uint256"
            }
          ],
          "internalType": "struct OptionToken.LiquidationFees",
          "name": "liquidationFees",
          "type": "tuple"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "positionIds",
          "type": "uint256[]"
        }
      ],
      "name": "merge",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "nextId",
      "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "_owner", "type": "address" }
      ],
      "name": "nominateNewOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "nominatedOwner",
      "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "ownerOf",
      "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "partialCollatParams",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "penaltyRatio",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "liquidatorFeeRatio",
          "type": "uint256"
        },
        { "internalType": "uint256", "name": "smFeeRatio", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "minLiquidationFee",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "name": "positions",
      "outputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "uint256", "name": "strikeId", "type": "uint256" },
        {
          "internalType": "enum OptionMarket.OptionType",
          "name": "optionType",
          "type": "uint8"
        },
        { "internalType": "uint256", "name": "amount", "type": "uint256" },
        { "internalType": "uint256", "name": "collateral", "type": "uint256" },
        {
          "internalType": "enum OptionToken.PositionState",
          "name": "state",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "from", "type": "address" },
        { "internalType": "address", "name": "to", "type": "address" },
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "safeTransferFrom",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "from", "type": "address" },
        { "internalType": "address", "name": "to", "type": "address" },
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
        { "internalType": "bytes", "name": "_data", "type": "bytes" }
      ],
      "name": "safeTransferFrom",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "operator", "type": "address" },
        { "internalType": "bool", "name": "approved", "type": "bool" }
      ],
      "name": "setApprovalForAll",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "penaltyRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "liquidatorFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "smFeeRatio",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "minLiquidationFee",
              "type": "uint256"
            }
          ],
          "internalType": "struct OptionToken.PartialCollateralParameters",
          "name": "_partialCollatParams",
          "type": "tuple"
        }
      ],
      "name": "setPartialCollateralParams",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "string", "name": "newURI", "type": "string" }
      ],
      "name": "setURI",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "positionIds",
          "type": "uint256[]"
        }
      ],
      "name": "settlePositions",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "positionId", "type": "uint256" },
        { "internalType": "uint256", "name": "newAmount", "type": "uint256" },
        {
          "internalType": "uint256",
          "name": "newCollateral",
          "type": "uint256"
        },
        { "internalType": "address", "name": "recipient", "type": "address" }
      ],
      "name": "split",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "newPositionId",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }
      ],
      "name": "supportsInterface",
      "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "symbol",
      "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "index", "type": "uint256" }
      ],
      "name": "tokenByIndex",
      "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "owner", "type": "address" },
        { "internalType": "uint256", "name": "index", "type": "uint256" }
      ],
      "name": "tokenOfOwnerByIndex",
      "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "tokenURI",
      "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        { "internalType": "address", "name": "from", "type": "address" },
        { "internalType": "address", "name": "to", "type": "address" },
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" }
      ],
      "name": "transferFrom",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]
}
