PositionManager.sol
Last Updated At 30th Oct, 2024
PositionManager Interface Documentation
State-Changing Functions
cancelClosePosition
function cancelClosePosition(
bytes32 _key,
address payable _executionFeeReceiver) external returns (bool)
Cancels a pending close position request
Returns whether it is successful
cancelOpenPosition
function cancelOpenPosition(
bytes32 _key,
address payable _executionFeeReceiver) external returns (bool)
Cancels a pending open position request
Returns whether it is successful
createClosePosition
function createClosePosition(
uint16 _underlyingAssetIndex,
uint256 _optionTokenId,
uint256 _size,
address[] memory _path,
uint256 _minAmountOut,
uint256 _minOutWhenSwap,
bool _withdrawETH) external payable returns (bytes32)
Creates a request to close an existing option position
Requires execution fee to be paid
Returns request key for tracking
createOpenPosition
function createOpenPosition(
uint16 _underlyingAssetIndex,
uint8 _length,
bool[4] memory _isBuys,
bytes32[4] memory _optionIds,
bool[4] memory _isCalls,
uint256 _minSize,
address[] memory _path,
uint256 _amountIn,
uint256 _minOutWhenSwap,
address _leadTrader) external payable returns (bytes32)
Creates a request to open a new option position using ERC20 tokens
Supports multiple options in a single transaction
Returns request key for tracking
createOpenPositionETH
function createOpenPositionETH(
uint16 _underlyingAssetIndex,
uint8 _length,
bool[4] memory _isBuys,
bytes32[4] memory _optionIds,
bool[4] memory _isCalls,
uint256 _minSize,
address[] memory _path,
uint256 _minOutWhenSwap,
address _leadTrader) external payable returns (bytes32)
Similar to createOpenPosition but accepts ETH as payment
Automatically wraps ETH to WETH
Returns request key for tracking
View Functions
closePositionRequests
function closePositionRequests(bytes32) external view returns
(
address account,
uint16 underlyingAssetIndex,
uint40 expiry,
uint256 optionTokenId,
uint256 size,
uint256 minAmountOut,
uint256 minOutWhenSwap,
bool withdrawETH,
uint40 blockTime,
IPositionManager.RequestStatus status,
uint256 amountOut,
uint256 executionPrice,
uint40 processBlockTime
)
Returns detailed information about a close position request
Includes request status and execution details
getClosePositionRequestPath
function getClosePositionRequestPath(bytes32 _key) external view returns
(address[] memory)
Returns the token swap path for a close position request
Used for routing tokens through DEX
getOpenPositionRequestPath
function getOpenPositionRequestPath(bytes32 _key) external view returns
(address[] memory)
Returns the token swap path for an open position request
Used for routing tokens through DEX
getRequestKey
function getRequestKey(
address _account,
uint256 _index,
bool _isOpenPosition) external pure returns (bytes32)
Returns a unique key for a position request
Used for tracking and identifying requests
getRequestQueueLengths
function getRequestQueueLengths() external view returns (uint256, uint256, uint256)
Returns the current lengths of request queues
Used for monitoring system state
openPositionRequests
function openPositionRequests(bytes32) external view returns
(
address account,
uint16 underlyingAssetIndex,
uint40 expiry,
uint256 optionTokenId,
uint256 minSize,
uint256 amountIn,
uint256 minOutWhenSwap,
bool isDepositedInETH,
uint40 blockTime,
IPositionManager.RequestStatus status,
uint256 sizeOut,
uint256 executionPrice,
uint40 processBlockTime,
uint256 amountOut
)
Returns detailed information about an open position request
Includes request status and execution details
openPositionsIndex
function openPositionsIndex(address) external view returns (uint256)
Returns the current index for open positions of an address
Used for tracking position requests
positionRequestKeys
function positionRequestKeys(uint256) external view returns (bytes32)
Returns the request key at a specific index
Used for iterating through requests
positionRequestTypes
function positionRequestTypes(uint256) external view returns (bool)
Returns whether a request at specific index is an open or close position
True for open positions, false for close positions
Events
CreateOpenPosition
event CreateOpenPosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
bytes32[4] optionIds,
uint40 indexed expiry,
uint256 optionTokenId,
uint256 minSize,
address[] path,
uint256 amountIn,
uint256 minOutWhenSwap,
uint256 index,
uint256 queueIndex,
uint256 gasPrice,
uint40 blockTime
)
Emitted when a new open position request is created
Contains all relevant information about the position request
Includes routing path and pricing information
ExecuteOpenPosition
event ExecuteOpenPosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
uint40 indexed expiry,
uint256 optionTokenId,
uint256 size,
address[] path,
uint256 amountIn,
uint256 executionPrice,
uint40 timeGap
)
Emitted when an open position request is executed
Records the final execution details and pricing
Includes time gap between request and execution
CancelOpenPosition
event CancelOpenPosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
bytes32[4] optionIds,
uint40 indexed expiry,
uint256 optionTokenId,
address[] path,
uint256 amountIn,
uint40 timeGap
)
Emitted when an open position request is cancelled
Records the details of the cancelled request
Includes time gap between request and cancellation
CreateClosePosition
event CreateClosePosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
uint40 indexed expiry,
uint256 optionTokenId,
uint256 size,
address[] path,
uint256 minAmountOut,
uint256 minOutWhenSwap,
uint256 index,
uint256 queueIndex,
uint40 blockTime
)
Emitted when a new close position request is created
Contains all relevant information about the closing request
Includes minimum expected output amounts
ExecuteClosePosition
event ExecuteClosePosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
uint40 indexed expiry,
uint256 optionTokenId,
uint256 size,
address[] path,
uint256 amountOut,
uint256 executionPrice,
uint40 timeGap
)
Emitted when a close position request is executed
Records the final closing details and pricing
Includes actual output amount received
CancelClosePosition
event CancelClosePosition(
address indexed account,
uint16 indexed underlyingAssetIndex,
uint40 indexed expiry,
uint256 optionTokenId,
uint256 size,
address[] path,
uint40 timeGap
)
Emitted when a close position request is cancelled
Records the details of the cancelled closing request
Includes time gap between request and cancellation
ABI
[
{
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "__AuthorityUtil_init__",
"inputs": [
{
"name": "_authority",
"type": "address",
"internalType": "contract IOptionsAuthority"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "__BasePositionManager_init__",
"inputs": [
{
"name": "_optionsMarket",
"type": "address",
"internalType": "address"
},
{
"name": "_controller",
"type": "address",
"internalType": "address"
},
{
"name": "_weth",
"type": "address",
"internalType": "address"
},
{
"name": "_authority",
"type": "address",
"internalType": "contract IOptionsAuthority"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "approve",
"inputs": [
{
"name": "_token",
"type": "address",
"internalType": "address"
},
{
"name": "_spender",
"type": "address",
"internalType": "address"
},
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "authority",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IOptionsAuthority"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "cancelClosePosition",
"inputs": [
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "_executionFeeReceiver",
"type": "address",
"internalType": "address payable"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "cancelOpenPosition",
"inputs": [
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "_executionFeeReceiver",
"type": "address",
"internalType": "address payable"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "closePositionRequests",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "size",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minAmountOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minOutWhenSwap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "withdrawETH",
"type": "bool",
"internalType": "bool"
},
{
"name": "blockTime",
"type": "uint40",
"internalType": "uint40"
},
{
"name": "status",
"type": "uint8",
"internalType": "enum IPositionManager.RequestStatus"
},
{
"name": "amountOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "executionPrice",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "processBlockTime",
"type": "uint40",
"internalType": "uint40"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "closePositionsIndex",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "controller",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "copyTradeFeeRebateRate",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "createClosePosition",
"inputs": [
{
"name": "_underlyingAssetIndex",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "_optionTokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_size",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_path",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "_minAmountOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_minOutWhenSwap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_withdrawETH",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "createOpenPosition",
"inputs": [
{
"name": "_underlyingAssetIndex",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "_length",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "_isBuys",
"type": "bool[4]",
"internalType": "bool[4]"
},
{
"name": "_optionIds",
"type": "bytes32[4]",
"internalType": "bytes32[4]"
},
{
"name": "_isCalls",
"type": "bool[4]",
"internalType": "bool[4]"
},
{
"name": "_minSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_path",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "_amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_minOutWhenSwap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_leadTrader",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "createOpenPositionETH",
"inputs": [
{
"name": "_underlyingAssetIndex",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "_length",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "_isBuys",
"type": "bool[4]",
"internalType": "bool[4]"
},
{
"name": "_optionIds",
"type": "bytes32[4]",
"internalType": "bytes32[4]"
},
{
"name": "_isCalls",
"type": "bool[4]",
"internalType": "bool[4]"
},
{
"name": "_minSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_path",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "_minOutWhenSwap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_leadTrader",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "ethTransferGasLimit",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "executeClosePosition",
"inputs": [
{
"name": "_requestIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "_executionFeeReceiver",
"type": "address",
"internalType": "address payable"
}
],
"outputs": [
{
"name": "isExecuted",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "executeOpenPosition",
"inputs": [
{
"name": "_requestIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "_executionFeeReceiver",
"type": "address",
"internalType": "address payable"
}
],
"outputs": [
{
"name": "isExecuted",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "executePositions",
"inputs": [
{
"name": "_endIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_executionFeeReceiver",
"type": "address",
"internalType": "address payable"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "executionFee",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getClosePositionRequestPath",
"inputs": [
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "address[]",
"internalType": "address[]"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getOpenPositionRequestPath",
"inputs": [
{
"name": "_key",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "address[]",
"internalType": "address[]"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRequestKey",
"inputs": [
{
"name": "_account",
"type": "address",
"internalType": "address"
},
{
"name": "_index",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_isOpenPosition",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "getRequestQueueLengths",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_optionsMarket",
"type": "address",
"internalType": "address"
},
{
"name": "_controller",
"type": "address",
"internalType": "address"
},
{
"name": "_weth",
"type": "address",
"internalType": "address"
},
{
"name": "_authority",
"type": "address",
"internalType": "contract IOptionsAuthority"
},
{
"name": "_executionFee",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "leadTrader",
"inputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "maxTimeDelay",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint40",
"internalType": "uint40"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "onERC1155BatchReceived",
"inputs": [
{
"name": "operator",
"type": "address",
"internalType": "address"
},
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "ids",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "values",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes4",
"internalType": "bytes4"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "onERC1155Received",
"inputs": [
{
"name": "operator",
"type": "address",
"internalType": "address"
},
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "id",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes4",
"internalType": "bytes4"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "openPositionRequests",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minOutWhenSwap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "isDepositedInETH",
"type": "bool",
"internalType": "bool"
},
{
"name": "blockTime",
"type": "uint40",
"internalType": "uint40"
},
{
"name": "status",
"type": "uint8",
"internalType": "enum IPositionManager.RequestStatus"
},
{
"name": "sizeOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "executionPrice",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "processBlockTime",
"type": "uint40",
"internalType": "uint40"
},
{
"name": "amountOut",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "openPositionsIndex",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "optionsMarket",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "positionDeadlineBuffer",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint40",
"internalType": "uint40"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "positionRequestKeys",
"inputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "positionRequestKeysStart",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "positionRequestTypes",
"inputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sendValue",
"inputs": [
{
"name": "_receiver",
"type": "address",
"internalType": "address payable"
},
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setAuthority",
"inputs": [
{
"name": "_newAuthority",
"type": "address",
"internalType": "contract IOptionsAuthority"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setCopyTradeFeeRebateRate",
"inputs": [
{
"name": "_copyTradeFeeRebateRate",
"type": "uint40",
"internalType": "uint40"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setEthTransferGasLimit",
"inputs": [
{
"name": "_ethTransferGasLimit",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setExecutionFee",
"inputs": [
{
"name": "_executionFee",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setMaxTimeDelay",
"inputs": [
{
"name": "_maxTimeDelay",
"type": "uint40",
"internalType": "uint40"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setPositionDeadlineBuffer",
"inputs": [
{
"name": "_positionDeadlineBuffer",
"type": "uint40",
"internalType": "uint40"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "supportsInterface",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"internalType": "bytes4"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "weth",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "AuthorityUpdated",
"inputs": [
{
"name": "authority",
"type": "address",
"indexed": true,
"internalType": "contract IOptionsAuthority"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CancelClosePosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "size",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"name": "timeGap",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CancelErrorMessage",
"inputs": [
{
"name": "errorMessage",
"type": "string",
"indexed": true,
"internalType": "string"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CancelOpenPosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "optionIds",
"type": "bytes32[4]",
"indexed": false,
"internalType": "bytes32[4]"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"name": "amountIn",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "timeGap",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CreateClosePosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "size",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"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": "uint256"
},
{
"name": "blockTime",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "CreateOpenPosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "optionIds",
"type": "bytes32[4]",
"indexed": false,
"internalType": "bytes32[4]"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "minSize",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"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": "uint256"
},
{
"name": "blockTime",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ExecuteClosePosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "size",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"name": "amountOut",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "executionPrice",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "timeGap",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ExecuteErrorMessage",
"inputs": [
{
"name": "errorMessage",
"type": "string",
"indexed": true,
"internalType": "string"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ExecuteOpenPosition",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "underlyingAssetIndex",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "expiry",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
},
{
"name": "optionTokenId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "size",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "path",
"type": "address[]",
"indexed": false,
"internalType": "address[]"
},
{
"name": "amountIn",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "executionPrice",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "timeGap",
"type": "uint40",
"indexed": false,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "GenerateRequestKey",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "key",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "isOpen",
"type": "bool",
"indexed": true,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetCopyTradeFeeRebateRate",
"inputs": [
{
"name": "copyTradeFeeRebateRate",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetEthTransferGasLimit",
"inputs": [
{
"name": "ethTransferGasLimit",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetExecutionFee",
"inputs": [
{
"name": "executionFee",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetMaxTimeDelay",
"inputs": [
{
"name": "maxTimeDelay",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetPositionDeadlineBuffer",
"inputs": [
{
"name": "positionDeadlineBuffer",
"type": "uint40",
"indexed": true,
"internalType": "uint40"
}
],
"anonymous": false
}
]
Last updated