{
    "Function": "mint",
    "File": "contracts/VeTokenMinter.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [
        "EnumerableSet",
        "SafeMath",
        "SafeMath",
        "SafeERC20",
        "SafeMath",
        "SafeMath",
        "SafeMath"
    ],
    "Internal Calls": [
        "_msgSender",
        "require(bool,string)"
    ],
    "Library Calls": [
        "mul",
        "div",
        "sub",
        "sub",
        "div",
        "safeTransfer",
        "contains"
    ],
    "Low-Level Calls": [],
    "Code": "function mint(address _to, uint256 _amount) external {\n        require(operators.contains(_msgSender()), \"not an operator\");\n\n        uint256 supply = totalSupply;\n\n        //use current supply to gauge cliff\n        //this will cause a bit of overflow into the next cliff range\n        //but should be within reasonable levels.\n        //requires a max supply check though\n        uint256 cliff = supply.div(reductionPerCliff);\n        //mint if below total cliffs\n        if (cliff < totalCliffs) {\n            //for reduction% take inverse of current cliff\n            uint256 reduction = totalCliffs.sub(cliff);\n            //reduce\n            _amount = _amount.mul(reduction).div(totalCliffs);\n\n            //supply cap check\n            uint256 amtTillMax = maxSupply.sub(supply);\n            if (_amount > amtTillMax) {\n                _amount = amtTillMax;\n            }\n\n            //mint\n            veToken.safeTransfer(_to, _amount);\n            totalSupply += _amount;\n        }\n    }"
}