FluidDexResolver ​
Inherits:Variables, DexFactoryViews, DexActionEstimates, DexUserViews
Fluid Dex protocol resolver Implements various view-only methods to give easy access to Dex protocol data.
Functions ​
constructor ​
solidity
constructor(address factory_, address liquidity_, address liquidityResolver_, address deployer_)
Variables(factory_, liquidity_, liquidityResolver_, deployer_);
getDexState ​
Get the current state of a DEX
solidity
function getDexState(address dex_) public view returns (DexState memory state_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
state_ | DexState | A struct containing the current state of the DEX |
getDexConfigs ​
Get the current configurations of a DEX
solidity
function getDexConfigs(address dex_) public view returns (Configs memory configs_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
configs_ | Configs | A struct containing the current configurations of the DEX |
getDexSwapLimitsAndAvailability ​
Get the swap limits and availability for a DEX
solidity
function getDexSwapLimitsAndAvailability(address dex_)
public
view
returns (SwapLimitsAndAvailability memory limitsAndAvailability_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
limitsAndAvailability_ | SwapLimitsAndAvailability | A struct containing the swap limits and availability for the DEX |
getDexEntireData ​
Get the entire data for a DEX
expected to be called via callStatic
solidity
function getDexEntireData(address dex_) public returns (DexEntireData memory data_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
data_ | DexEntireData | A struct containing all the data for the DEX |
getDexEntireDatas ​
Get the entire data for multiple DEXes
expected to be called via callStatic
solidity
function getDexEntireDatas(address[] memory dexes_) public returns (DexEntireData[] memory datas_);
Parameters
Name | Type | Description |
---|---|---|
dexes_ | address[] | An array of DEX addresses |
Returns
Name | Type | Description |
---|---|---|
datas_ | DexEntireData[] | An array of structs containing all the data for each DEX |
getAllDexEntireDatas ​
Get the entire data for all DEXes
expected to be called via callStatic
solidity
function getAllDexEntireDatas() external returns (DexEntireData[] memory datas_);
Returns
Name | Type | Description |
---|---|---|
datas_ | DexEntireData[] | An array of structs containing all the data for all DEXes |
_getDexSwapLimitsAndAvailability ​
get the swap limits and availability for a DEX
solidity
function _getDexSwapLimitsAndAvailability(
address dex_,
address token0_,
address token1_,
uint256 utilizationLimitToken0Percent_,
uint256 utilizationLimitToken1Percent_
) internal view returns (SwapLimitsAndAvailability memory limitsAndAvailability_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
token0_ | address | The address of token0 |
token1_ | address | The address of token1 |
utilizationLimitToken0Percent_ | uint256 | The utilization limit percentage for token0 |
utilizationLimitToken1Percent_ | uint256 | The utilization limit percentage for token1 |
Returns
Name | Type | Description |
---|---|---|
limitsAndAvailability_ | SwapLimitsAndAvailability | A struct containing the swap limits and availability for the DEX |