PositionManager.sol

[
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "contract IOptionsAuthority",
        "name": "authority",
        "type": "address"
      }
    ],
    "name": "AuthorityUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "timeGap",
        "type": "uint40"
      }
    ],
    "name": "CancelClosePosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "string",
        "name": "errorMessage",
        "type": "string"
      }
    ],
    "name": "CancelErrorMessage",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": false,
        "internalType": "bytes32[4]",
        "name": "optionIds",
        "type": "bytes32[4]"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amountIn",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "timeGap",
        "type": "uint40"
      }
    ],
    "name": "CancelOpenPosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minAmountOut",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minOutWhenSwap",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "queueIndex",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "blockTime",
        "type": "uint40"
      }
    ],
    "name": "CreateClosePosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": false,
        "internalType": "bytes32[4]",
        "name": "optionIds",
        "type": "bytes32[4]"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minSize",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amountIn",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minOutWhenSwap",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "queueIndex",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "gasPrice",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "blockTime",
        "type": "uint40"
      }
    ],
    "name": "CreateOpenPosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "Debug",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amountOut",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "executionPrice",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "timeGap",
        "type": "uint40"
      }
    ],
    "name": "ExecuteClosePosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "string",
        "name": "errorMessage",
        "type": "string"
      }
    ],
    "name": "ExecuteErrorMessage",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amountIn",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "executionPrice",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "timeGap",
        "type": "uint40"
      }
    ],
    "name": "ExecuteOpenPosition",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "ethTransferGasLimit",
        "type": "uint256"
      }
    ],
    "name": "SetEthTransferGasLimit",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "executionFee",
        "type": "uint256"
      }
    ],
    "name": "SetExecutionFee",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "maxTimeDelay",
        "type": "uint40"
      }
    ],
    "name": "SetMaxTimeDelay",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint40",
        "name": "positionDeadlineBuffer",
        "type": "uint40"
      }
    ],
    "name": "SetPositionDeadlineBuffer",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "indexed": true,
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "path",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amountOut",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "settlePrice",
        "type": "uint256"
      }
    ],
    "name": "SettlePosition",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "contract IOptionsAuthority",
        "name": "_authority",
        "type": "address"
      }
    ],
    "name": "__AuthorityUtil_init__",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_optionsMarket",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_controller",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_weth",
        "type": "address"
      },
      {
        "internalType": "contract IOptionsAuthority",
        "name": "_authority",
        "type": "address"
      }
    ],
    "name": "__BasePositionManager_init__",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_token",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_amount",
        "type": "uint256"
      }
    ],
    "name": "approve",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "authority",
    "outputs": [
      {
        "internalType": "contract IOptionsAuthority",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "_key",
        "type": "bytes32"
      },
      {
        "internalType": "address payable",
        "name": "_executionFeeReceiver",
        "type": "address"
      }
    ],
    "name": "cancelClosePosition",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "_key",
        "type": "bytes32"
      },
      {
        "internalType": "address payable",
        "name": "_executionFeeReceiver",
        "type": "address"
      }
    ],
    "name": "cancelOpenPosition",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "name": "closePositionRequests",
    "outputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "internalType": "uint16",
        "name": "underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "internalType": "uint40",
        "name": "expiry",
        "type": "uint40"
      },
      {
        "internalType": "uint256",
        "name": "optionTokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "size",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "minAmountOut",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "minOutWhenSwap",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "withdrawETH",
        "type": "bool"
      },
      {
        "internalType": "uint40",
        "name": "blockTime",
        "type": "uint40"
      },
      {
        "internalType": "enum IPositionManager.RequestStatus",
        "name": "status",
        "type": "uint8"
      },
      {
        "internalType": "uint256",
        "name": "amountOut",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "executionPrice",
        "type": "uint256"
      },
      {
        "internalType": "uint40",
        "name": "processBlockTime",
        "type": "uint40"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "name": "closePositionsIndex",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "controller",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint16",
        "name": "_underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "internalType": "uint256",
        "name": "_optionTokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "_size",
        "type": "uint256"
      },
      {
        "internalType": "address[]",
        "name": "_path",
        "type": "address[]"
      },
      {
        "internalType": "uint256",
        "name": "_minAmountOut",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "_minOutWhenSwap",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "_withdrawETH",
        "type": "bool"
      }
    ],
    "name": "createClosePosition",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint16",
        "name": "_underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "internalType": "uint8",
        "name": "_length",
        "type": "uint8"
      },
      {
        "internalType": "bool[4]",
        "name": "_isBuys",
        "type": "bool[4]"
      },
      {
        "internalType": "bytes32[4]",
        "name": "_optionIds",
        "type": "bytes32[4]"
      },
      {
        "internalType": "bool[4]",
        "name": "_isCalls",
        "type": "bool[4]"
      },
      {
        "internalType": "uint256",
        "name": "_minSize",
        "type": "uint256"
      },
      {
        "internalType": "address[]",
        "name": "_path",
        "type": "address[]"
      },
      {
        "internalType": "uint256",
        "name": "_amountIn",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "_minOutWhenSwap",
        "type": "uint256"
      }
    ],
    "name": "createOpenPosition",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint16",
        "name": "_underlyingAssetIndex",
        "type": "uint16"
      },
      {
        "internalType": "uint8",
        "name": "_length",
        "type": "uint8"
      },
      {
        "internalType": "bool[4]",
        "name": "_isBuys",
        "type": "bool[4]"
      },
      {
        "internalType": "bytes32[4]",
        "name": "_optionIds",
        "type": "bytes32[4]"
      },
      {
        "internalType": "bool[4]",
        "name": "_isCalls",
        "type": "bool[4]"
      },
      {
        "internalType": "uint256",
        "name": "_minSize",
        "type": "uint256"
      },
      {
        "internalType": "address[]",
        "name": "_path",
        "type": "address[]"
      },
      {
        "internalType": "uint256",
        "name": "_minOutWhenSwap",
        "type": "uint256"
      }
    ],
    "name": "createOpenPositionETH"