IConfigurator

// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.16;

import { DataTypes } from "../protocol/libraries/types/DataTypes.sol";
import { ConfigTypes } from "../protocol/libraries/types/ConfigTypes.sol";

interface IConfigurator {
    /**
     * @dev Emitted when borrowing is enabled on a reserve
     * @param reserveId The id of the reserve
     **/
    event BorrowingEnabledOnReserve(uint256 indexed reserveId);

    /**
     * @dev Emitted when borrowing is disabled on a reserve
     * @param reserveId The id of the reserve
     **/
    event BorrowingDisabledOnReserve(uint256 indexed reserveId);

    /**
     * @dev Emitted when variable rate borrowing is enabled on a reserve
     * @param reserveId The id of the reserve
     **/
    event VariableRateBorrowingEnabledOnReserve(uint256 indexed reserveId);

    /**
     * @dev Emitted when variable rate borrowing is disabled on a reserve
     * @param reserveId The id of the reserve
     **/
    event VariableRateBorrowingDisabledOnReserve(uint256 indexed reserveId);


    /**
     * @dev Emitted when a reserve is activated
     * @param reserveId The id of the reserve
     **/
    event ReserveActivated(uint256 indexed reserveId);

    /**
     * @dev Emitted when a reserve is deactivated
     * @param reserveId The id of the reserve
     **/
    event ReserveDeactivated(uint256 indexed reserveId);

    /**
     * @dev Emitted when a reserve is frozen
     * @param reserveId The id of the reserve
     **/
    event ReserveFrozen(uint256 indexed reserveId);

    /**
     * @dev Emitted when a reserve is unfrozen
     * @param reserveId The id of the reserve
     **/
    event ReserveUnfrozen(uint256 indexed reserveId);

    /**
     * @dev Emitted when a reserve factor is updated
     * @param reserveId The id of the reserve
     * @param factor The new reserve factor
     **/
    event ReserveFactorChanged(uint256 indexed reserveId, uint256 factor);

    /**
     * @dev Emitted when a reserve interest strategy contract is updated
     * @param reserveId The id of the reserve
     * @param strategy The new address of the interest strategy contract
     **/
    event ReserveInterestRateChanged(uint256 indexed reserveId, address strategy);

    /**
     * @dev Emitted when a reserve collateral configuration is updated
     * @param reserveId The id of the reserve
     * @param ltv The loan to value of the asset when used as NFT
     * @param liquidationThreshold The threshold at which loans using this asset as NFT will be considered undercollateralized
     * @param liquidationBonus The bonus liquidators receive to liquidate this asset
     **/
    event ReserveCollateralConfigurationChanged(
        uint256 indexed reserveId, 
        uint256 ltv,
        uint256 liquidationThreshold,
        uint256 liquidationBonus
    );

    /**
     * @dev Emitted when a reserve auction is updated
     * @param reserveId The id of the reserve
     * @param liquidationBonus The new liquidation bonus
     * @param auctionDuration The new auction duration
     * @param auctionPriceMultiple The dutch auction start price multiple
     **/
    event ReserveAuctionChanged(uint256 indexed reserveId, uint256 liquidationBonus, uint256 auctionDuration, uint256 auctionPriceMultiple);

    /**
     * @dev Emitted when a redeem threshold is updated
     * @param reserveId The id of the reserve
     * @param redeemThreshold The new redeem threshold
     **/
    event ReserveRedeemThresholdChanged(uint256 indexed reserveId, uint256 redeemThreshold);

    /**
     * @dev Emitted when a reserve max supply is updated
     * @param reserveId The id of the reserve
     * @param maxSupply The new maximum supply
     **/
    event ReserveMaxSupplyChanged(uint256 indexed reserveId, uint256 maxSupply);

    /**
     * @dev Emitted when max number of reserves is updated
     * @param maxNumberOfReserves The new maximum number of reserves
     **/
    event MaxNumberOfReservesChanged(uint256 maxNumberOfReserves);

