FluidDexReservesResolver ​
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 ​
constructor(address factory_) Variables(factory_);
getPool ​
Get a Pool's address and its token addresses
function getPool(uint256 poolId_) public view returns (Pool memory pool_);
Parameters
Name | Type | Description |
---|---|---|
poolId_ | uint256 | The ID of the Pool |
Returns
Name | Type | Description |
---|---|---|
pool_ | Pool | The Pool data |
getPoolFee ​
Get a Pool's fee
function getPoolFee(address pool_) public view returns (uint256 fee_);
Parameters
Name | Type | Description |
---|---|---|
pool_ | address | The Pool address |
Returns
Name | Type | Description |
---|---|---|
fee_ | uint256 | The Pool fee as 1% = 10000 |
getAllPools ​
Get an array of all Pool addresses and their token addresses
function getAllPools() public view returns (Pool[] memory pools_);
Returns
Name | Type | Description |
---|---|---|
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
function getPoolReserves(address pool_) public returns (PoolWithReserves memory poolReserves_);
Parameters
Name | Type | Description |
---|---|---|
pool_ | address | The Pool address |
Returns
Name | Type | Description |
---|---|---|
poolReserves_ | PoolWithReserves | The 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
function getPoolsReserves(address[] memory pools_) public returns (PoolWithReserves[] memory poolsReserves_);
Parameters
Name | Type | Description |
---|---|---|
pools_ | address[] | The array of Pool addresses |
Returns
Name | Type | Description |
---|---|---|
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
function getAllPoolsReserves() public returns (PoolWithReserves[] memory poolsReserves_);
Returns
Name | Type | Description |
---|---|---|
poolsReserves_ | PoolWithReserves[] | An array containing all Pool data with reserves |