{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/mcag-contracts/MCAGAggregator.sol",
    "Parent Contracts": [
        "src/mcag-contracts/interfaces/MCAGAggregatorInterface.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract MCAGAggregator is MCAGAggregatorInterface {\n    uint8 private constant _VERSION = 1;\n    uint8 private constant _DECIMALS = 27;\n\n    IAccessControl public immutable accessController;\n\n    uint80 private _roundId;\n    string private _description;\n    int256 private _answer;\n    int256 private _maxAnswer;\n    uint256 private _updatedAt;\n\n    modifier onlyRole(bytes32 role) {\n        if (!accessController.hasRole(role, msg.sender)) {\n            revert Errors.ACCESS_CONTROL_ACCOUNT_IS_MISSING_ROLE(msg.sender, role);\n        }\n        _;\n    }\n\n    /**\n     * @param description_ Description of the oracle - for example \"10 YEAR US TREASURY\".\n     * @param maxAnswer_ Maximum sensible answer the contract should accept.\n     * @param _accessController MCAG AccessController.\n     */\n    constructor(string memory description_, int256 maxAnswer_, IAccessControl _accessController) {\n        if (address(_accessController) == address(0)) {\n            revert Errors.CANNOT_SET_TO_ADDRESS_ZERO();\n        }\n        _description = description_;\n        _maxAnswer = maxAnswer_;\n        accessController = _accessController;\n\n        emit AccessControllerSet(address(_accessController));\n        emit MaxAnswerSet(0, maxAnswer_);\n    }\n\n    /**\n     * @notice Transmits a new price to the aggreator and updates the answer, round id and updated at.\n     * @dev Can only be called by a registered transmitter.\n     * @param answer New central bank rate as a per second cumualtive rate in 27 decimals.\n     * For example a 5% annual linear rate would be converted to a per second cumulative rate as follow :\n     * (1 + 5%)^(1 / 31536000) * 1e27 = 100000000578137865680459171\n     */\n    function transmit(int256 answer) external override onlyRole(Roles.MCAG_TRANSMITTER_ROLE) {\n        if (answer > _maxAnswer) {\n            revert Errors.TRANSMITTED_ANSWER_TOO_HIGH(answer, _maxAnswer);\n        }\n\n        ++_roundId;\n        _updatedAt = block.timestamp;\n        _answer = answer;\n\n        emit AnswerTransmitted(msg.sender, _roundId, answer);\n    }\n\n    /**\n     * @notice Sets a new max answer.\n     * @dev Can only be called by MCAG Manager.\n     * @param newMaxAnswer New maximum sensible answer the contract should accept.\n     */\n    function setMaxAnswer(int256 newMaxAnswer) external onlyRole(Roles.MCAG_MANAGER_ROLE) {\n        emit MaxAnswerSet(_maxAnswer, newMaxAnswer);\n        _maxAnswer = newMaxAnswer;\n    }\n\n    /**\n     * @notice Returns round data per the Chainlink format.\n     * @return roundId Latest _roundId.\n     * @return answer Latest answer transmitted.\n     * @return startedAt Unused variable here only to follow Chainlink format.\n     * @return updatedAt Timestamp of the last transmitted answer.\n     * @return answeredInRound Latest _roundId.\n     */\n    function latestRoundData()\n        external\n        view\n        override\n        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)\n    {\n        roundId = _roundId;\n        answer = _answer;\n        updatedAt = _updatedAt;\n        answeredInRound = _roundId;\n    }\n\n    /**\n     * @return Description of the oracle - for example \"10 YEAR US TREASURY\".\n     */\n    function description() external view override returns (string memory) {\n        return _description;\n    }\n\n    /**\n     * @return Maximum sensible answer the contract should accept.\n     */\n    function maxAnswer() external view override returns (int256) {\n        return _maxAnswer;\n    }\n\n    /**\n     * @return Number of decimals used to get its user representation.\n     */\n    function decimals() external pure override returns (uint8) {\n        return _DECIMALS;\n    }\n\n    /**\n     * @return Contract version.\n     */\n    function version() external pure override returns (uint8) {\n        return _VERSION;\n    }\n}"
}