{
    "Function": "pendingLockOf",
    "File": "contracts/VE3DLocker.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "BoringMath",
        "BoringMath",
        "BoringMath"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "div",
        "sub",
        "mul"
    ],
    "Low-Level Calls": [],
    "Code": "function pendingLockOf(address _user) external view returns (uint256 amount) {\n        LockedBalance[] storage locks = userLocks[_user];\n\n        uint256 locksLength = locks.length;\n\n        //return amount if latest lock is in the future\n        uint256 currentEpoch = block.timestamp.div(rewardsDuration).mul(rewardsDuration);\n        if (\n            locksLength > 0 &&\n            uint256(locks[locksLength - 1].unlockTime).sub(lockDuration) > currentEpoch\n        ) {\n            return locks[locksLength - 1].amount;\n        }\n\n        return 0;\n    }"
}