FluidProtocolTypes ​
implements helper methods to filter Fluid protocols by a certain type
State Variables ​
VAULT_T1_TYPE ​
solidity
uint256 internal constant VAULT_T1_TYPE = 10000;
VAULT_T2_SMART_COL_TYPE ​
solidity
uint256 internal constant VAULT_T2_SMART_COL_TYPE = 20000;
VAULT_T3_SMART_DEBT_TYPE ​
solidity
uint256 internal constant VAULT_T3_SMART_DEBT_TYPE = 30000;
VAULT_T4_SMART_COL_SMART_DEBT_TYPE ​
solidity
uint256 internal constant VAULT_T4_SMART_COL_SMART_DEBT_TYPE = 40000;
Functions ​
filterBy ​
filters input addresses_
by protocol type_
. Input addresses must be actual Fluid protocols, otherwise they would be wrongly assumed to be VaultT1 even if they are not Fluid VaultT1 smart contracts. type_
must be a listed constant type of this library. Example usage is to filter all vault addresses at the Vault factory by a certain type, e.g. to not include DEX protocol type vaults.
solidity
function filterBy(address[] memory addresses_, uint256 type_) internal view returns (address[] memory filtered_);