Skip to main content

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:

    NameTypeDescription
    ctxstruct LpContextThe LpContext containing the current oracle version and synchronization information.
    positionstruct PositionThe Position object representing the position to be claimed.
    pnlint256The profit or loss amount of the position.
    usedKeeperFeeuint256The amount of the keeper fee used.
    recipientaddressThe address of the recipient (EOA or account contract) receiving the settlement.
    databytesAdditional data for the claim position callback.
    causebytes4The 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)