    /**
     * @dev Emitted when the price consumer asset price method is updated
     * @param method The new price consumer method
     **/
    event PriceConsumerAssetPriceMethodChanged(string method);

    /**
     * @dev Emitted when the price consumer NFT price method is updated
     * @param method The new price consumer method
     **/
    event PriceConsumerNftPriceMethodChanged(string method);

    /**
     * @dev Emitted when a reserve is initialized.
     * @param reserveId The id of the reserve
     * @param collateral The address of the underlying collateral of the reserve
     * @param asset The address of the underlying asset of the reserve
     * @param fToken The address of the associated fToken contract
     * @param stableDebtToken The address of the associated stableDebtToken contract
     * @param variableDebtToken The address of the associated variableDebtToken contract
     * @param interestRateStrategyAddress The address of the interest rate strategy for the reserve
     **/
    event ReserveInitialized(
        uint256 indexed reserveId,
        address indexed collateral,
        address indexed asset,
        address fToken,
        address stableDebtToken,
        address variableDebtToken,
        address interestRateStrategyAddress
    );

    /**
     * @dev Emitted when an fToken implementation is upgraded
     * @param reserveId The id of the reserve
     * @param collateral The address of the underlying collateral of the reserve
     * @param asset The address of the underlying asset of the reserve
     * @param proxy The fToken proxy address
     * @param implementation The new fToken implementation
     **/
    event FTokenUpgraded(
        uint256 indexed reserveId,
        address collateral, 
        address asset, 
        address indexed proxy, 
        address indexed implementation
    );

    /**
     * @dev Emitted when the implementation of a debtToken is upgraded
     * @param reserveId The id of the reserve
     * @param collateral The address of the underlying collateral of the reserve
     * @param asset The address of the underlying asset of the reserve
     * @param proxy The debt token proxy address
     * @param implementation The new debtToken implementation
     **/
    event DebtTokenUpgraded(
        uint256 indexed reserveId,
        address collateral, 
        address asset, 
        address indexed proxy, 
        address indexed implementation
    );

    function batchInitLendingPoolReserve(
        ConfigTypes.InitReserveInput[] calldata input
    ) 
        external
        returns (
            address[] memory, 
            address[] memory, 
            address[] memory
        );

    function setActiveFlagOnReserve(
        uint256[] calldata reserveIds, 
        bool flag
    ) external;

    function setBorrowingFlagOnReserve(
        uint256[] calldata reserveIds, 
        bool flag
    ) external;

    function setVariableRateBorrowingFlagOnReserve(
        uint256[] calldata reserveIds, 
        bool flag
    ) external;

    function setFreezeFlagOnReserve(
        uint256[] calldata reserveIds, 
        bool flag
    ) external;

    function setPoolPause(bool val) external;

    function setPoolPausedTime(uint256 startTime, uint256 durationTime) external;

    function setMaxNumberOfReserves(uint256 newVal) external;

    function setReserveFactor(
        uint256[] calldata reserveIds, 
        uint256 reserveFactor
    ) external;

    function setReserveInterestRateAddress(
        uint256[] calldata reserveIds, 
        address rateAddress) external;

    function setReserveCreatorAddress(uint256 reserveId, address creator) external;

    function setReserveCreatorPercentage(uint256 reserveId, uint256 percentage) external;

    function setReserveMaxSupply(
        uint256[] calldata reserveIds, 
        uint256 maxSupply
    ) external;

    function configureReserveAuction(
        uint256[] calldata reserveIds, 
        uint256 liquidationBonus,
        uint256 auctionDuration,
        uint256 auctionPriceMultiple
    ) external;

    function batchConfigReserve(ConfigTypes.ConfigReserveInput[] calldata input) external;
    
    function updateFToken(ConfigTypes.UpdateFTokenInput[] calldata inputs) external;

    function updateStableDebtToken(ConfigTypes.UpdateDebtTokenInput[] calldata inputs) external;

    function updateVariableDebtToken(ConfigTypes.UpdateDebtTokenInput[] calldata inputs) external;

    function approveExecutionDelegateContracts(address[] calldata inputs) external;
}

Last updated