{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/SherClaim.sol",
    "Parent Contracts": [
        "contracts/interfaces/ISherClaim.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract SherClaim is ISherClaim {\n  using SafeERC20 for IERC20;\n\n  // The state switch needs to be executed between BOTTOM and CEILING after deployment\n  uint256 internal constant CLAIM_PERIOD_SANITY_BOTTOM = 7 days;\n  uint256 internal constant CLAIM_PERIOD_SANITY_CEILING = 14 days;\n\n  // Timestamp when SHER can be claimed\n  uint256 public immutable override claimableAt;\n  // SHER token address (18 decimals)\n  IERC20 public immutable sher;\n\n  // Mapping how much each user is able to claim\n  mapping(address => uint256) public userClaims;\n\n  /// @notice Construct claim contract\n  /// @param _sher ERC20 contract for SHER token\n  /// @param _claimableAt Timestamp when SHER tokens will be claimable\n  /// @dev _claimableAt is between BOTTOM and CEILING after deployment\n  constructor(IERC20 _sher, uint256 _claimableAt) {\n    if (address(_sher) == address(0)) revert ZeroArgument();\n    // Verify if _claimableAt has a valid value\n    if (_claimableAt < block.timestamp + CLAIM_PERIOD_SANITY_BOTTOM) revert InvalidState();\n    if (_claimableAt > block.timestamp + CLAIM_PERIOD_SANITY_CEILING) revert InvalidState();\n\n    sher = _sher;\n    claimableAt = _claimableAt;\n  }\n\n  /// @notice Check if SHER tokens can be claimed\n  /// @return True if the claim period is active\n  function active() public view returns (bool) {\n    return block.timestamp >= claimableAt;\n  }\n\n  /// @notice Add `_amount` SHER to the timelock for `_user`\n  /// @param _user The account that is able to claim the SHER\n  /// @param _amount The amount of SHER that is added to the timelock\n  function add(address _user, uint256 _amount) external override {\n    if (_user == address(0)) revert ZeroArgument();\n    if (_amount == 0) revert ZeroArgument();\n    // Only allow new SHER to be added pre claim period\n    if (active()) revert InvalidState();\n\n    // Transfer SHER from caller to this contract\n    sher.safeTransferFrom(msg.sender, address(this), _amount);\n    // Account how much SHER the `_user` is able to claim\n    userClaims[_user] += _amount;\n\n    // Emit event about the new SHER tokens\n    emit Add(msg.sender, _user, _amount);\n  }\n\n  /// @notice Allow caller to claim SHER tokens\n  /// @dev Every account is able to call this once\n  /// @dev Will revert in case the amount is 0\n  /// @dev SHER tokens will be sent to caller\n  function claim() external {\n    // Only allow claim calls if claim period is active\n    if (active() == false) revert InvalidState();\n\n    // How much SHER the user will receive\n    uint256 amount = userClaims[msg.sender];\n    // Dont proceed if it's 0 SHER\n    if (amount == 0) revert InvalidAmount();\n    // If it is not 0, make sure it's 0 next time the user calls this function\n    delete userClaims[msg.sender];\n\n    // Transfer SHER to user\n    sher.safeTransfer(msg.sender, amount);\n\n    // Emit event about the SHER claim\n    emit Claim(msg.sender, amount);\n  }\n}"
}