Module 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_data_provider

@title Pool Data Provider Module @author Aave @notice Provides data about the Aave protocol pool and its reserves

use 0x1::object;
use 0x1::string;
use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config;
use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory;

Struct TokenData

@notice Data structure containing token information @param symbol The token symbol @param token_address The token address

struct TokenData has drop

Function get_all_reserves_tokens

@notice Returns the list of the existing reserves in the pool @return The list of reserves, pairs of symbols and addresses

#[view]
public fun get_all_reserves_tokens(): vector<pool_data_provider::TokenData>

Function get_all_a_tokens

@notice Returns the list of the existing ATokens in the pool @return The list of ATokens, pairs of symbols and addresses

#[view]
public fun get_all_a_tokens(): vector<pool_data_provider::TokenData>

Function get_all_var_tokens

@notice Returns the list of the existing variable debt Tokens in the pool @return The list of variableDebtTokens, pairs of symbols and addresses

#[view]
public fun get_all_var_tokens(): vector<pool_data_provider::TokenData>

Function get_reserve_configuration_data

@notice Returns the configuration data of the reserve @dev Not returning borrow and supply caps for compatibility, nor pause flag @param asset The address of the underlying asset of the reserve @return decimals The number of decimals of the reserve @return ltv The ltv of the reserve @return liquidation_threshold The liquidationThreshold of the reserve @return liquidation_bonus The liquidationBonus of the reserve @return reserve_factor The reserveFactor of the reserve @return usage_as_collateral_enabled True if the usage as collateral is enabled, false otherwise @return borrowing_enabled True if borrowing is enabled, false otherwise @return is_active True if it is active, false otherwise @return is_frozen True if it is frozen, false otherwise

#[view]
public fun get_reserve_configuration_data(asset: address): (u256, u256, u256, u256, u256, bool, bool, bool, bool)

Function get_reserve_emode_category

@notice Returns the efficiency mode category of the reserve @param asset The address of the underlying asset of the reserve @return The eMode id of the reserve

#[view]
public fun get_reserve_emode_category(asset: address): u256

Function get_reserve_caps

@notice Returns the caps parameters of the reserve @param asset The address of the underlying asset of the reserve @return borrow_cap The borrow cap of the reserve @return supply_cap The supply cap of the reserve

#[view]
public fun get_reserve_caps(asset: address): (u256, u256)

Function get_paused

@notice Returns if the pool is paused @param asset The address of the underlying asset of the reserve @return isPaused True if the pool is paused, false otherwise

#[view]
public fun get_paused(asset: address): bool

Function get_siloed_borrowing

@notice Returns the siloed borrowing flag @param asset The address of the underlying asset of the reserve @return True if the asset is siloed for borrowing

#[view]
public fun get_siloed_borrowing(asset: address): bool

Function get_liquidation_protocol_fee

@notice Returns the protocol fee on the liquidation bonus @param asset The address of the underlying asset of the reserve @return The protocol fee on liquidation

#[view]
public fun get_liquidation_protocol_fee(asset: address): u256

Function get_debt_ceiling

@notice Returns the debt ceiling of the reserve @param asset The address of the underlying asset of the reserve @return The debt ceiling of the reserve

#[view]
public fun get_debt_ceiling(asset: address): u256

Function get_debt_ceiling_decimals

@notice Returns the debt ceiling decimals @return The debt ceiling decimals

#[view]
public fun get_debt_ceiling_decimals(): u256

Function get_reserve_data

@notice Returns the reserve data @param asset The address of the underlying asset of the reserve @return accrued_to_treasury_scaled The scaled amount of tokens accrued to treasury that is to be minted @return total_a_token The total supply of the aToken @return total_variable_debt The total variable debt of the reserve @return liquidity_rate The liquidity rate of the reserve @return variable_borrow_rate The variable borrow rate of the reserve @return liquidity_index The liquidity index of the reserve @return variable_borrow_index The variable borrow index of the reserve @return last_update_timestamp The timestamp of the last update of the reserve

#[view]
public fun get_reserve_data(asset: address): (u256, u256, u256, u256, u256, u256, u256, u64)

Function get_a_token_total_supply

@notice Returns the total supply of aTokens for a given asset @param asset The address of the underlying asset of the reserve @return The total supply of the aToken

#[view]
public fun get_a_token_total_supply(asset: address): u256

Function get_total_debt

@notice Returns the total debt for a given asset @param asset The address of the underlying asset of the reserve @return The total debt for asset

#[view]
public fun get_total_debt(asset: address): u256

Function get_user_reserve_data

@notice Returns the user data in a reserve @param asset The address of the underlying asset of the reserve @param user The address of the user @return current_a_token_balance The current AToken balance of the user @return current_variable_debt The current variable debt of the user @return scaled_variable_debt The scaled variable debt of the user @return liquidity_rate The liquidity rate of the reserve @return usage_as_collateral_enabled True if the user is using the asset as collateral, false otherwise

#[view]
public fun get_user_reserve_data(asset: address, user: address): (u256, u256, u256, u256, bool)

Function get_reserve_tokens_addresses

@notice Returns the token addresses of the reserve @param asset The address of the underlying asset of the reserve @return a_token_address The AToken address of the reserve @return variable_debt_token_address The VariableDebtToken address of the reserve

#[view]
public fun get_reserve_tokens_addresses(asset: address): (address, address)

Function get_flash_loan_enabled

@notice Returns whether the reserve has FlashLoans enabled or disabled @param asset The address of the underlying asset of the reserve @return True if FlashLoans are enabled, false otherwise

#[view]
public fun get_flash_loan_enabled(asset: address): bool

Function get_reserve_deficit

@notice Returns the current deficit of a reserve @param asset The address of the underlying asset of the reserve @return The current deficit of the reserve

#[view]
public fun get_reserve_deficit(asset: address): u128