{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/tokens/Vader.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol",
        "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/shared/ProtocolConstants.sol",
        "contracts/interfaces/tokens/IVader.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract Vader is IVader, ProtocolConstants, ERC20, Ownable {\r\n    /* ========== STATE VARIABLES ========== */\r\n\r\n    // The Vader <-> Vether converter contract\r\n    IConverter public converter;\r\n\r\n    // The Vader Team vesting contract\r\n    ILinearVesting public vest;\r\n\r\n    // The USDV contract, used to apply proper access control\r\n    IUSDV public usdv;\r\n\r\n    // The initial maximum supply of the token, equivalent to 25 bn units\r\n    uint256 public maxSupply = _INITIAL_VADER_SUPPLY;\r\n\r\n    /* ========== CONSTRUCTOR ========== */\r\n\r\n    /**\r\n     * @dev Mints the ecosystem growth fund and grant allocation amount described in the whitepaper to the\r\n     * token contract itself.\r\n     *\r\n     * As the token is meant to be minted and burned freely between USDV and itself,\r\n     * there is no real initialization taking place apart from the initially minted\r\n     * supply for the following components:\r\n     *\r\n     * - Grant Allocation: The amount of funds meant to be distributed by the DAO as grants to expand the protocol\r\n     *\r\n     * - Ecosystem Growth: An allocation that is released to strategic partners for the\r\n     * protocol's expansion\r\n     *\r\n     * The latter two of the allocations are minted at a later date given that the addresses of\r\n     * the converter and vesting contract are not known on deployment.\r\n     */\r\n    constructor() ERC20(\"Vader\", \"VADER\") {\r\n        _mint(address(this), _GRANT_ALLOCATION);\r\n        _mint(address(this), _ECOSYSTEM_GROWTH);\r\n    }\r\n\r\n    /* ========== MUTATIVE FUNCTIONS ========== */\r\n\r\n    /**\r\n     * @dev Creates a manual emission event\r\n     *\r\n     * Emits an {Emission} event indicating the amount emitted as well as what the current\r\n     * era's timestamp is.\r\n     */\r\n    function createEmission(address user, uint256 amount)\r\n        external\r\n        override\r\n        onlyOwner\r\n    {\r\n        _transfer(address(this), user, amount);\r\n        emit Emission(user, amount);\r\n    }\r\n\r\n    /* ========== RESTRICTED FUNCTIONS ========== */\r\n\r\n    /**\r\n     * @dev Sets the initial {converter} and {vest} contract addresses. Additionally, mints\r\n     * the Vader amount available for conversion as well as the team allocation that is meant\r\n     * to be vested to each respective contract.\r\n     *\r\n     * Emits a {ProtocolInitialized} event indicating all the supplied values of the function.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be the deployer of the contract\r\n     * - the contract must not have already been initialized\r\n     */\r\n    function setComponents(\r\n        IConverter _converter,\r\n        ILinearVesting _vest,\r\n        address[] calldata vesters,\r\n        uint192[] calldata amounts\r\n    ) external onlyOwner {\r\n        require(\r\n            _converter != IConverter(_ZERO_ADDRESS) &&\r\n                _vest != ILinearVesting(_ZERO_ADDRESS),\r\n            \"Vader::setComponents: Incorrect Arguments\"\r\n        );\r\n        require(\r\n            converter == IConverter(_ZERO_ADDRESS),\r\n            \"Vader::setComponents: Already Set\"\r\n        );\r\n\r\n        converter = _converter;\r\n        vest = _vest;\r\n\r\n        _mint(address(_converter), _VETH_ALLOCATION);\r\n        _mint(address(_vest), _TEAM_ALLOCATION);\r\n\r\n        _vest.begin(vesters, amounts);\r\n\r\n        emit ProtocolInitialized(\r\n            address(_converter),\r\n            address(_vest)\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Set USDV\r\n     * Emits a {USDVSet} event indicating that USDV is set\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be owner\r\n     * - USDV must be of a non-zero address\r\n     * - USDV must not be set\r\n     */\r\n    function setUSDV(IUSDV _usdv) external onlyOwner {\r\n        require(_usdv != IUSDV(_ZERO_ADDRESS), \"Vader::setUSDV: Invalid USDV address\");\r\n        require(usdv == IUSDV(_ZERO_ADDRESS), \"Vader::setUSDV: USDV already set\");\r\n\r\n        usdv = _usdv;\r\n        emit USDVSet(address(_usdv));\r\n    }\r\n\r\n    /**\r\n     * @dev Allows a strategic partnership grant to be claimed.\r\n     *\r\n     * Emits a {GrantClaimed} event indicating the beneficiary of the grant as\r\n     * well as the grant amount.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be the DAO\r\n     * - the token must hold sufficient Vader allocation for the grant\r\n     * - the grant must be of a non-zero amount\r\n     */\r\n    function claimGrant(address beneficiary, uint256 amount) external onlyOwner {\r\n        require(amount != 0, \"Vader::claimGrant: Non-Zero Amount Required\");\r\n        emit GrantClaimed(beneficiary, amount);\r\n        _transfer(address(this), beneficiary, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the maximum supply of the token to be adjusted.\r\n     *\r\n     * Emits an {MaxSupplyChanged} event indicating the previous and next maximum\r\n     * total supplies.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be the DAO\r\n     * - the new maximum supply must be greater than the current supply\r\n     */\r\n    function adjustMaxSupply(uint256 _maxSupply) external onlyOwner {\r\n        require(\r\n            _maxSupply >= totalSupply(),\r\n            \"Vader::adjustMaxSupply: Max supply cannot subcede current supply\"\r\n        );\r\n        emit MaxSupplyChanged(maxSupply, _maxSupply);\r\n        maxSupply = _maxSupply;\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the USDV token to perform mints of VADER tokens\r\n     *\r\n     * Emits an ERC-20 {Transfer} event signaling the minting operation.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be the USDV\r\n     * - the new supply must be below the maximum supply\r\n     */\r\n    function mint(address _user, uint256 _amount) external onlyUSDV {\r\n        require(\r\n            maxSupply >= totalSupply() + _amount,\r\n            \"Vader::mint: Max supply reached\"\r\n        );\r\n        _mint(_user, _amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the USDV token to perform burns of VADER tokens\r\n     *\r\n     * Emits an ERC-20 {Transfer} event signaling the burning operation.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be the USDV\r\n     * - the USDV contract must have a sufficient VADER balance\r\n     */\r\n    function burn(uint256 _amount) external onlyUSDV {\r\n        _burn(msg.sender, _amount);\r\n    }\r\n\r\n    /* ========== INTERNAL FUNCTIONS ========== */\r\n\r\n    /* ========== PRIVATE FUNCTIONS ========== */\r\n\r\n    /**\r\n     * @dev Ensures only the USDV is able to invoke a particular function by validating that the\r\n     * contract has been set up and that the msg.sender is the USDV address\r\n     */\r\n    function _onlyUSDV() private view {\r\n        require(\r\n            address(usdv) == msg.sender,\r\n            \"Vader::_onlyUSDV: Insufficient Privileges\"\r\n        );\r\n    }\r\n\r\n    /* ========== MODIFIERS ========== */\r\n\r\n    /**\r\n     * @dev Throws if invoked by anyone else other than the USDV\r\n     */\r\n    modifier onlyUSDV() {\r\n        _onlyUSDV();\r\n        _;\r\n    }\r\n}"
}