{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/Neuron.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/access/AccessControl.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
        "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "keccak256(bytes)",
        "keccak256(bytes)",
        "keccak256(bytes)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract Neuron is ERC20, AccessControl {\n\n    /*//////////////////////////////////////////////////////////////\n                                EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Event emitted when tokens are claimed.\n    event TokensClaimed(address user, uint256 amount);\n\n    /// @notice Event emitted when tokens are minted.\n    event TokensMinted(address user, uint256 amount);    \n\n    /*//////////////////////////////////////////////////////////////\n                            STATE VARIABLES\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Role for minting tokens.\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n\n    /// @notice Role for spending tokens.\n    bytes32 public constant SPENDER_ROLE = keccak256(\"SPENDER_ROLE\");\n    \n    /// @notice Role for staking tokens.\n    bytes32 public constant STAKER_ROLE = keccak256(\"STAKER_ROLE\");\n\n    /// @notice Initial supply of NRN tokens to be minted to the treasury.\n    uint256 public constant INITIAL_TREASURY_MINT = 10**18 * 10**8 * 2;\n\n    /// @notice Initial supply of NRN tokens to be minted and distributed to contributors.\n    uint256 public constant INITIAL_CONTRIBUTOR_MINT = 10**18 * 10**8 * 5;\n\n    /// @notice Maximum supply of NRN tokens.\n    uint256 public constant MAX_SUPPLY = 10**18 * 10**9;\n\n    /// @notice The address of treasury.\n    address public treasuryAddress;\n\n    /// The address that has owner privileges (initially the contract deployer).\n    address _ownerAddress;\n\n    /*//////////////////////////////////////////////////////////////\n                                MAPPINGS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Mapping of address to admin status.\n    mapping(address => bool) public isAdmin;\n\n    /*//////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Grants roles to the ranked battle contract. \n    /// @notice Mints the initial supply of tokens.\n    /// @param ownerAddress The address of the owner who deploys the contract\n    /// @param treasuryAddress_ The address of the community treasury\n    /// @param contributorAddress The address that will distribute NRNs to early contributors when \n    /// the initial supply is minted.\n    constructor(address ownerAddress, address treasuryAddress_, address contributorAddress)\n        ERC20(\"Neuron\", \"NRN\")\n    {\n        _ownerAddress = ownerAddress;\n        treasuryAddress = treasuryAddress_;\n        isAdmin[_ownerAddress] = true;\n        _mint(treasuryAddress, INITIAL_TREASURY_MINT);\n        _mint(contributorAddress, INITIAL_CONTRIBUTOR_MINT);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            EXTERNAL FUNCTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Transfers ownership from one address to another.\n    /// @dev Only the owner address is authorized to call this function.\n    /// @param newOwnerAddress The address of the new owner\n    function transferOwnership(address newOwnerAddress) external {\n        require(msg.sender == _ownerAddress);\n        _ownerAddress = newOwnerAddress;\n    }\n\n    /// @notice Adds a new address to the minter role.\n    /// @dev Only the owner address is authorized to call this function.\n    /// @param newMinterAddress The address to be added as a minter\n    function addMinter(address newMinterAddress) external {\n        require(msg.sender == _ownerAddress);\n        _setupRole(MINTER_ROLE, newMinterAddress);\n    }\n\n    /// @notice Adds a new address to the staker role.\n    /// @dev Only the owner address is authorized to call this function.\n    /// @param newStakerAddress The address to be added as a staker\n    function addStaker(address newStakerAddress) external {\n        require(msg.sender == _ownerAddress);\n        _setupRole(STAKER_ROLE, newStakerAddress);\n    }\n\n    /// @notice Adds a new address to the spender role.\n    /// @dev Only the owner address is authorized to call this function.\n    /// @param newSpenderAddress The address to be added as a spender\n    function addSpender(address newSpenderAddress) external {\n        require(msg.sender == _ownerAddress);\n        _setupRole(SPENDER_ROLE, newSpenderAddress);\n    }\n\n    /// @notice Adjusts admin access for a user.\n    /// @dev Only the owner address is authorized to call this function.\n    /// @param adminAddress The address of the admin.\n    /// @param access Whether the address has admin access or not.\n    function adjustAdminAccess(address adminAddress, bool access) external {\n        require(msg.sender == _ownerAddress);\n        isAdmin[adminAddress] = access;\n    }  \n\n    /// @notice Sets up the allowance from the treasury address to transfer to each recipient address.\n    /// @dev Only admins are authorized to call this function.\n    /// @param recipients The array of recipient addresses\n    /// @param amounts The array of corresponding amounts for each recipient\n    function setupAirdrop(address[] calldata recipients, uint256[] calldata amounts) external {\n        require(isAdmin[msg.sender]);\n        require(recipients.length == amounts.length);\n        uint256 recipientsLength = recipients.length;\n        for (uint32 i = 0; i < recipientsLength; i++) {\n            _approve(treasuryAddress, recipients[i], amounts[i]);\n        }\n    }\n\n    /// @notice Claims the specified amount of tokens from the treasury address to the caller's address.\n    /// @param amount The amount to be claimed\n    function claim(uint256 amount) external {\n        require(\n            allowance(treasuryAddress, msg.sender) >= amount, \n            \"ERC20: claim amount exceeds allowance\"\n        );\n        transferFrom(treasuryAddress, msg.sender, amount);\n        emit TokensClaimed(msg.sender, amount);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            PUBLIC FUNCTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Mints the specified amount of tokens to the given address.\n    /// @dev The caller must have the minter role.\n    /// @param to The address to which the tokens will be minted.\n    /// @param amount The amount of tokens to be minted.\n    function mint(address to, uint256 amount) public virtual {\n        require(totalSupply() + amount < MAX_SUPPLY, \"Trying to mint more than the max supply\");\n        require(hasRole(MINTER_ROLE, msg.sender), \"ERC20: must have minter role to mint\");\n        _mint(to, amount);\n    }\n\n    /// @notice Burns the specified amount of tokens from the caller's address.\n    /// @param amount The amount of tokens to be burned.\n    function burn(uint256 amount) public virtual {\n        _burn(msg.sender, amount);\n    }\n\n    /// @notice Approves the specified amount of tokens for the spender address.\n    /// @dev The caller must have the spender role.\n    /// @param account The account for which to approve the allowance.\n    /// @param amount The amount of tokens to be approved.\n    function approveSpender(address account, uint256 amount) public {\n        require(\n            hasRole(SPENDER_ROLE, msg.sender), \n            \"ERC20: must have spender role to approve spending\"\n        );\n        _approve(account, msg.sender, amount);\n    }\n\n    /// @notice Approves the specified amount of tokens for the staker address.\n    /// @dev The caller must have the staker role.\n    /// @param owner The owner of the tokens.\n    /// @param spender The address for which to approve the allowance.\n    /// @param amount The amount of tokens to be approved.\n    function approveStaker(address owner, address spender, uint256 amount) public {\n        require(\n            hasRole(STAKER_ROLE, msg.sender), \n            \"ERC20: must have staker role to approve staking\"\n        );\n        _approve(owner, spender, amount);\n    }\n\n    /// @notice Burns the specified amount of tokens from the account address.\n    /// The caller must have an allowance greater than or equal to the amount.\n    /// @param account The account from which to burn the tokens\n    /// @param amount The amount of tokens to be burned\n    function burnFrom(address account, uint256 amount) public virtual {\n        require(\n            allowance(account, msg.sender) >= amount, \n            \"ERC20: burn amount exceeds allowance\"\n        );\n        uint256 decreasedAllowance = allowance(account, msg.sender) - amount;\n        _burn(account, amount);\n        _approve(account, msg.sender, decreasedAllowance);\n    }\n \n}"
}