creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/migration/OPNMigration.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\nimport {IERC20} from \"erc20/interfaces/IERC20.sol\";\nimport \"@solmate/src/auth/Owned.sol\";\nimport \"./interfaces/IMigrationLockedRevenueDistributionToken.sol\";\nimport \"./interfaces/IGETToken.sol\";\nimport \"./interfaces/IOPNToken.sol\";\nimport \"./interfaces/IOPNMintManager.sol\";\nimport \"./interfaces/IOPNMigration.sol\";\n\ncontract OPNMigration is IOPNMigration, Owned {\n    // GET -> OPN ratio (1:1000) - 1 GET = 1000 OPN\n    uint256 public constant GET_TO_OPN_RATIO = 1e3;\n\n    // amount of time the migration is available for after the start of the migration\n    uint256 public constant MIGRATION_AVAILABLE_UNTIL = 600 days;\n\n    // chain id\n    uint256 public immutable chainId;\n\n    // OPN token address\n    IOPNToken public openToken;\n\n    // OPN mint manager address\n    IOPNMintManager public opnMintManager;\n\n    // xOPN token address\n    IMigrationLockedRevenueDistributionToken public xOpenToken;\n\n    // GET token address\n    IGETToken public immutable liquidGETToken;\n\n    // xGET token address\n    IMigrationLockedRevenueDistributionToken public immutable stakedGETToken;\n\n    address public immutable migrationDestinationAddress;\n\n    // Storage variables for migration statistics\n\n    // total amount of liquid GET migrated\n    uint256 public totalLiquidGETMigrated;\n\n    // total amount of  XGET migrated to XOPN, note xget isn't migrated, the xget is redeemed and then this GET is migrated (and restaked to XOPN)\n    uint256 public totalXGETRedeemed;\n\n    // total amount of GET that was migrated to OPN that was migrated with XGET as input\n    uint256 public totalGETMigratedByXGETMigration;\n\n    // total amount of OPN that was staked due to a fee charged on liquid GET migration\n    uint256 public totalOPNStakedByGETMigration;\n\n    // total amount of OPN that was minted by all migrations\n    uint256 public totalOPNMintedByAllMigration;\n\n    // if the migration is enabled\n    bool public isMigrationActive = false;\n\n    // Internal contract config and state\n\n    uint256 private locked = 1; // Used in reentrancy check.\n\n    // stake rate configurations\n\n    // duration of the migration fee, after which the stake rate is 0\n    uint256 public durationOfStakeMigrationPeriod;\n\n    // epoch time when the migration starts\n    uint256 public startOfMigration;\n\n    // epoch time when the migration is not possible anymore\n    uint256 public endOfMigration;\n\n    // initial stake rate at the start of the migration\n    uint256 public stakeRateInitial; // so 5 * 1e17 = 50% (SCALED: 1e18)\n\n    // Constructor\n\n    constructor(\n        address _initialOwner,\n        address _liquidGETAddress,\n        address _stakedGETAddress,\n        uint256 _startOfMigration,\n        uint256 _startStakeRate,\n        uint256 _durationOfStakeMigrationPeriod,\n        address _bridgeMigrationAddress,\n        uint256 _chainId\n    ) Owned(_initialOwner) {\n        liquidGETToken = IGETToken(_liquidGETAddress);\n        stakedGETToken = IMigrationLockedRevenueDistributionToken(\n            _stakedGETAddress\n        );\n\n        require(\n            _startOfMigration > block.timestamp,\n            \"OPNMigration: Start of migration must be in the future\"\n        );\n\n        startOfMigration = _startOfMigration;\n        endOfMigration = _startOfMigration + MIGRATION_AVAILABLE_UNTIL;\n        stakeRateInitial = _startStakeRate;\n\n        require(\n            MIGRATION_AVAILABLE_UNTIL > _durationOfStakeMigrationPeriod,\n            \"OPNMigration: Duration of stake migration period must be less than the total migration period\"\n        );\n\n        durationOfStakeMigrationPeriod = _durationOfStakeMigrationPeriod;\n\n        migrationDestinationAddress = _bridgeMigrationAddress;\n        chainId = _chainId;\n    }\n\n    // Modifier functions\n\n    modifier nonReentrant() {\n        require(locked == 1, \"OPNMigration: Reentrant call\");\n        locked = 2;\n        _;\n        locked = 1;\n    }\n\n    // Operational functions\n\n    /// @inheritdoc IOPNMigration\n    function migrateDualTokens(\n        uint256 _amountGET,\n        uint256 _amountXGET\n    )\n        external\n        override\n        nonReentrant\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        )\n    {\n        // Ensure migration is currently active before proceeding.\n        require(_isMigrationActive(), \"OPNMigration: Migration not active\");\n\n        // if both amounts are 0 then revert because there is no point\n        require(\n            _amountGET > 0 || _amountXGET > 0,\n            \"OPNMigration: Both amounts are 0\"\n        );\n\n        // Handle GET token migration.\n        if (_amountGET > 0) {\n            (\n                amountOPNToUserForGETMigration_,\n                amountOPNStakedForGETMigration_,\n                amountXOPNToUserForGETMigration_\n            ) = _migrateLiquidGETTokens(_amountGET);\n        }\n\n        // Handle XGET token migration.\n        if (_amountXGET > 0) {\n            (\n                amountXOPNToUserForXGETMigration_,\n                amountGETRedeemedByXGET_\n            ) = _migrateStakedXGETTokens(_amountXGET);\n        }\n\n        // Emit an event to log the completion of the migration process for tracking and transparency.\n\n        emit OPNMigrationComplete(\n            msg.sender,\n            _amountGET,\n            _amountXGET,\n            amountOPNToUserForGETMigration_,\n            amountXOPNToUserForGETMigration_,\n            amountXOPNToUserForXGETMigration_,\n            amountOPNStakedForGETMigration_,\n            amountGETRedeemedByXGET_,\n            amountGETRedeemedByXGET_ * GET_TO_OPN_RATIO\n        );\n\n        return (\n            amountOPNToUserForGETMigration_,\n            amountXOPNToUserForXGETMigration_,\n            amountOPNStakedForGETMigration_,\n            amountXOPNToUserForGETMigration_,\n            amountGETRedeemedByXGET_\n        );\n    }\n\n    // Internal functions\n\n    function _burn(uint256 _amount) internal {\n        if (chainId == 1) {\n            liquidGETToken.burn(_amount);\n        } else {\n            // transfer tokens to the migration destination address - note on polygon we do not burn tokens as the tokens on Polygon are issued by the bridge\n            require(\n                liquidGETToken.transfer(migrationDestinationAddress, _amount),\n                \"OPNMigration: GET transfer to migration destination failed\"\n            );\n        }\n    }\n\n    function _migrateLiquidGETTokens(\n        uint256 _amountGET\n    )\n        internal\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_\n        )\n    {\n        _migratorCheckGET(_amountGET); // Check for GET token balance and approval, then transfer tokens to thi contract and stake them (on ethereum)\n\n        totalLiquidGETMigrated += _amountGET; // Update the total migrated GET counter.\n\n        // Calculate the amount of OPN to mint based on the GET to OPN ratio.\n        uint256 amountOPNToMintGET_ = _amountGET * GET_TO_OPN_RATIO;\n\n        totalOPNMintedByAllMigration += amountOPNToMintGET_; // Update the total OPN minted counter.\n\n        uint256 stakeRate_ = _returnCurrentStakeRate(block.timestamp);\n\n        if (stakeRate_ == 0) {\n            amountOPNToUserForGETMigration_ = amountOPNToMintGET_;\n            amountXOPNToUserForGETMigration_ = 0;\n            amountOPNStakedForGETMigration_ = 0;\n        } else {\n            // Calculate the amount of OPN to stake based on the current stake rate.\n            amountOPNStakedForGETMigration_ =\n                (amountOPNToMintGET_ * stakeRate_) /\n                1e18;\n\n            amountOPNToUserForGETMigration_ =\n                amountOPNToMintGET_ -\n                amountOPNStakedForGETMigration_; // Calculate the net OPN to allocate to the user.\n\n            totalOPNStakedByGETMigration += amountOPNStakedForGETMigration_; // Update the total OPN staked counter\n\n            // Mint and then stake the calculated OPN amount for transparency and tracking on platforms.\n            opnMintManager.issueTokensMigration(\n                address(this),\n                amountOPNStakedForGETMigration_\n            );\n\n            // Approve the xOPN contract to spend the OPN tokens to be staked.\n            openToken.approve(\n                address(xOpenToken),\n                amountOPNStakedForGETMigration_\n            );\n\n            // Stake the OPN tokens in the xOPN contract, allocating XOPN tokens to the user.\n            amountXOPNToUserForGETMigration_ = xOpenToken.deposit(\n                amountOPNStakedForGETMigration_,\n                msg.sender\n            );\n        }\n\n        // Mint OPN tokens for the user. Separate transaction for cleaner look and tracking.\n        opnMintManager.issueTokensMigration(\n            msg.sender,\n            amountOPNToUserForGETMigration_\n        );\n\n        return (\n            amountOPNToUserForGETMigration_,\n            amountOPNStakedForGETMigration_,\n            amountXOPNToUserForGETMigration_\n        );\n    }\n\n    /**\n     * @dev Migrates staked XGET tokens to OPN tokens and allocates XOPN tokens to the user.\n     * This function handles the entire migration process for staked XGET tokens. It checks the user's XGET token balance and approval,\n     * redeems XGET for GET tokens (which are then burned), mints OPN tokens based on the redeemed GET tokens, and finally,\n     * stakes a portion of OPN tokens to allocate XOPN tokens to the user.\n     * @param _amountXGET The amount of XGET tokens to be migrated.\n     * @return amountXOPNToUserForXGETMigration_ The amount of XOPN tokens allocated to the user as a result of the migration.\n     * @return amountGETRedeemedByXGET_ The amount of GET tokens redeemed from the XGET tokens.\n     */\n    function _migrateStakedXGETTokens(\n        uint256 _amountXGET\n    )\n        internal\n        returns (\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        )\n    {\n        // Check for XGET token balance and approval, then transfer, redeem for GET (the GET will be burned on Ethereum).\n        amountGETRedeemedByXGET_ = _migratorCheckXGET(_amountXGET);\n\n        // Update the total XGET redeemed counter.\n        totalXGETRedeemed += _amountXGET;\n\n        // Update the total GET migrated via XGET counter.\n        totalGETMigratedByXGETMigration += amountGETRedeemedByXGET_;\n\n        // Calculate the amount of OPN to mint for the redeemed GET.\n        uint256 amountOPNToMintXGET_ = amountGETRedeemedByXGET_ *\n            GET_TO_OPN_RATIO;\n\n        // Update the total OPN minted counter.\n        totalOPNMintedByAllMigration += amountOPNToMintXGET_;\n\n        // Mint OPN tokens to this contract for staking.\n        opnMintManager.issueTokensMigration(\n            address(this),\n            amountOPNToMintXGET_\n        );\n\n        // Approve the xOPN contract to spend the OPN tokens to be staked.\n        openToken.approve(address(xOpenToken), amountOPNToMintXGET_);\n\n        // Stake the OPN tokens in the xOPN contract, allocating XOPN tokens to the user.\n        amountXOPNToUserForXGETMigration_ = xOpenToken.deposit(\n            amountOPNToMintXGET_,\n            msg.sender\n        );\n\n        return (amountXOPNToUserForXGETMigration_, amountGETRedeemedByXGET_);\n    }\n\n    /**\n     * @dev Checks the user's balance and approval for GET tokens, transfers them to the contract, and then burns the GET tokens.\n     * This function is a crucial part of the GET to OPN migration process. It ensures that the user has a sufficient balance of GET tokens and has granted the contract\n     * permission to use them. After verifying these conditions, it transfers the specified amount of GET tokens from the user to the contract. Finally, it burns these tokens,\n     * effectively removing them from circulation as part of the migration process.\n     * @param _amountGET The amount of GET tokens the user intends to migrate.\n     */\n    function _migratorCheckGET(uint256 _amountGET) internal {\n        // Ensure the caller has a sufficient balance of GET tokens for the migration.\n        require(\n            liquidGETToken.balanceOf(msg.sender) >= _amountGET,\n            \"OPNMigration: Insufficient GET balance\"\n        );\n\n        // Ensure the contract is authorized to spend the specified amount of GET tokens on behalf of the caller.\n        require(\n            liquidGETToken.allowance(msg.sender, address(this)) >= _amountGET,\n            \"OPNMigration: GET spend not approved\"\n        );\n\n        // Transfer the specified amount of GET tokens from the caller to this contract.\n        // This step is necessary before the tokens can be burned.\n        require(\n            liquidGETToken.transferFrom(msg.sender, address(this), _amountGET),\n            \"OPNMigration: GET transfer failed\"\n        );\n\n        // Burn the transferred GET tokens as part of the migration process.\n        // This action permanently removes the tokens from circulation, marking their migration to OPN tokens.\n        _burn(_amountGET);\n    }\n\n    /**\n     * @dev Checks the user's balance and approval for XGET tokens, transfers them to the contract, redeems them for GET tokens, and then burns the GET tokens.\n     * This function is a critical part of the XGET to OPN migration process. It ensures that the user has enough XGET tokens and has granted the contract\n     * permission to use them. It then redeems these XGET tokens for GET tokens. The redeemed GET tokens are immediately burned as part of the migration process.\n     * @param _amountXGET The amount of XGET tokens the user wants to migrate.\n     * @return amountGETRedeemedByXGET_ The amount of GET tokens redeemed from the XGET tokens. This amount is calculated based on the redemption rate defined in the XGET token contract.\n     */\n    function _migratorCheckXGET(\n        uint256 _amountXGET\n    ) internal returns (uint256 amountGETRedeemedByXGET_) {\n        // Ensure the caller has enough XGET tokens for the migration.\n        require(\n            stakedGETToken.balanceOf(msg.sender) >= _amountXGET,\n            \"OPNMigration: Insufficient XGET balance\"\n        );\n\n        // Ensure the contract is allowed to spend the specified amount of XGET tokens on behalf of the caller.\n        require(\n            stakedGETToken.allowance(msg.sender, address(this)) >= _amountXGET,\n            \"OPNMigration: XGET spend not approved\"\n        );\n\n        // Transfer the specified amount of XGET tokens from the caller to this contract.\n        // This step is necessary to redeem the XGET tokens for GET tokens.\n        require(\n            stakedGETToken.transferFrom(msg.sender, address(this), _amountXGET),\n            \"OPNMigration: XGET transfer failed\"\n        );\n\n        // Redeem the transferred XGET tokens for GET tokens.\n        // The XGET token contract should define the redemption rate and mechanics.\n        amountGETRedeemedByXGET_ = stakedGETToken.redeem(\n            _amountXGET,\n            address(this),\n            address(this)\n        );\n\n        // Burn the redeemed GET tokens as part of the migration process (on Ethereum)\n        // This step permanently removes the GET tokens from circulation, completing their migration to OPN tokens.\n\n        _burn(amountGETRedeemedByXGET_);\n\n        return amountGETRedeemedByXGET_;\n    }\n\n    // Calculates the current stake rate based on the elapsed time since the start of the migration.\n    // The stake rate starts at stakeRateInitial and linearly decreases to 0 over the duration durationOfStakeMigrationPeriod.\n    // After durationOfStakeMigrationPeriod, the stake rate remains at 0.\n    function _returnCurrentStakeRate(\n        uint256 _timestamp\n    ) internal view returns (uint256 stakeRate_) {\n        unchecked {\n            // If the current timestamp is before the migration start time, return the initial stake rate.\n            // This case might not be possible in practice since the migration wouldn't have started yet,\n            // but it's handled here for completeness and to avoid underflow in subtraction below.\n            if (_timestamp < startOfMigration) {\n                // revert(\"OPNMigration: migration not started yet\");\n                return 1e18; // return 100% but inreality should probably revert\n            }\n\n            // If the current timestamp is after the end of the stake migration duration, return 0 as the stake rate.\n            if (\n                _timestamp > startOfMigration + durationOfStakeMigrationPeriod\n            ) {\n                return 0;\n            }\n\n            // Calculate the elapsed time since the start of the migration.\n            uint256 elapsedTime_ = _timestamp - startOfMigration;\n\n            // Calculate the remaining duration of the migration.\n            uint256 remainingDuration_ = durationOfStakeMigrationPeriod -\n                elapsedTime_;\n\n            // Calculate the current stake rate based on the linear decrease over time.\n            // This calculation uses the proportion of the remaining duration to the total duration,\n            // multiplied by the initial stake rate, to find the current rate.\n            stakeRate_ = uint256(\n                (stakeRateInitial * remainingDuration_) /\n                    durationOfStakeMigrationPeriod\n            );\n\n            return stakeRate_;\n        }\n    }\n\n    /**\n     * @dev Calculates the expected returns for migrating liquid GET tokens.\n     * This function provides a preview of the migration results for liquid GET tokens without performing the actual migration.\n     * It calculates the total OPN tokens to be minted from the GET tokens, the portion of OPN tokens to be staked, and the corresponding amount of XOPN tokens to be allocated to the user.\n     * @param _amountGET The amount of GET tokens to be migrated.\n     * @return amountOPNToUserForGETMigration_ The net amount of OPN tokens allocated to the user after staking a portion.\n     * @return amountOPNStakedForGETMigration_ The amount of OPN tokens to be staked.\n     * @return amountXOPNToUserForGETMigration_ The amount of XOPN tokens allocated to the user based on the staked OPN tokens.\n     */\n    function _checkLiquidMigrationReturn(\n        uint256 _amountGET\n    )\n        internal\n        view\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_\n        )\n    {\n        // Calculate the total amount of OPN tokens to mint based on the GET to OPN ratio.\n        uint256 amountOPNToMintGET_ = _amountGET * GET_TO_OPN_RATIO;\n\n        // Calculate the amount of OPN to stake based on the current stake rate.\n        amountOPNStakedForGETMigration_ =\n            (amountOPNToMintGET_ * _returnCurrentStakeRate(block.timestamp)) /\n            1e18;\n\n        // Calculate the net OPN to allocate to the user after subtracting the staked amount.\n        amountOPNToUserForGETMigration_ =\n            amountOPNToMintGET_ -\n            amountOPNStakedForGETMigration_;\n\n        // Calculate the amount of XOPN tokens to be allocated to the user by depositing the staked OPN tokens in the xOPN contract.\n        amountXOPNToUserForGETMigration_ = xOpenToken.previewDeposit(\n            amountOPNStakedForGETMigration_\n        );\n\n        return (\n            amountOPNToUserForGETMigration_,\n            amountOPNStakedForGETMigration_,\n            amountXOPNToUserForGETMigration_\n        );\n    }\n\n    /**\n     * @dev Calculates the expected returns when migrating staked XGET tokens.\n     * This function provides a preview of the migration results for staked XGET tokens without performing the actual migration.\n     * It calculates the amount of GET tokens that would be redeemed from the XGET tokens and the corresponding amount of XOPN tokens that would be allocated to the user.\n     * @param _amountXGET The amount of XGET tokens to be migrated.\n     * @return amountXOPNToUserForXGETMigration_ The amount of XOPN tokens that would be allocated to the user as a result of the migration.\n     * @return amountGETRedeemedByXGET_ The amount of GET tokens redeemed from the XGET tokens.\n     */\n    function _checkStakedXGETMigrateReturns(\n        uint256 _amountXGET\n    )\n        internal\n        view\n        returns (\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        )\n    {\n        // Redeem XGET tokens for GET tokens based on the predefined rate in the stakedGETToken contract.\n        amountGETRedeemedByXGET_ = stakedGETToken.previewRedeem(\n            _amountXGET,\n            address(this)\n        );\n\n        // Calculate the amount of OPN tokens to mint based on the redeemed GET tokens and the GET to OPN ratio.\n        uint256 amountOPNToMintXGET_ = amountGETRedeemedByXGET_ *\n            GET_TO_OPN_RATIO;\n\n        // Calculate the amount of XOPN tokens to be allocated to the user by depositing the minted OPN tokens in the xOPN contract.\n        amountXOPNToUserForXGETMigration_ = xOpenToken.previewDeposit(\n            amountOPNToMintXGET_\n        );\n\n        return (amountXOPNToUserForXGETMigration_, amountGETRedeemedByXGET_);\n    }\n\n    function _isMigrationActive() internal view returns (bool) {\n        // check the timestamp if it is greater than the start of migration, return bool\n        return block.timestamp >= startOfMigration && isMigrationActive;\n    }\n\n    // Configuration functions\n\n    /// @inheritdoc IOPNMigration\n    function setAddressConfig(\n        address _openToken,\n        address _xOpenToken,\n        address _opnMintManager\n    ) external override onlyOwner {\n        openToken = IOPNToken(_openToken);\n        opnMintManager = IOPNMintManager(_opnMintManager);\n        xOpenToken = IMigrationLockedRevenueDistributionToken(_xOpenToken);\n        emit OPNTokenSet(_openToken);\n        emit XOpenTokenSet(_xOpenToken);\n        emit MintManagerSet(_opnMintManager);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function setStartOfMigration(\n        uint256 _startOfMigration\n    ) external override onlyOwner {\n        startOfMigration = _startOfMigration;\n        emit StartOfMigrationSet(_startOfMigration);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function setEndOfMigration(\n        uint256 _endOfMigration\n    ) external override onlyOwner {\n        endOfMigration = _endOfMigration;\n        emit EndOfMigrationSet(_endOfMigration);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function setStakeRateInitial(\n        uint256 _stakeRateInitial\n    ) external override onlyOwner {\n        stakeRateInitial = _stakeRateInitial;\n        emit StakeRateInitialSet(_stakeRateInitial);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function setDurationOfStakeMigrationPeriod(\n        uint256 _durationOfStakeMigrationPeriod\n    ) external override onlyOwner {\n        durationOfStakeMigrationPeriod = _durationOfStakeMigrationPeriod;\n        emit DurationOfStakeMigrationPeriodSet(_durationOfStakeMigrationPeriod);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function setMigrationActive(bool _setting) external override onlyOwner {\n        if (_setting) {\n            // check if the contract is fully configured\n            // check that xOpenToken is not address(0)\n            require(\n                address(xOpenToken) != address(0),\n                \"OPNMigration: xOpenToken not set\"\n            );\n\n            // check that openToken is not address(0)\n            require(\n                address(openToken) != address(0),\n                \"OPNMigration: openToken not set\"\n            );\n\n            // check that opnMintManager is not address(0)\n            require(\n                address(opnMintManager) != address(0),\n                \"OPNMigration: opnMintManager not set\"\n            );\n        }\n\n        isMigrationActive = _setting;\n\n        emit MigrationStatusSet(_setting);\n    }\n\n    // View functions\n\n    /// @inheritdoc IOPNMigration\n    function totalOPNStakedByTheMigration()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return totalOPNStakedByGETMigration;\n    }\n\n    /// @inheritdoc IOPNMigration\n    function totalOPNMinted() external view override returns (uint256) {\n        return totalOPNMintedByAllMigration;\n    }\n\n    /// @inheritdoc IOPNMigration\n    function returnCurrentStakeRate() external view override returns (uint256) {\n        return _returnCurrentStakeRate(block.timestamp);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function returnStakeRateAtTime(\n        uint256 _timestamp\n    ) external view override returns (uint256) {\n        return _returnCurrentStakeRate(_timestamp);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function totalOPNSupply() external view override returns (uint256) {\n        return openToken.totalSupply();\n    }\n\n    /// @inheritdoc IOPNMigration\n    function totalXOPNSupply() external view override returns (uint256) {\n        return xOpenToken.totalSupply();\n    }\n\n    /// @inheritdoc IOPNMigration\n    function totalGETMigratedInTotal()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return totalLiquidGETMigrated + totalGETMigratedByXGETMigration;\n    }\n\n    /// @inheritdoc IOPNMigration\n    function returnTotalAmountGETFromXGETRedemptionMigrated()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return totalGETMigratedByXGETMigration;\n    }\n\n    /// @inheritdoc IOPNMigration\n    function totalXGETRedeemedInTotal()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return totalXGETRedeemed;\n    }\n\n    /// @inheritdoc IOPNMigration\n    function returnMigrateDualTokenOutput(\n        uint256 _amountGET,\n        uint256 _amountXGET\n    )\n        external\n        view\n        override\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        )\n    {\n        if (_amountGET == 0 && _amountXGET == 0) {\n            return (0, 0, 0, 0, 0);\n        }\n\n        // Check returns of GET token migration.\n        if (_amountGET > 0) {\n            (\n                amountOPNToUserForGETMigration_,\n                amountOPNStakedForGETMigration_,\n                amountXOPNToUserForGETMigration_\n            ) = _checkLiquidMigrationReturn(_amountGET);\n        }\n\n        // Handle XGET token migration.\n        if (_amountXGET > 0) {\n            (\n                amountXOPNToUserForXGETMigration_,\n                amountGETRedeemedByXGET_\n            ) = _checkStakedXGETMigrateReturns(_amountXGET);\n        }\n\n        return (\n            amountOPNToUserForGETMigration_,\n            amountXOPNToUserForXGETMigration_,\n            amountOPNStakedForGETMigration_,\n            amountXOPNToUserForGETMigration_,\n            amountGETRedeemedByXGET_\n        );\n    }\n\n    /// @inheritdoc IOPNMigration\n    function previewDeposit(\n        uint256 _assets\n    ) external view override returns (uint256) {\n        return xOpenToken.previewDeposit(_assets);\n    }\n\n    /// @inheritdoc IOPNMigration\n    function previewRedeem(\n        uint256 _shares\n    ) external view override returns (uint256) {\n        return xOpenToken.previewRedeem(_shares, address(this));\n    }\n\n    /// @inheritdoc IOPNMigration\n    function depositRatioOfOPNtoXOPN()\n        external\n        view\n        override\n        returns (uint256)\n    {\n        return xOpenToken.previewDeposit(1e18);\n    }\n}\n"
      },
      "lib/erc20/contracts/interfaces/IERC20.sol": {
        "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.7;\n\n/// @title Interface of the ERC20 standard as defined in the EIP, including EIP-2612 permit functionality.\ninterface IERC20 {\n\n    /**************/\n    /*** Events ***/\n    /**************/\n\n    /**\n     *  @dev   Emitted when one account has set the allowance of another account over their tokens.\n     *  @param owner_   Account that tokens are approved from.\n     *  @param spender_ Account that tokens are approved for.\n     *  @param amount_  Amount of tokens that have been approved.\n     */\n    event Approval(address indexed owner_, address indexed spender_, uint256 amount_);\n\n    /**\n     *  @dev   Emitted when tokens have moved from one account to another.\n     *  @param owner_     Account that tokens have moved from.\n     *  @param recipient_ Account that tokens have moved to.\n     *  @param amount_    Amount of tokens that have been transferred.\n     */\n    event Transfer(address indexed owner_, address indexed recipient_, uint256 amount_);\n\n    /**************************/\n    /*** External Functions ***/\n    /**************************/\n\n    /**\n     *  @dev    Function that allows one account to set the allowance of another account over their tokens.\n     *          Emits an {Approval} event.\n     *  @param  spender_ Account that tokens are approved for.\n     *  @param  amount_  Amount of tokens that have been approved.\n     *  @return success_ Boolean indicating whether the operation succeeded.\n     */\n    function approve(address spender_, uint256 amount_) external returns (bool success_);\n\n    /**\n     *  @dev    Function that allows one account to decrease the allowance of another account over their tokens.\n     *          Emits an {Approval} event.\n     *  @param  spender_          Account that tokens are approved for.\n     *  @param  subtractedAmount_ Amount to decrease approval by.\n     *  @return success_          Boolean indicating whether the operation succeeded.\n     */\n    function decreaseAllowance(address spender_, uint256 subtractedAmount_) external returns (bool success_);\n\n    /**\n     *  @dev    Function that allows one account to increase the allowance of another account over their tokens.\n     *          Emits an {Approval} event.\n     *  @param  spender_     Account that tokens are approved for.\n     *  @param  addedAmount_ Amount to increase approval by.\n     *  @return success_     Boolean indicating whether the operation succeeded.\n     */\n    function increaseAllowance(address spender_, uint256 addedAmount_) external returns (bool success_);\n\n    /**\n     *  @dev   Approve by signature.\n     *  @param owner_    Owner address that signed the permit.\n     *  @param spender_  Spender of the permit.\n     *  @param amount_   Permit approval spend limit.\n     *  @param deadline_ Deadline after which the permit is invalid.\n     *  @param v_        ECDSA signature v component.\n     *  @param r_        ECDSA signature r component.\n     *  @param s_        ECDSA signature s component.\n     */\n    function permit(address owner_, address spender_, uint amount_, uint deadline_, uint8 v_, bytes32 r_, bytes32 s_) external;\n\n    /**\n     *  @dev    Moves an amount of tokens from `msg.sender` to a specified account.\n     *          Emits a {Transfer} event.\n     *  @param  recipient_ Account that receives tokens.\n     *  @param  amount_    Amount of tokens that are transferred.\n     *  @return success_   Boolean indicating whether the operation succeeded.\n     */\n    function transfer(address recipient_, uint256 amount_) external returns (bool success_);\n\n    /**\n     *  @dev    Moves a pre-approved amount of tokens from a sender to a specified account.\n     *          Emits a {Transfer} event.\n     *          Emits an {Approval} event.\n     *  @param  owner_     Account that tokens are moving from.\n     *  @param  recipient_ Account that receives tokens.\n     *  @param  amount_    Amount of tokens that are transferred.\n     *  @return success_   Boolean indicating whether the operation succeeded.\n     */\n    function transferFrom(address owner_, address recipient_, uint256 amount_) external returns (bool success_);\n\n    /**********************/\n    /*** View Functions ***/\n    /**********************/\n\n    /**\n     *  @dev    Returns the allowance that one account has given another over their tokens.\n     *  @param  owner_     Account that tokens are approved from.\n     *  @param  spender_   Account that tokens are approved for.\n     *  @return allowance_ Allowance that one account has given another over their tokens.\n     */\n    function allowance(address owner_, address spender_) external view returns (uint256 allowance_);\n\n    /**\n     *  @dev    Returns the amount of tokens owned by a given account.\n     *  @param  account_ Account that owns the tokens.\n     *  @return balance_ Amount of tokens owned by a given account.\n     */\n    function balanceOf(address account_) external view returns (uint256 balance_);\n\n    /**\n     *  @dev    Returns the decimal precision used by the token.\n     *  @return decimals_ The decimal precision used by the token.\n     */\n    function decimals() external view returns (uint8 decimals_);\n\n    /**\n     *  @dev    Returns the signature domain separator.\n     *  @return domainSeparator_ The signature domain separator.\n     */\n    function DOMAIN_SEPARATOR() external view returns (bytes32 domainSeparator_);\n\n    /**\n     *  @dev    Returns the name of the token.\n     *  @return name_ The name of the token.\n     */\n    function name() external view returns (string memory name_);\n\n    /**\n      *  @dev    Returns the nonce for the given owner.\n      *  @param  owner_  The address of the owner account.\n      *  @return nonce_ The nonce for the given owner.\n     */\n    function nonces(address owner_) external view returns (uint256 nonce_);\n\n    /**\n     *  @dev    Returns the symbol of the token.\n     *  @return symbol_ The symbol of the token.\n     */\n    function symbol() external view returns (string memory symbol_);\n\n    /**\n     *  @dev    Returns the total amount of tokens in existence.\n     *  @return totalSupply_ The total amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256 totalSupply_);\n\n}\n"
      },
      "lib/solmate/src/auth/Owned.sol": {
        "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Simple single owner authorization mixin.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)\nabstract contract Owned {\n    /*//////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event OwnershipTransferred(address indexed user, address indexed newOwner);\n\n    /*//////////////////////////////////////////////////////////////\n                            OWNERSHIP STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    address public owner;\n\n    modifier onlyOwner() virtual {\n        require(msg.sender == owner, \"UNAUTHORIZED\");\n\n        _;\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner) {\n        owner = _owner;\n\n        emit OwnershipTransferred(address(0), _owner);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                             OWNERSHIP LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        owner = newOwner;\n\n        emit OwnershipTransferred(msg.sender, newOwner);\n    }\n}\n"
      },
      "src/migration/interfaces/IMigrationLockedRevenueDistributionToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0 <0.9.0;\n\nimport {IERC20} from \"erc20/interfaces/IERC20.sol\";\n\ninterface IMigrationLockedRevenueDistributionToken is IERC20 {\n    function deposit(uint256 assets_, address receiver_) external returns (uint256 shares_);\n\n    function redeem(uint256 shares_, address receiver_, address owner_) external returns (uint256 assets_);\n\n    function previewDeposit(uint256 assets_) external view returns (uint256 shares_);\n\n    function previewRedeem(uint256 shares_, address owner_) external view returns (uint256 assets_);\n\n    function totalAssets() external view returns (uint256 totalManagedAssets_);\n}\n"
      },
      "src/migration/interfaces/IGETToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0 <0.9.0;\n\nimport {IERC20} from \"erc20/interfaces/IERC20.sol\";\n\ninterface IGETToken is IERC20 {\n    function burn(uint256 amount) external;\n}\n"
      },
      "src/migration/interfaces/IOPNToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0 <0.9.0;\n\nimport {IERC20} from \"erc20/interfaces/IERC20.sol\";\n\ninterface IOPNToken is IERC20 {\n    /// @notice Mint function only callable by the DAO\n    /// @dev this function will be only callable by a DAO governance contract that can only execute functions like these after a majority vote (with quorum) has been reached\n    /// @param _to Address to which tokens will be minted.\n    /// @param _amount Amount of tokens to mint\n    function mintTokensByDAO(address _to, uint256 _amount) external;\n\n    /// @notice Issues tokens during the migration process.\n    /// @dev This function will be only callable by a migration manager contract(burning GET and minting OPN) that will be responsible for minting tokens during the migration process. After the migration the DAO can revoke the minting rights of the migration manager.\n    /// @param _to Address to which tokens will be minted.\n    /// @param _amount Amount of tokens to mint.\n    function issueTokensMigration(address _to, uint256 _amount) external;\n\n    /// @notice Mints tokens for Polygon inventory.\n    /// @dev As to allow GET to be migrated on Polygon this function will be used to mint a certain amount of tokens to the Polygon inventory. This is not inflationary as the tokens are already minted on Ethereum and are just being moved to Polygon.\n    /// @param _to Address to which tokens will be minted.\n    /// @param _amount Amount of tokens to mint.\n    function mintTokenPolygonInventory(address _to, uint256 _amount) external;\n\n    /// @notice Allows token holders to burn their tokens.\n    /// @param _amount Amount of tokens to burn.\n    function burn(uint256 _amount) external;\n\n    /// @notice Finalizes the migration process\n    /// @dev this function disables the migration minting and revokes the minting rights of the migration manager. This function can only be called by the DAO.\n    function finalizeMigration() external;\n\n    /// @notice Sets a new DAO controller address\n    /// @param _newDaoController The address of the new DAO controller.\n    function setDAOControllerAddress(address _newDaoController) external;\n\n    /// @notice Sets a new mint manager address\n    /// @param _newMigrationManager The address of the new mint manager.\n    function setMintManager(address _newMigrationManager) external;\n\n    // View functions\n\n    /// @notice Returns the address of the mint manager.\n    /// @return address of the mint manager.\n    function mintManagerAddress() external view returns (address);\n\n    /// @notice Returns the address of the DAO controller.\n    /// @return address of the DAO controller.\n    function daoControllerAddress() external view returns (address);\n\n    /// @notice Returns whether the migration issuance is disabled permanently\n    function migrationIssuanceDisabledPermanently()\n        external\n        view\n        returns (bool);\n\n    // Events\n\n    event TokensBurned(address indexed from, uint256 amount);\n\n    event MigrationInventoryMint(address indexed to, uint256 amount);\n\n    event MigrationManagerSet(address indexed newMigrationManager);\n\n    event MigrationMint(address indexed to, uint256 amount);\n\n    event DaoMint(address indexed to, uint256 amount);\n\n    event DaoControllerSet(address _newDaoController);\n\n    event MigrationConfigFinalized();\n}\n"
      },
      "src/migration/interfaces/IOPNMintManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0 <0.9.0;\n\ninterface IOPNMintManager {\n    // Events\n\n    event MigrationMint(address indexed to, uint256 amount);\n\n    event DaoMint(address indexed to, uint256 amount);\n\n    event MigrationContractSet(address migrationContract);\n\n    event DAOContractAddressSet(address daoContractAddress);\n\n    event MintManagerSetInToken(address _newMigrationManager);\n\n    // Functions\n\n    function opnTokenAddress() external view returns (address);\n\n    function issueTokensMigration(address _to, uint256 _amount) external;\n\n    function mintTokenPolygonInventory(address _to, uint256 _amount) external;\n\n    function setDaoContractAddress(address _daoContractAddress) external;\n\n    function setMintManangerInToken(address _newMigrationManager) external;\n\n    function withdrawOPN() external;\n\n    function setMigrationContract(address _migrationContract) external;\n\n    function withdrawTokens(address _tokenAddress, uint256 _amount) external;\n}\n"
      },
      "src/migration/interfaces/IOPNMigration.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0 <0.9.0;\n\ninterface IOPNMigration {\n    // Events\n    event MintManagerSet(address indexed opnMintManager);\n\n    event AdminSet(address indexed admin, bool setting);\n\n    event XOpenTokenSet(address indexed xOpenToken);\n\n    event OPNTokenSet(address indexed openToken);\n\n    event MigrationStatusSet(bool setting);\n\n    // The amount of GET tokens the user has migrated to OPN.\n    // The amount of XGET tokens the user has migrated to XOPN.\n    // The amount of OPN tokens allocated to the user after the migration of liquid GET tokens.\n    // The amount of XOPN tokens sent to the user after the migration of XGET tokens (note this is not just x1000 the xGET tokens, because xGET redemption gives a certain amount of GET that varies over time, also the amount of XOPN also depends on if people do immediate withdraws in that contract)\n    // The amount of OPN tokens staked during the migration of liquid GET tokens.\n    // If the user migrates xGET then in the migratiion the contract has redeemed the XGET for GET, this value is the amount of GET  that was received, migrated and staked\n    // amount of OPN that was minted (and then staked) in the migration of XGET, this is baically x1000 of the previous value\n    event OPNMigrationComplete( // The address of the user who initiated the migration process.\n        address indexed user,\n        uint256 amountGET,\n        uint256 amountXGET,\n        uint256 amountOPNToUserForGETMigration,\n        uint256 amountXOPNToUserForGETMigration,\n        uint256 amountXOPNToUserForXGETMigration,\n        uint256 amountOPNStakedForGETMigration,\n        uint256 amountGETRedeemedByXGET,\n        uint256 amountOPNMintedForXGETMigration\n    );\n\n    event StartOfMigrationSet(uint256 startOfMigration);\n\n    event EndOfMigrationSet(uint256 endOfMigration);\n\n    event StakeRateInitialSet(uint256 stakeRateInitial);\n\n    event DurationOfStakeMigrationPeriodSet(uint256 durationOfStakeMigrationPeriod);\n\n    // View functions\n\n    /**\n     * @notice Returns the total amount of GET tokens redeemed from XGET tokens during the migration process.\n     * @dev This function provides a view into the total effectiveness and participation in the migration process, specifically focusing on the XGET to GET redemption aspect. It allows external entities to query the total amount of GET tokens that have been successfully redeemed from XGET tokens, offering insights into the volume of tokens processed in this part of the migration.\n     * @return The total amount of GET tokens that have been redeemed from XGET tokens as part of the migration process. This includes all GET tokens obtained through the redemption of XGET tokens, across all participants in the migration.\n     */\n    function returnTotalAmountGETFromXGETRedemptionMigrated() external view returns (uint256);\n\n    /**\n     * @notice Calculates the total amount of OPN tokens that have been satked as a result of the migration.\n     * @return totalOPNStaked_ The total amount of OPN tokens staked during the migration process.\n     */\n    function totalOPNStakedByTheMigration() external view returns (uint256 totalOPNStaked_);\n\n    /**\n     * @notice Provides the total amount of OPN tokens that have been minted during the migration process.\n     * @return totalOPNMinted_ The total number of OPN tokens minted as a result of migration.\n     */\n    function totalOPNMinted() external view returns (uint256 totalOPNMinted_);\n\n    /**\n     * @notice Returns the current stake rate applied to tokens during the migration.\n     * @return stakeRate_ The current stake rate, scaled by 1e18 for precision.\n     */\n    function returnCurrentStakeRate() external view returns (uint256 stakeRate_);\n\n    /**\n     * @notice Returns the stake rate at a specific timestamp during the migration process.\n     * @param _timestamp The Unix timestamp for which the stake rate is requested.\n     * @return stakeRate_ The stake rate at the specified timestamp, scaled by 1e18 for precision.\n     */\n    function returnStakeRateAtTime(uint256 _timestamp) external view returns (uint256 stakeRate_);\n\n    /**\n     * @notice Fetches the total supply of OPN tokens.\n     * @return totalSupply_ The total supply of OPN tokens.\n     */\n    function totalOPNSupply() external view returns (uint256 totalSupply_);\n\n    /**\n     * @notice Retrieves the total supply of XOPN tokens.\n     * @return totalSupply_ The total supply of XOPN tokens.\n     */\n    function totalXOPNSupply() external view returns (uint256 totalSupply_);\n\n    /**\n     * @notice Calculates the total amount of GET tokens that have been migrated to OPN.\n     * @return totalGETMigrated_ The total amount of GET tokens migrated to OPN.\n     */\n    function totalGETMigratedInTotal() external view returns (uint256 totalGETMigrated_);\n\n    /**\n     * @notice Provides the total amount of XGET tokens that have been redeemed as part of the migration process.\n     * @return totalXGETRedeemed_ The total number of XGET tokens redeemed during the migration process.\n     */\n    function totalXGETRedeemedInTotal() external view returns (uint256 totalXGETRedeemed_);\n\n    function depositRatioOfOPNtoXOPN() external view returns (uint256);\n\n    function previewRedeem(uint256 _shares) external view returns (uint256);\n\n    function previewDeposit(uint256 _assets) external view returns (uint256);\n\n    /**\n     * @notice Calculates and returns the expected outputs for a dual token migration given specific amounts of GET and XGET tokens.\n     * @dev This function provides a preview of the migration results without actually performing the migration. It's useful for users to understand the benefits of migrating their tokens.\n     * @param _amountGET The amount of GET tokens the user intends to migrate.\n     * @param _amountXGET The amount of XGET tokens the user intends to redeem and migrate.\n     * @return amountOPNToUserForGETMigration_ The amount of OPN tokens the user will receive for the migration of GET tokens.\n     * @return amountXOPNToUserForXGETMigration_ The amount of XOPN tokens the user will receive for the redemption and migration of XGET tokens.\n     * @return amountOPNStakedForGETMigration_ The amount of OPN tokens that will be staked as a result of GET token migration.\n     * @return amountXOPNToUserForGETMigration_ The amount of XOPN tokens allocated to the user as a result of GET token migration. This appears to be a duplicate or incorrectly named return value based on the provided context and might need correction.\n     * @return amountGETRedeemedByXGET_ The amount of GET tokens redeemed from the XGET tokens provided.\n     */\n    function returnMigrateDualTokenOutput(uint256 _amountGET, uint256 _amountXGET)\n        external\n        view\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        );\n\n    /**\n     * @notice Migrates specified amounts of GET and XGET tokens to OPN and XOPN tokens, respectively.\n     * @dev This function performs the actual migration of tokens. It should handle the redemption of XGET tokens for GET, the conversion of GET to OPN, and the allocation of OPN and XOPN tokens to the user. Ensure proper security measures, such as reentrancy guards, are in place.\n     * @param _amountGET The amount of GET tokens the user wishes to migrate.\n     * @param _amountXGET The amount of XGET tokens the user wishes to redeem and migrate.\n     * @return amountOPNToUserForGETMigration_ The amount of OPN tokens allocated to the user for the migration of GET tokens.\n     * @return amountXOPNToUserForXGETMigration_ The amount of XOPN tokens allocated to the user for the redemption and migration of XGET tokens.\n     * @return amountOPNStakedForGETMigration_ The amount of OPN tokens staked as a result of the migration of GET tokens.\n     * @return amountXOPNToUserForGETMigration_ The amount of XOPN tokens allocated to the user as a result of GET token migration. This appears to be a duplicate or incorrectly named return value based on the provided context and might need correction.\n     * @return amountGETRedeemedByXGET_ The total amount of GET tokens redeemed from the XGET tokens provided.\n     */\n    function migrateDualTokens(uint256 _amountGET, uint256 _amountXGET)\n        external\n        returns (\n            uint256 amountOPNToUserForGETMigration_,\n            uint256 amountXOPNToUserForXGETMigration_,\n            uint256 amountOPNStakedForGETMigration_,\n            uint256 amountXOPNToUserForGETMigration_,\n            uint256 amountGETRedeemedByXGET_\n        );\n\n    /**\n     * @notice Configures the addresses for the OPN token, xOPN token, and OPN Mint Manager contracts.\n     * @dev This function is intended for administrative use to set up or update the contract addresses involved in the migration process. It allows for the configuration of the main OPN token address, the xOPN token address, and the OPN Mint Manager address in a single transaction.\n     * @param _openToken The address of the OPN token contract. This token represents the primary asset being migrated.\n     * @param _xOpenToken The address of the xOPN token contract. This token represents a secondary or derivative asset involved in the migration.\n     * @param _opnMintManager The address of the OPN Mint Manager contract. This contract is responsible for managing the minting of OPN tokens during the migration process.\n     */\n    function setAddressConfig(address _openToken, address _xOpenToken, address _opnMintManager) external;\n\n    /**\n     * @notice Activates or deactivates the migration process.\n     * @dev Only callable by the admin. Controls whether the migration is allowed to proceed.\n     * @param _setting A boolean value to activate (`true`) or deactivate (`false`) the migration.\n     */\n    function setMigrationActive(bool _setting) external;\n\n    function setStartOfMigration(uint256 _startOfMigration) external;\n\n    function setEndOfMigration(uint256 _endOfMigration) external;\n\n    function setStakeRateInitial(uint256 _stakeRateInitial) external;\n\n    function setDurationOfStakeMigrationPeriod(uint256 _durationOfStakeMigrationPeriod) external;\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "@solmate/src/=lib/solmate/src/",
        "forge-std/=lib/forge-std/src/",
        "contract-test-utils/=lib/erc20-helper/lib/contract-test-utils/contracts/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "erc20-helper/=lib/erc20-helper/src/",
        "erc20/=lib/erc20/contracts/",
        "revenue-distribution-token/=lib/revenue-distribution-token/contracts/",
        "solmate/=lib/solmate/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs"
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "london",
      "viaIR": false,
      "libraries": {}
    }
  }}