UiPoolDataProviderV3
Constructor
constructor(_networkBaseTokenPriceInUsdPriceId, _marketReferenceCurrencyPriceInUsdPriceId) Initializes the contract with the price feed identifiers for the network’s base token (e.g., ETH, BNB) and the market reference currency (usually USD).
Functions
ETH_CURRENCY_UNIT() → uint256 Returns the unit used for ETH-based calculations (usually
1e18
).MKR_ADDRESS() → address Returns the address of the MKR token in this deployment.
bytes32ToString(_bytes32) → string Utility function to convert a
bytes32
value into a readable string.getReservesData(provider) → (AggregatedReserveData[], BaseCurrencyInfo) Returns detailed information about all reserves in the pool.
Inputs:
provider
: Address of the PoolAddressesProvider.
Outputs:
AggregatedReserveData[]
: For each reserve, includes metadata (symbol, decimals), risk parameters (LTV, liquidation thresholds), interest rate data, token addresses (aToken, debt tokens), liquidity info, caps, isolation mode, eMode category data, and pricing data.BaseCurrencyInfo
: Market reference currency unit and USD pricing information.
getReservesList(provider) → address[] Returns the list of all reserve asset addresses in the pool.
getUserReservesData(provider, user) → (UserReserveData[], uint8) Returns all reserve-level data for a specific user.
Inputs:
provider
: Address of the PoolAddressesProvider.user
: The wallet address to query.
Outputs:
UserReserveData[]
: For each reserve, includes the user’s balances, collateral usage, borrowing data (stable and variable debt), and rates.uint8
: The eMode category the user has selected (if any).
marketReferenceCurrencyPriceInUsdPriceId() → bytes32 Returns the price feed identifier for the market reference currency (e.g., USD).
networkBaseTokenPriceInUsdPriceId() → bytes32 Returns the price feed identifier for the network’s base token (e.g., ETH or BNB) in USD.
[
{
"inputs": [
{ "internalType": "bytes32", "name": "_networkBaseTokenPriceInUsdPriceId", "type": "bytes32" },
{ "internalType": "bytes32", "name": "_marketReferenceCurrencyPriceInUsdPriceId", "type": "bytes32" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ETH_CURRENCY_UNIT",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MKR_ADDRESS",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "bytes32", "name": "_bytes32", "type": "bytes32" }],
"name": "bytes32ToString",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [{ "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" }],
"name": "getReservesData",
"outputs": [
{
"internalType": "struct IUiPoolDataProviderV3.AggregatedReserveData[]",
"name": "",
"type": "tuple[]"
},
{
"internalType": "struct IUiPoolDataProviderV3.BaseCurrencyInfo",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" }],
"name": "getReservesList",
"outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" },
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "getUserReservesData",
"outputs": [
{ "internalType": "struct IUiPoolDataProviderV3.UserReserveData[]", "name": "", "type": "tuple[]" },
{ "internalType": "uint8", "name": "", "type": "uint8" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "marketReferenceCurrencyPriceInUsdPriceId",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "networkBaseTokenPriceInUsdPriceId",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
}
]
Last updated
Was this helpful?