{
    "Function": "slitherConstructorVariables",
    "File": "contracts/RocketJoeFactory.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/IRocketJoeFactory.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract RocketJoeFactory is IRocketJoeFactory, Ownable {\n    address public override penaltyCollector;\n    address public override eventImplementation;\n\n    address public override rJoe;\n    uint256 public override rJoePerAvax;\n    address public override wavax;\n    address public override router;\n    address public override factory;\n\n    uint256 public override PHASE_ONE_DURATION = 2 days;\n    uint256 public override PHASE_ONE_NO_FEE_DURATION = 1 days;\n    uint256 public override PHASE_TWO_DURATION = 1 days;\n\n    mapping(address => address) public override getRJLaunchEvent;\n    mapping(address => bool) public override isRJLaunchEvent;\n    address[] public override allRJLaunchEvents;\n\n    /// @notice Creates the launch event factory\n    /// @dev Uses clone factory pattern to save space\n    /// @param _eventImplementation Implementation of launch event contract\n    /// @param _rJoe rJOE token address\n    /// @param _wavax WAVAX token address\n    /// @param _penaltyCollector Address that collects all withdrawal penalties\n    /// @param _router Router used to create LP on Trader Joe AMM\n    /// @param _factory Factory used to get info of JoePairs\n    constructor(\n        address _eventImplementation,\n        address _rJoe,\n        address _wavax,\n        address _penaltyCollector,\n        address _router,\n        address _factory\n    ) {\n        require(\n            _eventImplementation != address(0) &&\n                _rJoe != address(0) &&\n                _wavax != address(0) &&\n                _penaltyCollector != address(0) &&\n                _router != address(0) &&\n                _factory != address(0),\n            \"RJFactory: Addresses can't be null address\"\n        );\n        IRocketJoeToken(_rJoe).initialize();\n\n        eventImplementation = _eventImplementation;\n        rJoe = _rJoe;\n\n        wavax = _wavax;\n        penaltyCollector = _penaltyCollector;\n        router = _router;\n        factory = _factory;\n        rJoePerAvax = 100;\n    }\n\n    /// @notice Returns the number of launch events\n    /// @return The number of launch events ever created\n    function numLaunchEvents() external view override returns (uint256) {\n        return allRJLaunchEvents.length;\n    }\n\n    /// @notice Creates a launch event contract\n    /// @param _issuer Address of the project issuing tokens for auction\n    /// @param _phaseOneStartTime Timestamp of when launch event will start\n    /// @param _token Token that will be issued through this launch event\n    /// @param _tokenAmount Amount of tokens that will be issued\n    /// @param _tokenIncentivesPercent Additional tokens that will be given as\n    /// incentive for locking up LPs during phase 3 expressed as a percentage\n    /// of the issuing tokens for sale, scaled to 1e18\n    /// @param _floorPrice Price of each token in AVAX, scaled to 1e18\n    /// @param _maxWithdrawPenalty Maximum withdrawal penalty that can be met\n    /// during phase 1\n    /// @param _fixedWithdrawPenalty Withdrawal penalty during phase 2\n    /// @param _maxAllocation Maximum number of AVAX each participant can commit\n    /// @param _userTimelock Amount of time users' LPs will be locked for\n    /// during phase 3\n    /// @param _issuerTimelock Amount of time issuer's LP will be locked for\n    /// during phase 3\n    /// @return Address of launch event contract\n    function createRJLaunchEvent(\n        address _issuer,\n        uint256 _phaseOneStartTime,\n        address _token,\n        uint256 _tokenAmount,\n        uint256 _tokenIncentivesPercent,\n        uint256 _floorPrice,\n        uint256 _maxWithdrawPenalty,\n        uint256 _fixedWithdrawPenalty,\n        uint256 _maxAllocation,\n        uint256 _userTimelock,\n        uint256 _issuerTimelock\n    ) external override returns (address) {\n        require(\n            getRJLaunchEvent[_token] == address(0),\n            \"RJFactory: token has already been issued\"\n        );\n        require(_issuer != address(0), \"RJFactory: issuer can't be 0 address\");\n        require(_token != address(0), \"RJFactory: token can't be 0 address\");\n        require(_token != wavax, \"RJFactory: token can't be wavax\");\n        require(\n            _tokenAmount > 0,\n            \"RJFactory: token amount needs to be greater than 0\"\n        );\n        require(\n            IJoeFactory(factory).getPair(_token, wavax) == address(0) ||\n                IJoePair(IJoeFactory(factory).getPair(_token, wavax))\n                    .totalSupply() ==\n                0,\n            \"RJFactory: liquid pair already exists\"\n        );\n\n        address launchEvent = Clones.clone(eventImplementation);\n\n        // msg.sender needs to approve RocketJoeFactory\n        IERC20(_token).transferFrom(msg.sender, launchEvent, _tokenAmount);\n\n        ILaunchEvent(payable(launchEvent)).initialize(\n            _issuer,\n            _phaseOneStartTime,\n            _token,\n            _tokenIncentivesPercent,\n            _floorPrice,\n            _maxWithdrawPenalty,\n            _fixedWithdrawPenalty,\n            _maxAllocation,\n            _userTimelock,\n            _issuerTimelock\n        );\n\n        getRJLaunchEvent[_token] = launchEvent;\n        isRJLaunchEvent[launchEvent] = true;\n        allRJLaunchEvents.push(launchEvent);\n\n        _emitLaunchedEvent(_issuer, _token, _phaseOneStartTime);\n\n        return launchEvent;\n    }\n\n    /// @notice Set rJOE address\n    /// @param _rJoe New rJOE address\n    function setRJoe(address _rJoe) external override onlyOwner {\n        IRocketJoeToken(_rJoe).initialize();\n        rJoe = _rJoe;\n        emit SetRJoe(_rJoe);\n    }\n\n    /// @notice Set address to collect withdrawal penalties\n    /// @param _penaltyCollector New penalty collector address\n    function setPenaltyCollector(address _penaltyCollector)\n        external\n        override\n        onlyOwner\n    {\n        penaltyCollector = _penaltyCollector;\n        emit SetPenaltyCollector(_penaltyCollector);\n    }\n\n    /// @notice Set JoeRouter address\n    /// @param _router New router address\n    function setRouter(address _router) external override onlyOwner {\n        router = _router;\n        emit SetRouter(_router);\n    }\n\n    /// @notice Set JoeFactory address\n    /// @param _factory New factory address\n    function setFactory(address _factory) external override onlyOwner {\n        factory = _factory;\n        emit SetFactory(_factory);\n    }\n\n    /// @notice Set amount of rJOE required to deposit 1 AVAX into launch event\n    /// @dev Configured by team between launch events to control inflation\n    function setRJoePerAvax(uint256 _rJoePerAvax) external override onlyOwner {\n        rJoePerAvax = _rJoePerAvax;\n        emit SetRJoePerAvax(_rJoePerAvax);\n    }\n\n    /// @notice Set duration of each of the three phases\n    /// @param _phaseNumber Can be only 1 or 2\n    /// @param _duration Duration of phase in seconds\n    function setPhaseDuration(uint256 _phaseNumber, uint256 _duration)\n        external\n        override\n        onlyOwner\n    {\n        if (_phaseNumber == 1) {\n            require(\n                _duration > PHASE_ONE_NO_FEE_DURATION,\n                \"RJFactory: phase one duration lower than no fee duration\"\n            );\n            PHASE_ONE_DURATION = _duration;\n        } else if (_phaseNumber == 2) {\n            PHASE_TWO_DURATION = _duration;\n        }\n    }\n\n    /// @notice Set the no fee duration of phase 1\n    /// @param _noFeeDuration Duration of no fee phase\n    function setPhaseOneNoFeeDuration(uint256 _noFeeDuration)\n        external\n        override\n        onlyOwner\n    {\n        require(\n            _noFeeDuration < PHASE_ONE_DURATION,\n            \"RJFactory: no fee duration bigger than phase one duration\"\n        );\n        PHASE_ONE_NO_FEE_DURATION = _noFeeDuration;\n    }\n\n    /// @dev This function emits an event after a new launch event has been created\n    /// It is only seperated out due to `createRJLaunchEvent` having too many local variables\n    function _emitLaunchedEvent(\n        address _issuer,\n        address _token,\n        uint256 _phaseOneStartTime\n    ) internal {\n        uint256 _phaseTwoStartTime = _phaseOneStartTime + PHASE_ONE_DURATION;\n        uint256 _phaseThreeStartTime = _phaseTwoStartTime + PHASE_TWO_DURATION;\n\n        emit RJLaunchEventCreated(\n            _issuer,\n            _token,\n            _phaseOneStartTime,\n            _phaseTwoStartTime,\n            _phaseThreeStartTime,\n            rJoe,\n            rJoePerAvax\n        );\n    }\n}"
}