creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/staking/StakingConfig.sol": {
        "content": "// SPDX-License-Identifier: BUSL 1.1\npragma solidity =0.8.22;\n\nimport \"openzeppelin-contracts/contracts/access/Ownable.sol\";\nimport \"./interfaces/IStakingConfig.sol\";\n\n\n// Contract owned by the DAO with parameters modifiable only by the DAO\ncontract StakingConfig is IStakingConfig, Ownable\n    {\n    event MinUnstakeWeeksChanged(uint256 newMinUnstakeWeeks);\n    event MaxUnstakeWeeksChanged(uint256 newMaxUnstakeWeeks);\n    event MinUnstakePercentChanged(uint256 newMinUnstakePercent);\n    event ModificationCooldownChanged(uint256 newModificationCooldown);\n\n    // The minimum number of weeks for an unstake request at which point minUnstakePercent of the original staked SALT is reclaimable.\n\t// Range: 2 to 12 with an adjustment of 1\n\tuint256 public minUnstakeWeeks = 2;  // minUnstakePercent returned for unstaking this number of weeks\n\n\t// The maximum number of weeks for an unstake request at which point 100% of the original staked SALT is reclaimable.\n\t// Range: 20 to 108 with an adjustment of 8\n\tuint256 public maxUnstakeWeeks = 52;\n\n\t// The percentage of the original staked SALT that is reclaimable when unstaking the minimum number of weeks.\n\t// Range: 10 to 50 with an adjustment of 5\n\tuint256 public minUnstakePercent = 20;\n\n\t// Minimum time between increasing and decreasing user share in SharedRewards contracts.\n\t// Prevents reward hunting where users could frontrun reward distributions and then immediately withdraw.\n\t// Range: 15 minutes to 6 hours with an adjustment of 15 minutes\n\tuint256 public modificationCooldown = 1 hours;\n\n\n\tfunction changeMinUnstakeWeeks(bool increase) external onlyOwner\n        {\n        if (increase)\n            {\n            if (minUnstakeWeeks < 12)\n                minUnstakeWeeks += 1;\n            }\n        else\n            {\n            if (minUnstakeWeeks > 2)\n                minUnstakeWeeks -= 2;\n            }\n\n\t\temit MinUnstakeWeeksChanged(minUnstakeWeeks);\n        }\n\n\n\tfunction changeMaxUnstakeWeeks(bool increase) external onlyOwner\n        {\n        if (increase)\n            {\n            if (maxUnstakeWeeks < 108)\n                maxUnstakeWeeks += 8;\n            }\n        else\n            {\n            if (maxUnstakeWeeks > 20)\n                maxUnstakeWeeks -= 8;\n            }\n\n\t\temit MaxUnstakeWeeksChanged(maxUnstakeWeeks);\n        }\n\n\n\tfunction changeMinUnstakePercent(bool increase) external onlyOwner\n        {\n        if (increase)\n            {\n            if (minUnstakePercent < 50)\n                minUnstakePercent += 5;\n            }\n        else\n            {\n            if (minUnstakePercent > 10)\n                minUnstakePercent -= 5;\n            }\n\n\t\temit MinUnstakePercentChanged(minUnstakePercent);\n        }\n\n\n\tfunction changeModificationCooldown(bool increase) external onlyOwner\n        {\n        if (increase)\n            {\n            if (modificationCooldown < 6 hours)\n                modificationCooldown += 15 minutes;\n            }\n        else\n            {\n            if (modificationCooldown > 15 minutes)\n                modificationCooldown -= 15 minutes;\n            }\n\n\t\temit ModificationCooldownChanged(modificationCooldown);\n        }\n    }"
      },
      "lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      },
      "src/staking/interfaces/IStakingConfig.sol": {
        "content": "// SPDX-License-Identifier: BUSL 1.1\npragma solidity =0.8.22;\n\n\ninterface IStakingConfig\n\t{\n\tfunction changeMinUnstakeWeeks(bool increase) external; // onlyOwner\n\tfunction changeMaxUnstakeWeeks(bool increase) external; // onlyOwner\n\tfunction changeMinUnstakePercent(bool increase) external; // onlyOwner\n\tfunction changeModificationCooldown(bool increase) external; // onlyOwner\n\n\t// Views\n    function minUnstakeWeeks() external view returns (uint256);\n    function maxUnstakeWeeks() external view returns (uint256);\n    function minUnstakePercent() external view returns (uint256);\n    function modificationCooldown() external view returns (uint256);\n\t}"
      },
      "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "chainlink/=lib/chainlink/",
        "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
        "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
        "forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/",
        "openzeppelin/=lib/openzeppelin-contracts/contracts/",
        "v3-core/=lib/v3-core/contracts/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 10000
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "libraries": {}
    }
  }}