creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/payloads/IGP28/PayloadIGP28.sol": {
        "content": "pragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\ninterface IGovernorBravo {\n    function _acceptAdmin() external;\n\n    function _setVotingDelay(uint newVotingDelay) external;\n\n    function _setVotingPeriod(uint newVotingPeriod) external;\n\n    function _acceptAdminOnTimelock() external;\n\n    function _setImplementation(address implementation_) external;\n\n    function propose(\n        address[] memory targets,\n        uint[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) external returns (uint);\n\n    function admin() external view returns (address);\n\n    function pendingAdmin() external view returns (address);\n\n    function timelock() external view returns (address);\n\n    function votingDelay() external view returns (uint256);\n\n    function votingPeriod() external view returns (uint256);\n}\n\ninterface ITimelock {\n    function acceptAdmin() external;\n\n    function setDelay(uint delay_) external;\n\n    function setPendingAdmin(address pendingAdmin_) external;\n\n    function queueTransaction(\n        address target,\n        uint value,\n        string memory signature,\n        bytes memory data,\n        uint eta\n    ) external returns (bytes32);\n\n    function executeTransaction(\n        address target,\n        uint value,\n        string memory signature,\n        bytes memory data,\n        uint eta\n    ) external payable returns (bytes memory);\n\n    function pendingAdmin() external view returns (address);\n\n    function admin() external view returns (address);\n\n    function delay() external view returns (uint256);\n}\n\ninterface AdminModuleStructs {\n    struct AddressBool {\n        address addr;\n        bool value;\n    }\n\n    struct AddressUint256 {\n        address addr;\n        uint256 value;\n    }\n\n    struct RateDataV1Params {\n        address token;\n        uint256 kink;\n        uint256 rateAtUtilizationZero;\n        uint256 rateAtUtilizationKink;\n        uint256 rateAtUtilizationMax;\n    }\n\n    struct RateDataV2Params {\n        address token;\n        uint256 kink1;\n        uint256 kink2;\n        uint256 rateAtUtilizationZero;\n        uint256 rateAtUtilizationKink1;\n        uint256 rateAtUtilizationKink2;\n        uint256 rateAtUtilizationMax;\n    }\n\n    struct TokenConfig {\n        address token;\n        uint256 fee;\n        uint256 threshold;\n        uint256 maxUtilization;\n    }\n\n    struct UserSupplyConfig {\n        address user;\n        address token;\n        uint8 mode;\n        uint256 expandPercent;\n        uint256 expandDuration;\n        uint256 baseWithdrawalLimit;\n    }\n\n    struct UserBorrowConfig {\n        address user;\n        address token;\n        uint8 mode;\n        uint256 expandPercent;\n        uint256 expandDuration;\n        uint256 baseDebtCeiling;\n        uint256 maxDebtCeiling;\n    }\n}\n\ninterface IProxy {\n    function setAdmin(address newAdmin_) external;\n\n    function setDummyImplementation(address newDummyImplementation_) external;\n\n    function addImplementation(\n        address implementation_,\n        bytes4[] calldata sigs_\n    ) external;\n\n    function removeImplementation(address implementation_) external;\n\n    function getAdmin() external view returns (address);\n\n    function getDummyImplementation() external view returns (address);\n\n    function getImplementationSigs(\n        address impl_\n    ) external view returns (bytes4[] memory);\n\n    function getSigsImplementation(bytes4 sig_) external view returns (address);\n\n    function readFromStorage(\n        bytes32 slot_\n    ) external view returns (uint256 result_);\n}\n\ninterface IFluidLiquidityAdmin {\n    /// @notice adds/removes auths. Auths generally could be contracts which can have restricted actions defined on contract.\n    ///         auths can be helpful in reducing governance overhead where it's not needed.\n    /// @param authsStatus_ array of structs setting allowed status for an address.\n    ///                     status true => add auth, false => remove auth\n    function updateAuths(\n        AdminModuleStructs.AddressBool[] calldata authsStatus_\n    ) external;\n\n    /// @notice adds/removes guardians. Only callable by Governance.\n    /// @param guardiansStatus_ array of structs setting allowed status for an address.\n    ///                         status true => add guardian, false => remove guardian\n    function updateGuardians(\n        AdminModuleStructs.AddressBool[] calldata guardiansStatus_\n    ) external;\n\n    /// @notice changes the revenue collector address (contract that is sent revenue). Only callable by Governance.\n    /// @param revenueCollector_  new revenue collector address\n    function updateRevenueCollector(address revenueCollector_) external;\n\n    /// @notice changes current status, e.g. for pausing or unpausing all user operations. Only callable by Auths.\n    /// @param newStatus_ new status\n    ///        status = 2 -> pause, status = 1 -> resume.\n    function changeStatus(uint256 newStatus_) external;\n\n    /// @notice                  update tokens rate data version 1. Only callable by Auths.\n    /// @param tokensRateData_   array of RateDataV1Params with rate data to set for each token\n    function updateRateDataV1s(\n        AdminModuleStructs.RateDataV1Params[] calldata tokensRateData_\n    ) external;\n\n    /// @notice                  update tokens rate data version 2. Only callable by Auths.\n    /// @param tokensRateData_   array of RateDataV2Params with rate data to set for each token\n    function updateRateDataV2s(\n        AdminModuleStructs.RateDataV2Params[] calldata tokensRateData_\n    ) external;\n\n    /// @notice updates token configs: fee charge on borrowers interest & storage update utilization threshold.\n    ///         Only callable by Auths.\n    /// @param tokenConfigs_ contains token address, fee & utilization threshold\n    function updateTokenConfigs(\n        AdminModuleStructs.TokenConfig[] calldata tokenConfigs_\n    ) external;\n\n    /// @notice updates user classes: 0 is for new protocols, 1 is for established protocols.\n    ///         Only callable by Auths.\n    /// @param userClasses_ struct array of uint256 value to assign for each user address\n    function updateUserClasses(\n        AdminModuleStructs.AddressUint256[] calldata userClasses_\n    ) external;\n\n    /// @notice sets user supply configs per token basis. Eg: with interest or interest-free and automated limits.\n    ///         Only callable by Auths.\n    /// @param userSupplyConfigs_ struct array containing user supply config, see `UserSupplyConfig` struct for more info\n    function updateUserSupplyConfigs(\n        AdminModuleStructs.UserSupplyConfig[] memory userSupplyConfigs_\n    ) external;\n\n    /// @notice setting user borrow configs per token basis. Eg: with interest or interest-free and automated limits.\n    ///         Only callable by Auths.\n    /// @param userBorrowConfigs_ struct array containing user borrow config, see `UserBorrowConfig` struct for more info\n    function updateUserBorrowConfigs(\n        AdminModuleStructs.UserBorrowConfig[] memory userBorrowConfigs_\n    ) external;\n\n    /// @notice pause operations for a particular user in class 0 (class 1 users can't be paused by guardians).\n    /// Only callable by Guardians.\n    /// @param user_          address of user to pause operations for\n    /// @param supplyTokens_  token addresses to pause withdrawals for\n    /// @param borrowTokens_  token addresses to pause borrowings for\n    function pauseUser(\n        address user_,\n        address[] calldata supplyTokens_,\n        address[] calldata borrowTokens_\n    ) external;\n\n    /// @notice unpause operations for a particular user in class 0 (class 1 users can't be paused by guardians).\n    /// Only callable by Guardians.\n    /// @param user_          address of user to unpause operations for\n    /// @param supplyTokens_  token addresses to unpause withdrawals for\n    /// @param borrowTokens_  token addresses to unpause borrowings for\n    function unpauseUser(\n        address user_,\n        address[] calldata supplyTokens_,\n        address[] calldata borrowTokens_\n    ) external;\n\n    /// @notice         collects revenue for tokens to configured revenueCollector address.\n    /// @param tokens_  array of tokens to collect revenue for\n    /// @dev            Note that this can revert if token balance is < revenueAmount (utilization > 100%)\n    function collectRevenue(address[] calldata tokens_) external;\n\n    /// @notice gets the current updated exchange prices for n tokens and updates all prices, rates related data in storage.\n    /// @param tokens_ tokens to update exchange prices for\n    /// @return supplyExchangePrices_ new supply rates of overall system for each token\n    /// @return borrowExchangePrices_ new borrow rates of overall system for each token\n    function updateExchangePrices(\n        address[] calldata tokens_\n    )\n        external\n        returns (\n            uint256[] memory supplyExchangePrices_,\n            uint256[] memory borrowExchangePrices_\n        );\n}\n\ncontract PayloadIGP28 {\n    uint256 public constant PROPOSAL_ID = 28;\n\n    address public constant PROPOSER =\n        0xA45f7bD6A5Ff45D31aaCE6bCD3d426D9328cea01;\n\n    address public constant PROPOSER_AVO_MULTISIG =\n        0x059A94A72951c0ae1cc1CE3BF0dB52421bbE8210;\n\n    address public constant PROPOSER_AVO_MULTISIG_2 =\n        0x9efdE135CA4832AbF0408c44c6f5f370eB0f35e8;\n\n    IGovernorBravo public constant GOVERNOR =\n        IGovernorBravo(0x0204Cd037B2ec03605CFdFe482D8e257C765fA1B);\n    ITimelock public immutable TIMELOCK =\n        ITimelock(0x2386DC45AdDed673317eF068992F19421B481F4c);\n\n    address public immutable ADDRESS_THIS;\n\n    address public constant TEAM_MULTISIG =\n        0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e;\n\n    IFluidLiquidityAdmin public constant LIQUIDITY =\n        IFluidLiquidityAdmin(0x52Aa899454998Be5b000Ad077a46Bbe360F4e497);\n\n    address public constant ETH_ADDRESS =\n        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n    address public constant wstETH_ADDRESS =\n        0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0;\n    address public constant weETH_ADDRESS =\n        0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee;\n\n    address public constant sUSDe_ADDRESS =\n        0x9D39A5DE30e57443BfF2A8307A4256c8797A3497;\n    address public constant USDC_ADDRESS =\n        0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\n    address public constant USDT_ADDRESS =\n        0xdAC17F958D2ee523a2206206994597C13D831ec7;\n\n    constructor() {\n        ADDRESS_THIS = address(this);\n    }\n\n    function propose(string memory description) external {\n        require(\n            msg.sender == PROPOSER ||\n                msg.sender == TEAM_MULTISIG ||\n                address(this) == PROPOSER_AVO_MULTISIG ||\n                address(this) == PROPOSER_AVO_MULTISIG_2,\n            \"msg.sender-not-allowed\"\n        );\n\n        uint256 totalActions = 1;\n        address[] memory targets = new address[](totalActions);\n        uint256[] memory values = new uint256[](totalActions);\n        string[] memory signatures = new string[](totalActions);\n        bytes[] memory calldatas = new bytes[](totalActions);\n\n        // Action 1: call executePayload on timelock contract to execute payload related to Fluid\n        targets[0] = address(TIMELOCK);\n        values[0] = 0;\n        signatures[0] = \"executePayload(address,string,bytes)\";\n        calldatas[0] = abi.encode(ADDRESS_THIS, \"execute()\", abi.encode());\n\n        uint256 proposedId = GOVERNOR.propose(\n            targets,\n            values,\n            signatures,\n            calldatas,\n            description\n        );\n\n        require(proposedId == PROPOSAL_ID, \"PROPOSAL_IS_NOT_SAME\");\n    }\n\n    function execute() external {\n        require(address(this) == address(TIMELOCK), \"not-valid-caller\");\n\n        // Action 1: Update USDC, USDT & wstETH market rate curve.\n        action1();\n    }\n\n    function verifyProposal() external view {}\n\n    /***********************************|\n    |     Proposal Payload Actions      |\n    |__________________________________*/\n\n    /// @notice Action 1: Update USDC, USDT & wstETH market rate curve.\n    function action1() internal {\n        {\n            AdminModuleStructs.RateDataV1Params[]\n                memory paramsV1_ = new AdminModuleStructs.RateDataV1Params[](2);\n\n            paramsV1_[0] = AdminModuleStructs.RateDataV1Params({\n                token: USDC_ADDRESS, // USDC\n                kink: 93 * 1e2, // 93%\n                rateAtUtilizationZero: 0, // 0%\n                rateAtUtilizationKink: 12 * 1e2, // 12%\n                rateAtUtilizationMax: 25 * 1e2 // 25%\n            });\n\n            paramsV1_[1] = AdminModuleStructs.RateDataV1Params({\n                token: USDT_ADDRESS, // USDT\n                kink: 93 * 1e2, // 93%\n                rateAtUtilizationZero: 0, // 0%\n                rateAtUtilizationKink: 12 * 1e2, // 12%\n                rateAtUtilizationMax: 25 * 1e2 // 25%\n            });\n\n            LIQUIDITY.updateRateDataV1s(paramsV1_);\n        }\n\n        {\n            AdminModuleStructs.RateDataV2Params[]\n                memory paramsV2_ = new AdminModuleStructs.RateDataV2Params[](1);\n\n            paramsV2_[0] = AdminModuleStructs.RateDataV2Params({\n                token: wstETH_ADDRESS, // wstETH\n                kink1: 50 * 1e2, // 50%\n                kink2: 90 * 1e2, // 90%\n                rateAtUtilizationZero: 0, // 0%\n                rateAtUtilizationKink1: 10 * 1e2, // 10%\n                rateAtUtilizationKink2: 10 * 1e2, // 10%\n                rateAtUtilizationMax: 100 * 1e2 // 100%\n            });\n\n            LIQUIDITY.updateRateDataV2s(paramsV2_);\n        }\n\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}