Skip to content

FluidDexReservesResolver ​

Git Source

Inherits:Variables, Structs, DexFactoryViews, DexConstantsViews, DexPublicViews, DexActionEstimates

Fluid Dex Reserves resolver Implements various view-only methods to give easy access to Dex protocol reserves data.

Functions ​

constructor ​

solidity
constructor(address factory_) Variables(factory_);

getPool ​

Get a Pool's address and its token addresses

solidity
function getPool(uint256 poolId_) public view returns (Pool memory pool_);

Parameters

NameTypeDescription
poolId_uint256The ID of the Pool

Returns

NameTypeDescription
pool_PoolThe Pool data

getPoolFee ​

Get a Pool's fee

solidity
function getPoolFee(address pool_) public view returns (uint256 fee_);

Parameters

NameTypeDescription
pool_addressThe Pool address

Returns

NameTypeDescription
fee_uint256The Pool fee as 1% = 10000

getAllPools ​

Get an array of all Pool addresses and their token addresses

solidity
function getAllPools() public view returns (Pool[] memory pools_);

Returns

NameTypeDescription
pools_Pool[]An array containing all Pool data

getPoolReserves ​

Get the token addresses, collateral reserves, and debt reserves for a given Pool address

expected to be called via callStatic

solidity
function getPoolReserves(address pool_) public returns (PoolWithReserves memory poolReserves_);

Parameters

NameTypeDescription
pool_addressThe Pool address

Returns

NameTypeDescription
poolReserves_PoolWithReservesThe Pool data with reserves

getPoolsReserves ​

Get an array of Pool addresses, their token addresses, collateral reserves, and debt reserves for a given array of Pool addresses

expected to be called via callStatic

solidity
function getPoolsReserves(address[] memory pools_) public returns (PoolWithReserves[] memory poolsReserves_);

Parameters

NameTypeDescription
pools_address[]The array of Pool addresses

Returns

NameTypeDescription
poolsReserves_PoolWithReserves[]An array containing all Pool data with reserves

getAllPoolsReserves ​

Get an array of all Pool addresses, their token addresses, collateral reserves, and debt reserves

expected to be called via callStatic

solidity
function getAllPoolsReserves() public returns (PoolWithReserves[] memory poolsReserves_);

Returns

NameTypeDescription
poolsReserves_PoolWithReserves[]An array containing all Pool data with reserves