Queries

There are some functions can be used to query the Vault information and state.

getTokenAddresses

/// @notice Return token addresses of the Vault
function getTokenAddresses() external view returns (address[2] memory)

getLpParams

Function interface:

/// @notice Gets the current params of the Vault
function getLpParams() external view returns (LpParam[] memory)

getLpParams returns the current parameters of the Vault as an array of LpParam. The below is the structure of the LpParam:

struct LpParam {
  /// The upper tick of the position in Ambient's underlying pool
  int24 upperTick;
  /// The upper tick of the position in Ambient's underlying pool
  int24 lowerTick;
}

getPosition

getPositions

totalAssets

currentTick

previewDeposit

previewWithdraw

convertToShares

convertToAssets

calculateAmount1ForAmount0

calculateAmount0ForAmount1

Last updated