MarketTradeFacetBase.sol
MarketTradeFacetBase
CLAIM_POSITION_CALLBACK_GASLIMIT
uint32 CLAIM_POSITION_CALLBACK_GASLIMIT
_claimPosition
function _claimPosition(struct LpContext ctx, struct Position position, int256 pnl, uint256 usedKeeperFee, address recipient, bytes data, bytes4 cause) internal returns (uint256 interest)
Internal function for claiming a position.
Parameters:
Name Type Description ctx struct LpContext The LpContext containing the current oracle version and synchronization information. position struct Position The Position object representing the position to be claimed. pnl int256 The profit or loss amount of the position. usedKeeperFee uint256 The amount of the keeper fee used. recipient address The address of the recipient (EOA or account contract) receiving the settlement. data bytes Additional data for the claim position callback. cause bytes4 The description of being claimed.
_callClaimPositionCallback
function _callClaimPositionCallback(struct LpContext ctx, struct Position position, int256 realizedPnl, uint256 interest, bytes data, bytes4 cause) internal
_getPosition
function _getPosition(struct PositionStorage ps, uint256 positionId) internal view returns (struct Position position)