FluidVaultPositionsResolver ​
This contract resolves positions for Fluid Vaults, providing functionality to retrieve NFT IDs and positions for a given vault.
Functions ​
constructor ​
constructor sets the immutable vault resolver and vault factory address
solidity
constructor(IFluidVaultResolver vaultResolver_, IFluidVaultFactory vaultFactory_)
Variables(vaultResolver_, vaultFactory_);
getAllVaultNftIds ​
solidity
function getAllVaultNftIds(address vault_) public view returns (uint256[] memory nftIds_);
getPositionsForNftIds ​
get total positions for vault: Next 32 bits => 210-241 => Total positions
solidity
function getPositionsForNftIds(uint256[] memory nftIds_) public view returns (UserPosition[] memory positions_);
getAllVaultPositions ​
solidity
function getAllVaultPositions(address vault_) public view returns (UserPosition[] memory positions_);
_vaultByNftId ​
solidity
function _vaultByNftId(uint256 nftId_) internal view returns (address vault_);
_getVaultPosition ​
solidity
function _getVaultPosition(
address vault_,
uint256 nftId_,
uint256 vaultSupplyExchangePrice_,
uint256 vaultBorrowExchangePrice_
) internal view returns (UserPosition memory userPosition_);
Errors ​
FluidVaultPositionsResolver__AddressZero ​
thrown if an input param address is zero
solidity
error FluidVaultPositionsResolver__AddressZero();