101 lines
2.9 KiB
Solidity
101 lines
2.9 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.24;
|
|
|
|
/**
|
|
* @title IConfigRegistry
|
|
* @notice Interface for configuration registry
|
|
* @dev Stores all system parameters and limits
|
|
*/
|
|
interface IConfigRegistry {
|
|
/**
|
|
* @notice Emitted when a parameter is updated
|
|
* @param param Parameter name (encoded as bytes32)
|
|
* @param oldValue Previous value
|
|
* @param newValue New value
|
|
*/
|
|
event ParameterUpdated(
|
|
bytes32 indexed param,
|
|
uint256 oldValue,
|
|
uint256 newValue
|
|
);
|
|
|
|
/**
|
|
* @notice Get maximum number of recursive loops
|
|
* @return maxLoops Maximum loops allowed
|
|
*/
|
|
function getMaxLoops() external view returns (uint256 maxLoops);
|
|
|
|
/**
|
|
* @notice Get maximum flash loan size for an asset
|
|
* @param asset Asset address
|
|
* @return maxFlash Maximum flash loan size
|
|
*/
|
|
function getMaxFlashSize(address asset) external view returns (uint256 maxFlash);
|
|
|
|
/**
|
|
* @notice Get minimum health factor threshold
|
|
* @return minHF Minimum health factor (scaled by 1e18)
|
|
*/
|
|
function getMinHealthFactor() external view returns (uint256 minHF);
|
|
|
|
/**
|
|
* @notice Get target health factor
|
|
* @return targetHF Target health factor (scaled by 1e18)
|
|
*/
|
|
function getTargetHealthFactor() external view returns (uint256 targetHF);
|
|
|
|
/**
|
|
* @notice Check if an asset is allowed
|
|
* @param asset Asset address
|
|
* @return allowed True if asset is allowed
|
|
*/
|
|
function isAllowedAsset(address asset) external view returns (bool allowed);
|
|
|
|
/**
|
|
* @notice Get provider capacity cap
|
|
* @param provider Provider identifier (encoded as bytes32)
|
|
* @return cap Capacity cap
|
|
*/
|
|
function getProviderCap(bytes32 provider) external view returns (uint256 cap);
|
|
|
|
/**
|
|
* @notice Update maximum loops
|
|
* @param newMaxLoops New maximum loops
|
|
*/
|
|
function setMaxLoops(uint256 newMaxLoops) external;
|
|
|
|
/**
|
|
* @notice Update maximum flash size for an asset
|
|
* @param asset Asset address
|
|
* @param newMaxFlash New maximum flash size
|
|
*/
|
|
function setMaxFlashSize(address asset, uint256 newMaxFlash) external;
|
|
|
|
/**
|
|
* @notice Update minimum health factor
|
|
* @param newMinHF New minimum health factor (scaled by 1e18)
|
|
*/
|
|
function setMinHealthFactor(uint256 newMinHF) external;
|
|
|
|
/**
|
|
* @notice Update target health factor
|
|
* @param newTargetHF New target health factor (scaled by 1e18)
|
|
*/
|
|
function setTargetHealthFactor(uint256 newTargetHF) external;
|
|
|
|
/**
|
|
* @notice Add or remove allowed asset
|
|
* @param asset Asset address
|
|
* @param allowed Whether asset is allowed
|
|
*/
|
|
function setAllowedAsset(address asset, bool allowed) external;
|
|
|
|
/**
|
|
* @notice Update provider capacity cap
|
|
* @param provider Provider identifier
|
|
* @param newCap New capacity cap
|
|
*/
|
|
function setProviderCap(bytes32 provider, uint256 newCap) external;
|
|
}
|
|
|