ReservesSetupHelper
Functions
configureReserves(PoolConfigurator configurator, ConfigureReserveInput[] inputParams) Sets up or updates the configuration of reserves in the protocol through the
PoolConfigurator
.configurator
: The PoolConfigurator contract that manages protocol reserve settings.inputParams
: Array of configuration objects containing:asset
: Address of the reserve (e.g., DAI, USDC).baseLTV
: Loan-to-Value ratio (how much can be borrowed against collateral).liquidationThreshold
: Percentage threshold before liquidation occurs.liquidationBonus
: Bonus given to liquidators.reserveFactor
: Portion of interest redirected to the protocol.borrowCap
: Maximum borrow limit.supplyCap
: Maximum supply limit.stableBorrowingEnabled
: If stable rate borrowing is allowed.borrowingEnabled
: If borrowing is enabled at all.flashLoanEnabled
: If flash loans are enabled for this asset.
owner() → address Returns the current owner (admin) of the helper contract.
renounceOwnership() Allows the current owner to give up control of the contract.
transferOwnership(address newOwner) Transfers contract ownership to
newOwner
.
Events
OwnershipTransferred(previousOwner, newOwner) Triggered when ownership of the contract is moved from one address to another.
[
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{ "internalType": "contract PoolConfigurator", "name": "configurator", "type": "address" },
{
"components": [
{ "internalType": "address", "name": "asset", "type": "address" },
{ "internalType": "uint256", "name": "baseLTV", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidationThreshold", "type": "uint256" },
{ "internalType": "uint256", "name": "liquidationBonus", "type": "uint256" },
{ "internalType": "uint256", "name": "reserveFactor", "type": "uint256" },
{ "internalType": "uint256", "name": "borrowCap", "type": "uint256" },
{ "internalType": "uint256", "name": "supplyCap", "type": "uint256" },
{ "internalType": "bool", "name": "stableBorrowingEnabled", "type": "bool" },
{ "internalType": "bool", "name": "borrowingEnabled", "type": "bool" },
{ "internalType": "bool", "name": "flashLoanEnabled", "type": "bool" }
],
"internalType": "struct ReservesSetupHelper.ConfigureReserveInput[]",
"name": "inputParams",
"type": "tuple[]"
}
],
"name": "configureReserves",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Last updated
Was this helpful?