creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/tokenomics/GaugeController.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.16;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {Initializable} from \"@openzeppelin-upgradeable-contracts/proxy/utils/Initializable.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin-upgradeable-contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {IVoteLocker} from \"src/interfaces/IVoteLocker.sol\";\n\nimport {IRegistryContract} from \"src/interfaces/Registry/IRegistryContract.sol\";\nimport {IRegistryAccess} from \"src/interfaces/Registry/IRegistryAccess.sol\";\n\nimport {SCALED_ONE, CONTRACT_REGISTRY_ACCESS, ROLE_OPAL_TEAM, WEEK} from \"src/utils/constants.sol\";\n\ncontract GaugeController is Initializable, UUPSUpgradeable, ReentrancyGuard {\n    // Constants\n\n    uint256 public constant WEIGHT_VOTE_DELAY = 10 * 86_400; // 10 days\n\n    // Struct\n\n    struct Unlocks {\n        uint208 amount;\n        uint48 unlockTime;\n    }\n\n    struct UserVote {\n        uint256 amount;\n        uint256 weight;\n    }\n\n    // Storage\n\n    address public token;\n    address public voteLocker;\n\n    IRegistryContract public registryContract;\n    IRegistryAccess public registryAccess;\n\n    int128 public numberGaugeTypes;\n    int128 public numberGauges;\n    mapping(int128 => string) public gaugeTypeNames;\n\n    address[] public gauges;\n\n    mapping(address => int128) public gaugeTypes;\n\n    // user -> gauge -> UserVotes\n    mapping(address => mapping(address => UserVote)) public userVote;\n    // user -> gauge -> UserVotes Unlocks\n    mapping(address => mapping(address => Unlocks[])) public userVoteUnlocks;\n    // user -> weights\n    mapping(address => uint256) public userVotePower;\n    // user -> gauge -> timestamp\n    mapping(address => mapping(address => uint256)) public lastUserVote;\n\n    // gauge -> timestamp -> votes\n    mapping(address => mapping(uint256 => uint256)) public gaugeVotes;\n    // gauge -> timestamp -> vote changes\n    mapping(address => mapping(uint256 => uint256)) public gaugeVoteChanges;\n    mapping(address => uint256) public lastGaugeUpdate; // last scheduled time (next week)\n\n    // gauge type -> timestamp -> votes\n    mapping(int128 => mapping(uint256 => uint256)) public typeVotes;\n    // gauge type -> timestamp -> vote changes\n    mapping(int128 => mapping(uint256 => uint256)) public typeVoteChanges;\n    mapping(int128 => uint256) public lastTypeUpdate; // last scheduled time (next week)\n\n    mapping(uint256 => uint256) public totalVotes;\n    uint256 public lastUpdate; // last scheduled time (next week)\n\n    // gauge type -> timestamp -> type weight\n    mapping(int128 => mapping(uint256 => uint256)) public typeWeights;\n    mapping(int128 => uint256) public lastTypeWeightUpdate; // last scheduled time (next week)\n\n    // Events\n\n    event AddType(string name, int128 indexed typeId);\n    event NewGauge(address indexed gauge, int128 indexed gaugeType, uint256 weight);\n    event NewTypeWeight(int128 indexed typeId, uint256 time, uint256 weight, uint256 totalWeight);\n    event NewGaugeWeight(address indexed gauge, uint256 time, uint256 weight, uint256 totalWeight);\n    event VoteForGauge(uint256 time, address indexed user, address indexed gauge, uint256 weight);\n\n    // Errors\n\n    error InvalidGaugeType();\n    error GaugeAlreadyAdded();\n    error NoLocks();\n    error NoActiveLocks();\n    error InvalidVoteWeight();\n    error InvalidGauge();\n    error VoteCooldown();\n    error VoteWeightOverflow();\n    error NotAuthorized();\n    error ListSizeMismatch();\n    error NullAddress();\n\n    modifier onlyOpalTeam() {\n        if (!registryAccess.checkRole(ROLE_OPAL_TEAM, msg.sender)) revert NotAuthorized();\n        _;\n    }\n\n    // Constructor\n    constructor() {\n        // checks params\n        _disableInitializers();\n    }\n\n    // Initializer\n    function initialize(address _voteLocker, address _registryContract) public initializer {\n        if (_voteLocker == address(0) || _registryContract == address(0)) {\n            revert NullAddress();\n        }\n\n        __UUPSUpgradeable_init();\n\n        voteLocker = _voteLocker;\n        registryContract = IRegistryContract(_registryContract);\n        registryAccess = IRegistryAccess(registryContract.getContract(CONTRACT_REGISTRY_ACCESS));\n\n        lastUpdate = (block.timestamp / WEEK) * WEEK;\n    }\n\n    function setToken(address _token) external onlyOpalTeam {\n        if (_token == address(0)) revert NullAddress();\n        token = _token;\n    }\n\n    // UUPS\n\n    function _authorizeUpgrade(address newImplementation) internal override onlyOpalTeam {}\n\n    // View methods\n\n    /**\n     * @notice  Get Gauge type\n     * @param   _gauge  The address of the gauge\n     * @return  int128  The gauge type\n     */\n    function getGaugeType(address _gauge) external view returns (int128) {\n        if (gaugeTypes[_gauge] == 0) revert InvalidGaugeType();\n        return gaugeTypes[_gauge];\n    }\n\n    /**\n     * @notice  Get Gauge weight\n     * @param   _gauge  The address of the gauge\n     * @return  uint256  The gauge weight\n     */\n    function getGaugeWeight(address _gauge) external view returns (uint256) {\n        return gaugeVotes[_gauge][lastGaugeUpdate[_gauge]];\n    }\n\n    /**\n     * @notice  Get Gauge type weight\n     * @param   _type  The type of the gauge\n     * @return  uint256  The gauge type weight\n     */\n    function getTypeWeight(int128 _type) external view returns (uint256) {\n        return typeVotes[_type][lastTypeUpdate[_type]];\n    }\n\n    /**\n     * @notice  Get total weight\n     * @return  uint256  The total weight\n     */\n    function getTotalWeight() external view returns (uint256) {\n        return totalVotes[lastUpdate];\n    }\n\n    /**\n     * @notice  Get total weight\n     * @param   _type  The type of the gauge\n     * @return  uint256  The total weight\n     */\n    function getWeightsSumPerType(int128 _type) external view returns (uint256) {\n        return typeWeights[_type][lastTypeWeightUpdate[_type]];\n    }\n\n    // State-changing methods\n\n    /**\n     * @notice  Checkpoint function\n     */\n    function checkpoint() external {\n        _getTotal();\n    }\n\n    /**\n     * @notice  Checkpoint function\n     * @param   gauge  The address of the gauge\n     */\n    function checkpointGauge(address gauge) external {\n        _getWeight(gauge);\n        _getTotal();\n    }\n\n    /**\n     * @notice  Get Gauge relative weight\n     * @param   gauge  The address of the gauge\n     * @param   timestamp  The timestamp to check\n     * @return  uint256  The gauge relative weight\n     */\n    function gaugeRelativeWeight(address gauge, uint256 timestamp)\n        external\n        view\n        returns (uint256)\n    {\n        return _gaugeRelativeWeight(gauge, timestamp);\n    }\n\n    /**\n     * @notice  Get Gauge relative weigh write\n     * @param   gauge  The address of the gauge\n     * @param   timestamp  The timestamp to check\n     * @return  uint256  .\n     */\n    function gaugeRelativeWeightWrite(address gauge, uint256 timestamp)\n        external\n        returns (uint256)\n    {\n        _getWeight(gauge);\n        _getTotal();\n        return _gaugeRelativeWeight(gauge, timestamp);\n    }\n\n    /**\n     * @notice  Vote for gauge weight\n     * @param   gauge  Address of the gauge\n     * @param   voteWeight  Weight of the voting power to allocate\n     */\n    function voteForGaugeWeight(address gauge, uint256 voteWeight) external nonReentrant {\n        _voteForGaugeweight(msg.sender, gauge, voteWeight);\n    }\n\n    /**\n     * @notice  Vote for gauge weight\n     * @param   gaugeList  List of address of the gauge\n     * @param   voteWeights  Weights of the voting power to allocate\n     */\n    function voteForManyGaugeWeights(address[] calldata gaugeList, uint256[] calldata voteWeights)\n        external\n        nonReentrant\n    {\n        uint256 len = gaugeList.length;\n        if (len != voteWeights.length) revert ListSizeMismatch();\n\n        for (uint256 i; i < len;) {\n            _voteForGaugeweight(msg.sender, gaugeList[i], voteWeights[i]);\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    // Internal methods\n\n    /**\n     * @notice  Check the Gauge type\n     * @param   gaugeType  The type of the gauge\n     * @return  uint256  .\n     */\n    function _getTypeWeight(int128 gaugeType) internal returns (uint256) {\n        uint256 timestamp = lastTypeWeightUpdate[gaugeType];\n        if (timestamp == 0) return 0;\n\n        uint256 weight = typeWeights[gaugeType][timestamp];\n        for (uint256 i; i < 500;) {\n            if (timestamp > block.timestamp) break;\n            timestamp += WEEK;\n\n            typeWeights[gaugeType][timestamp] = weight;\n\n            if (timestamp > block.timestamp) {\n                lastTypeWeightUpdate[gaugeType] = timestamp;\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return weight;\n    }\n\n    /**\n     * @notice  Update the votes of a specific timestamp regarding the change votes\n     * @param   gaugeType  The type of the gauge\n     * @return  uint256  The votes for the current timestamp (ie. lastTypeUptade[gaugeType]])\n     */\n    function _getSum(int128 gaugeType) internal returns (uint256) {\n        uint256 timestamp = lastTypeUpdate[gaugeType];\n        if (timestamp == 0) return 0;\n\n        uint256 votes = typeVotes[gaugeType][timestamp];\n        for (uint256 i; i < 500;) {\n            if (timestamp > block.timestamp) break;\n            timestamp += WEEK;\n\n            uint256 voteChanges = typeVoteChanges[gaugeType][timestamp];\n            if (voteChanges >= votes) {\n                votes = 0;\n            } else {\n                unchecked {\n                    votes -= voteChanges;\n                }\n            }\n            typeVotes[gaugeType][timestamp] = votes;\n\n            if (timestamp > block.timestamp) {\n                lastTypeUpdate[gaugeType] = timestamp;\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return votes;\n    }\n\n    /**\n     * @notice  Get total\n     * @return  uint256  .\n     */\n    function _getTotal() internal returns (uint256) {\n        uint256 timestamp = lastUpdate;\n        int128 _numberTypes = numberGaugeTypes;\n\n        if (timestamp > block.timestamp) {\n            // If we have already checkpointed - still need to change the value\n            timestamp -= WEEK;\n        }\n        uint256 votesTotal = totalVotes[timestamp];\n\n        for (int128 i; i < _numberTypes;) {\n            _getSum(i);\n            _getTypeWeight(i);\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        for (uint256 j; j < 500; j++) {\n            if (timestamp > block.timestamp) break;\n            timestamp += WEEK;\n            votesTotal = 0;\n\n            for (int128 k; k < _numberTypes; k++) {\n                uint256 _typeVotes = typeVotes[k][timestamp];\n                uint256 typeWeight = typeWeights[k][timestamp];\n\n                votesTotal += _typeVotes * typeWeight;\n            }\n\n            totalVotes[timestamp] = votesTotal;\n\n            if (timestamp > block.timestamp) {\n                lastUpdate = timestamp;\n            }\n        }\n\n        return votesTotal;\n    }\n\n    /**\n     * @notice  Get weight\n     * @param   gauge  The address of the gauge\n     * @return  uint256  .\n     */\n    function _getWeight(address gauge) internal returns (uint256) {\n        uint256 timestamp = lastGaugeUpdate[gauge];\n        if (timestamp == 0) return 0;\n\n        uint256 votes = gaugeVotes[gauge][timestamp];\n        for (uint256 i; i < 500;) {\n            if (timestamp > block.timestamp) break;\n            timestamp += WEEK;\n\n            uint256 voteChanges = gaugeVoteChanges[gauge][timestamp];\n            if (voteChanges >= votes) {\n                votes = 0;\n            } else {\n                unchecked {\n                    votes -= voteChanges;\n                }\n            }\n            gaugeVotes[gauge][timestamp] = votes;\n\n            if (timestamp > block.timestamp) {\n                lastGaugeUpdate[gauge] = timestamp;\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return votes;\n    }\n\n    /**\n     * @notice  Get Gauge relative weight\n     * @param   gauge  The address of the gauge\n     * @param   timestamp  The timestamp to check\n     * @return  uint256  .\n     */\n    function _gaugeRelativeWeight(address gauge, uint256 timestamp)\n        internal\n        view\n        returns (uint256)\n    {\n        timestamp = (timestamp / WEEK) * WEEK;\n        uint256 totalWeight = totalVotes[timestamp];\n\n        if (totalWeight == 0) return 0;\n\n        int128 gaugeType = gaugeTypes[gauge] - 1;\n        uint256 typeWeight = typeWeights[gaugeType][timestamp];\n        uint256 gaugeWeight = gaugeVotes[gauge][timestamp];\n        return SCALED_ONE * typeWeight * gaugeWeight / totalWeight;\n    }\n\n    /**\n     * @notice  Change type weight\n     * @param   gaugeType  The type of the gauge\n     * @param   weight  The weight to change\n     */\n    function _changeTypeWeight(int128 gaugeType, uint256 weight) internal {\n        uint256 oldWeight = _getTypeWeight(gaugeType);\n        uint256 oldSum = _getSum(gaugeType);\n        uint256 totalWeight = _getTotal();\n        uint256 nextTimestamp = ((block.timestamp + WEEK) / WEEK) * WEEK;\n\n        totalWeight = totalWeight + (oldSum * weight) - (oldSum * oldWeight);\n        totalVotes[nextTimestamp] = totalWeight;\n        typeWeights[gaugeType][nextTimestamp] = weight;\n        lastUpdate = nextTimestamp;\n        lastTypeWeightUpdate[gaugeType] = nextTimestamp;\n\n        emit NewTypeWeight(gaugeType, nextTimestamp, weight, totalWeight);\n    }\n\n    /**\n     * @notice  Change gauge weight\n     * @param   gauge  The address of the gauge\n     * @param   weight  The weight to change\n     */\n    function _changeGaugeWeight(address gauge, uint256 weight) internal {\n        // Change gauge weight\n        // Only needed when testing in reality\n        int128 gaugeType = gaugeTypes[gauge] - 1;\n        if (gaugeType < 0) revert InvalidGauge();\n        uint256 oldGaugeWeight = _getWeight(gauge);\n        uint256 typeWeight = _getTypeWeight(gaugeType);\n        uint256 oldSum = _getSum(gaugeType);\n        uint256 totalWeight = _getTotal();\n        uint256 nextTimestamp = ((block.timestamp + WEEK) / WEEK) * WEEK;\n\n        gaugeVotes[gauge][nextTimestamp] = weight;\n        lastGaugeUpdate[gauge] = nextTimestamp;\n\n        uint256 newSum = oldSum + weight - oldGaugeWeight;\n        totalWeight = totalWeight + (newSum * typeWeight) - (oldSum * typeWeight);\n\n        totalVotes[nextTimestamp] = totalWeight;\n        typeVotes[gaugeType][nextTimestamp] = newSum;\n        lastUpdate = nextTimestamp;\n        lastTypeWeightUpdate[gaugeType] = nextTimestamp;\n\n        emit NewGaugeWeight(gauge, block.timestamp, weight, totalWeight);\n    }\n\n    // Local vars for _voteForGaugeweight\n    struct VoteVars {\n        uint256 len;\n        uint256 nextTimestamp;\n        int128 gaugeType;\n        uint256 powerUsed;\n        uint256 oldGaugeWeight;\n        uint256 oldSum;\n        uint256 oldUnlocksLen;\n    }\n\n    /**\n     * @notice  Vote for gauge weight\n     * @param   user  Address of the user\n     * @param   gauge  Address of the gauge\n     * @param   voteWeight  Weight of the voting power to allocate\n     */\n    function _voteForGaugeweight(address user, address gauge, uint256 voteWeight) internal {\n        VoteVars memory vars;\n        (,,, IVoteLocker.LockedBalance[] memory locks) =\n            IVoteLocker(voteLocker).lockedBalances(msg.sender);\n        vars.len = locks.length;\n        if (vars.len == 0) revert NoLocks();\n        vars.nextTimestamp = ((block.timestamp + WEEK) / WEEK) * WEEK;\n        if (locks[vars.len - 1].unlockTime <= vars.nextTimestamp) revert NoActiveLocks();\n        if (voteWeight > 10_000) revert InvalidVoteWeight();\n        if (block.timestamp < lastUserVote[user][gauge] + WEIGHT_VOTE_DELAY) revert VoteCooldown();\n\n        UserVote memory newUserVote = UserVote({amount: 0, weight: voteWeight});\n        Unlocks[] memory unlocks = new Unlocks[](vars.len);\n        uint256 i = vars.len - 1;\n        IVoteLocker.LockedBalance memory currentLock = locks[i];\n        while (currentLock.unlockTime > vars.nextTimestamp) {\n            uint256 weightedAmount = currentLock.amount * voteWeight / 10_000;\n            newUserVote.amount += weightedAmount;\n\n            unlocks[i] =\n                Unlocks({amount: uint208(weightedAmount), unlockTime: currentLock.unlockTime});\n\n            if (i > 0) {\n                i--;\n                currentLock = locks[i];\n            } else {\n                break;\n            }\n        }\n\n        vars.gaugeType = gaugeTypes[gauge] - 1;\n        if (vars.gaugeType < 0) revert InvalidGauge();\n\n        UserVote memory lastVote = userVote[user][gauge];\n\n        vars.powerUsed = userVotePower[user];\n        vars.powerUsed = vars.powerUsed + voteWeight - lastVote.weight;\n        if (vars.powerUsed > 10_000) {\n            revert VoteWeightOverflow();\n        }\n        userVotePower[user] = vars.powerUsed;\n\n        vars.oldGaugeWeight = _getWeight(gauge);\n        vars.oldSum = _getSum(vars.gaugeType);\n\n        // remove past vote changes\n        Unlocks[] memory oldUnlocks = userVoteUnlocks[user][gauge];\n        vars.oldUnlocksLen = oldUnlocks.length;\n        for (uint256 j; j < vars.oldUnlocksLen; j++) {\n            // Also covers case were unlockTime is 0 (empty array item)\n            if (oldUnlocks[j].unlockTime <= vars.nextTimestamp) continue;\n\n            gaugeVoteChanges[gauge][oldUnlocks[j].unlockTime] -= oldUnlocks[j].amount;\n            typeVoteChanges[vars.gaugeType][oldUnlocks[j].unlockTime] -= oldUnlocks[j].amount;\n\n            // Other previous vote amounts are already accounted for\n            // if unlocks timestamp is in the past\n            vars.oldGaugeWeight -= oldUnlocks[j].amount;\n            vars.oldSum -= oldUnlocks[j].amount;\n        }\n\n        gaugeVotes[gauge][vars.nextTimestamp] = vars.oldGaugeWeight + newUserVote.amount;\n        typeVotes[vars.gaugeType][vars.nextTimestamp] = vars.oldSum + newUserVote.amount;\n\n        for (uint256 k; k < vars.len; k++) {\n            // Also covers case were unlockTime is 0 (empty array item)\n            if (unlocks[k].unlockTime <= vars.nextTimestamp) continue;\n\n            gaugeVoteChanges[gauge][unlocks[k].unlockTime] += unlocks[k].amount;\n            typeVoteChanges[vars.gaugeType][unlocks[k].unlockTime] += unlocks[k].amount;\n        }\n\n        _getTotal();\n\n        lastUserVote[user][gauge] = block.timestamp;\n        userVote[user][gauge] = newUserVote;\n\n        delete userVoteUnlocks[user][gauge];\n        for (uint256 l; l < vars.len; l++) {\n            // Also covers case were unlockTime is 0 (empty array item)\n            if (unlocks[l].unlockTime <= block.timestamp) continue;\n\n            userVoteUnlocks[user][gauge].push(unlocks[l]);\n        }\n\n        emit VoteForGauge(block.timestamp, user, gauge, voteWeight);\n    }\n\n    // Admin methods\n\n    /**\n     * @notice  Add gauge\n     * @param   gauge  The gauge to add\n     * @param   gaugeType  The type of the gauge\n     * @param   weight  The weight to add\n     */\n    function addGauge(address gauge, int128 gaugeType, uint256 weight)\n        external\n        nonReentrant\n        onlyOpalTeam\n    {\n        if (gaugeType < 0 || gaugeType > numberGaugeTypes) revert InvalidGaugeType();\n\n        if (gaugeTypes[gauge] != 0) revert GaugeAlreadyAdded();\n\n        numberGauges++;\n        gauges.push(gauge);\n\n        gaugeTypes[gauge] = gaugeType + 1;\n        uint256 nextTimestamp = ((block.timestamp + WEEK) / WEEK) * WEEK;\n\n        if (weight > 0) {\n            uint256 typeWeight = _getTypeWeight(gaugeType);\n            uint256 oldSum = _getSum(gaugeType);\n            uint256 olTotal = _getTotal();\n\n            typeVotes[gaugeType][nextTimestamp] = oldSum + weight;\n            lastTypeUpdate[gaugeType] = nextTimestamp;\n            totalVotes[nextTimestamp] = olTotal + (weight * typeWeight);\n            lastUpdate = nextTimestamp;\n\n            gaugeVotes[gauge][nextTimestamp] = weight;\n        }\n\n        if (lastTypeUpdate[gaugeType] == 0) {\n            lastTypeUpdate[gaugeType] = nextTimestamp;\n        }\n        lastGaugeUpdate[gauge] = nextTimestamp;\n\n        emit NewGauge(gauge, gaugeType, weight);\n    }\n\n    /**\n     * @notice  Add Type for gauge\n     * @param   name  The name of the gauge\n     * @param   weight  The weight to add\n     */\n    function addType(string memory name, uint256 weight) external nonReentrant onlyOpalTeam {\n        int128 newGaugeType = numberGaugeTypes;\n        numberGaugeTypes++;\n        gaugeTypeNames[newGaugeType] = name;\n\n        if (weight != 0) {\n            _changeTypeWeight(newGaugeType, weight);\n        }\n\n        emit AddType(name, newGaugeType);\n    }\n\n    /**\n     * @notice  Change type weight\n     * @param   gaugeType  The type of the gauge\n     * @param   weight  The weight to change\n     */\n    function changeTypeWeight(int128 gaugeType, uint256 weight)\n        external\n        nonReentrant\n        onlyOpalTeam\n    {\n        _changeTypeWeight(gaugeType, weight);\n    }\n\n    function changeGaugeWeight(address gauge, uint256 weight) external nonReentrant onlyOpalTeam {\n        _changeGaugeWeight(gauge, weight);\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\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        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\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        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\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"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Storage of the initializable contract.\n     *\n     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n     * when using with upgradeable contracts.\n     *\n     * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n     */\n    struct InitializableStorage {\n        /**\n         * @dev Indicates that the contract has been initialized.\n         */\n        uint64 _initialized;\n        /**\n         * @dev Indicates that the contract is in the process of being initialized.\n         */\n        bool _initializing;\n    }\n\n    // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n    /**\n     * @dev The contract is already initialized.\n     */\n    error InvalidInitialization();\n\n    /**\n     * @dev The contract is not initializing.\n     */\n    error NotInitializing();\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint64 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n     * production.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        // Cache values to avoid duplicated sloads\n        bool isTopLevelCall = !$._initializing;\n        uint64 initialized = $._initialized;\n\n        // Allowed calls:\n        // - initialSetup: the contract is not in the initializing state and no previous version was\n        //                 initialized\n        // - construction: the contract is initialized at version 1 (no reininitialization) and the\n        //                 current contract is just being deployed\n        bool initialSetup = initialized == 0 && isTopLevelCall;\n        bool construction = initialized == 1 && address(this).code.length == 0;\n\n        if (!initialSetup && !construction) {\n            revert InvalidInitialization();\n        }\n        $._initialized = 1;\n        if (isTopLevelCall) {\n            $._initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            $._initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint64 version) {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing || $._initialized >= version) {\n            revert InvalidInitialization();\n        }\n        $._initialized = version;\n        $._initializing = true;\n        _;\n        $._initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        _checkInitializing();\n        _;\n    }\n\n    /**\n     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n     */\n    function _checkInitializing() internal view virtual {\n        if (!_isInitializing()) {\n            revert NotInitializing();\n        }\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        // solhint-disable-next-line var-name-mixedcase\n        InitializableStorage storage $ = _getInitializableStorage();\n\n        if ($._initializing) {\n            revert InvalidInitialization();\n        }\n        if ($._initialized != type(uint64).max) {\n            $._initialized = type(uint64).max;\n            emit Initialized(type(uint64).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint64) {\n        return _getInitializableStorage()._initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _getInitializableStorage()._initializing;\n    }\n\n    /**\n     * @dev Returns a pointer to the storage namespace.\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n        assembly {\n            $.slot := INITIALIZABLE_STORAGE\n        }\n    }\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC1822Proxiable} from \"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol\";\nimport {Initializable} from \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    address private immutable __self = address(this);\n\n    /**\n     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`\n     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,\n     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.\n     * If the getter returns `\"5.0.0\"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must\n     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n     * during an upgrade.\n     */\n    string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n    /**\n     * @dev The call is from an unauthorized context.\n     */\n    error UUPSUnauthorizedCallContext();\n\n    /**\n     * @dev The storage `slot` is unsupported as a UUID.\n     */\n    error UUPSUnsupportedProxiableUUID(bytes32 slot);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        _checkProxy();\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        _checkNotDelegated();\n        _;\n    }\n\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view virtual notDelegated returns (bytes32) {\n        return ERC1967Utils.IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data);\n    }\n\n    /**\n     * @dev Reverts if the execution is not performed via delegatecall or the execution\n     * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\n     * See {_onlyProxy}.\n     */\n    function _checkProxy() internal view virtual {\n        if (\n            address(this) == __self || // Must be called through delegatecall\n            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy\n        ) {\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Reverts if the execution is performed via delegatecall.\n     * See {notDelegated}.\n     */\n    function _checkNotDelegated() internal view virtual {\n        if (address(this) != __self) {\n            // Must not be called through delegatecall\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.\n     *\n     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value\n     * is expected to be the implementation slot in ERC1967.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {\n        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {\n                revert UUPSUnsupportedProxiableUUID(slot);\n            }\n            ERC1967Utils.upgradeToAndCall(newImplementation, data);\n        } catch {\n            // The implementation is not UUPS\n            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);\n        }\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    uint256 private _status;\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        _status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == ENTERED;\n    }\n}\n"
      },
      "src/interfaces/IVoteLocker.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.20;\n\ninterface IVoteLocker {\n    struct LockedBalance {\n        uint208 amount;\n        uint48 unlockTime;\n    }\n\n    struct Epoch {\n        uint208 supply; //epoch boosted supply\n        uint48 date; //epoch start date\n    }\n\n    function balanceOf(address _account) external view returns (uint256 amount);\n\n    function totalSupply() external view returns (uint256 amount);\n\n    function lockedBalances(address _user)\n        external\n        view\n        returns (uint256 total, uint256 unlockable, uint256 locked, LockedBalance[] memory lockData);\n\n    function lock(address _account, uint256 _amount) external;\n\n    function checkpointEpoch() external;\n\n    function epochCount() external view returns (uint256);\n\n    function epochs(uint256 i) external view returns (Epoch memory);\n\n    function balanceAtEpochOf(uint256 _epoch, address _user)\n        external\n        view\n        returns (uint256 amount);\n\n    function totalSupplyAtEpoch(uint256 _epoch) external view returns (uint256 supply);\n\n    function queueNewRewards(address _rewardsToken, uint256 reward) external;\n\n    function getReward(address _account, bool _stake) external;\n\n    function getReward(address _account) external;\n}\n"
      },
      "src/interfaces/Registry/IRegistryContract.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.20;\n\ninterface IRegistryContract {\n    function getContract(bytes32 name) external view returns (address);\n}\n"
      },
      "src/interfaces/Registry/IRegistryAccess.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.20;\n\ninterface IRegistryAccess {\n    function getOwner() external view returns (address);\n\n    function checkRole(bytes32 role, address user) external view returns (bool);\n}\n"
      },
      "src/utils/constants.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.20;\n\n/* Role */\nbytes32 constant ROLE_ADMIN = keccak256(\"ROLE_ADMIN\");\nbytes32 constant ROLE_OPAL_TEAM = keccak256(\"ROLE_OPAL_TEAM\");\nbytes32 constant ROLE_OMNIPOOL = keccak256(\"ROLE_OMNIPOOL\");\nbytes32 constant ROLE_OMNIPOOL_CONTROLLER = keccak256(\"ROLE_OMNIPOOL_CONTROLLER\");\nbytes32 constant ROLE_REWARD_MANAGER = keccak256(\"ROLE_REWARD_MANAGER\");\nbytes32 constant ROLE_MINT_LP_TOKEN = keccak256(\"ROLE_MINT_LP_TOKEN\");\nbytes32 constant ROLE_BURN_LP_TOKEN = keccak256(\"ROLE_BURN_LP_TOKEN\");\nbytes32 constant ROLE_MINT_ESCROW_TOKEN = keccak256(\"ROLE_MINT_ESCROW_TOKEN\");\nbytes32 constant ROLE_MINTER_ESCROW = keccak256(\"ROLE_MINTER_ESCROW\");\nbytes32 constant ROLE_DAO = keccak256(\"ROLE_DAO\");\nbytes32 constant ROLE_GEM_MINTER = keccak256(\"ROLE_MINTER_ESCROW\");\n\n/* Contracts */\n\nbytes32 constant CONTRACT_GEM_TOKEN = keccak256(\"CONTRACT_GEM_TOKEN\");\nbytes32 constant CONTRACT_BAL_TOKEN = keccak256(\"CONTRACT_BAL_TOKEN\");\nbytes32 constant CONTRACT_AURA_TOKEN = keccak256(\"CONTRACT_AURA_TOKEN\");\nbytes32 constant CONTRACT_ORACLE = keccak256(\"CONTRACT_ORACLE\");\nbytes32 constant CONTRACT_REGISTRY_ACCESS = keccak256(\"CONTRACT_REGISTRY_ACCESS\");\nbytes32 constant CONTRACT_GAUGE_CONTROLLER = keccak256(\"CONTRACT_GAUGE_CONTROLLER\");\nbytes32 constant CONTRACT_OMNIPOOL = keccak256(\"CONTRACT_OMNIPOOL\");\nbytes32 constant CONTRACT_OMNIPOOL_CONTROLLER = keccak256(\"CONTRACT_OMNIPOOL_CONTROLLER\");\nbytes32 constant CONTRACT_LP_STAKER = keccak256(\"CONTRACT_LP_STAKER\");\nbytes32 constant CONTRACT_BALANCER_VAULT = keccak256(\"CONTRACT_BALANCER_VAULT\");\nbytes32 constant CONTRACT_AURA_DEPOSIT_WRAPPER = keccak256(\"CONTRACT_AURA_DEPOSIT_WRAPPER\");\nbytes32 constant CONTRACT_OPAL_TREASURY = keccak256(\"CONTRACT_OPAL_TREASURY\");\nbytes32 constant CONTRACT_VOTE_LOCKER = keccak256(\"CONTRACT_VOTE_LOCKER\");\nbytes32 constant CONTRACT_GEM_MINTER_REBALANCING_REWARD =\n    keccak256(\"CONTRACT_GEM_MINTER_REBALANCING_REWARD\");\nbytes32 constant CONTRACT_WETH = keccak256(\"CONTRACT_WETH\");\nbytes32 constant CONTRACT_INCENTIVES_MS = keccak256(\"CONTRACT_INCENTIVES_MS\");\n\n/* Constants */\n\nuint256 constant SCALED_ONE = 1e18;\n\nuint256 constant GEM_TOTAL_SUPPLY = 50_000_000 * SCALED_ONE;\nuint256 constant LPB_SUPPLY = 5_000_000 * SCALED_ONE; // 10% of total supply\nuint256 constant SEED_SUPPLY = 2_500_000 * SCALED_ONE; // 5% of total supply\nuint256 constant LIQUIDITY_MINING_SUPPLY = 8_100_000 * SCALED_ONE; // 16.2% of total supply\nuint256 constant VLGEM_BOOST_SUPPLY = 9_400_000 * SCALED_ONE; // 18.8% of total supply\nuint256 constant TREASURY_SUPPLY = 3_000_000 * SCALED_ONE; // 6% of total supply\nuint256 constant TEAM_SUPPLY = 7_500_000 * SCALED_ONE; // 15% of total supply\nuint256 constant AIRDROP_SUPPLY = 5_000_000 * SCALED_ONE; // 10% of total supply\nuint256 constant REBALANCING_SUPPLY = 9_500_000 * SCALED_ONE; // 19% of total supply\n\nuint256 constant WEEK = 604_800;\n\n/* Minter */\nuint256 constant INITIAL_MINTER_RATE = (2_250_000 * SCALED_ONE) / uint256(52 weeks);\nuint256 constant RATE_REDUCTION_TIME = 365 days;\nuint256 constant RATE_REDUCTION_COEFFICIENT = 0.75 * 1e18; // 25% reduction\n\n/* Minter Escrow */\nuint256 constant MINTER_ESCROW_RATE = (9_400_000 * SCALED_ONE) / uint256(104 weeks);\nuint256 constant RATE_END_TIMESTAMP = 2 * 365 days;\nuint256 constant INFLATION_DELAY = 1 days;\n\n/* Reward Manager */\nuint256 constant REWARD_FEES = 900 * SCALED_ONE / 10_000; // 9%\n\n/* Omnipool */\nuint256 constant WITHDRAW_FEES = 50 * SCALED_ONE / 10_000; // 0.5%\n\n/* Oracle */\naddress constant CURVE_SFRXETH_ORACLE = 0xa1F8A6807c402E4A15ef4EBa36528A3FED24E577;\n\n/* TOKEN */\naddress constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\naddress constant SFRXETH = 0xac3E018457B222d93114458476f3E3416Abbe38F;\naddress constant WSTETH = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0;\naddress constant RETH = 0xae78736Cd615f374D3085123A210448E74Fc6393;\n\n/* Enum */\nenum PoolType {\n    WEIGHTED,\n    STABLE,\n    COMPOSABLE\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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"
      },
      "lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.20;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n */\nlibrary ERC1967Utils {\n    // We re-declare ERC-1967 events here because they can't be used directly from IERC1967.\n    // This will be fixed in Solidity 0.8.21. At that point we should remove these events.\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Emitted when the beacon is changed.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev The `implementation` of the proxy is invalid.\n     */\n    error ERC1967InvalidImplementation(address implementation);\n\n    /**\n     * @dev The `admin` of the proxy is invalid.\n     */\n    error ERC1967InvalidAdmin(address admin);\n\n    /**\n     * @dev The `beacon` of the proxy is invalid.\n     */\n    error ERC1967InvalidBeacon(address beacon);\n\n    /**\n     * @dev An upgrade function sees `msg.value > 0` that may be lost.\n     */\n    error ERC1967NonPayable();\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        if (newImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(newImplementation);\n        }\n        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(newImplementation, data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using\n     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        if (newAdmin == address(0)) {\n            revert ERC1967InvalidAdmin(address(0));\n        }\n        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {IERC1967-AdminChanged} event.\n     */\n    function changeAdmin(address newAdmin) internal {\n        emit AdminChanged(getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        if (newBeacon.code.length == 0) {\n            revert ERC1967InvalidBeacon(newBeacon);\n        }\n\n        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n        address beaconImplementation = IBeacon(newBeacon).implementation();\n        if (beaconImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(beaconImplementation);\n        }\n    }\n\n    /**\n     * @dev Change the beacon and trigger a setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-BeaconUpgraded} event.\n     *\n     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n     * efficiency.\n     */\n    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n     * if an upgrade doesn't perform an initialization call.\n     */\n    function _checkNonPayable() private {\n        if (msg.value > 0) {\n            revert ERC1967NonPayable();\n        }\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {UpgradeableBeacon} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error AddressInsufficientBalance(address account);\n\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedInnerCall();\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert AddressInsufficientBalance(address(this));\n        }\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            revert FailedInnerCall();\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {FailedInnerCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert AddressInsufficientBalance(address(this));\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\n     * unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {FailedInnerCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\n     */\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert FailedInnerCall();\n        }\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "@balancer-labs/=lib/balancer-v2-monorepo/",
        "aura-contracts/=lib/aura-contracts/",
        "balancer-v2-monorepo/=lib/balancer-v2-monorepo/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
        "forge-std/=lib/forge-std/src/",
        "@openzeppelin-contracts/=lib/openzeppelin-contracts/",
        "@openzeppelin/=lib/openzeppelin-contracts/",
        "@openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
        "@openzeppelin-upgradeable-contracts/=lib/openzeppelin-contracts-upgradeable/contracts/",
        "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
        "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
        "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 1
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": true,
      "libraries": {}
    }
  }}