🏭Factory
Factory contract is the main contract of the protocol. It is used to create vault proxies and serves as registry.
View Methods
countVault
Returns the number of vaults from the factory.
Return Value:
getWhitelistedTokens
Returns a list of all whitelisted token addresses.
Return Value:
getFeesReceiver
Returns the address of the fees receiver.
Call Parameters:
Return Value:
isTokenWhitelisted
Checks if a token is whitelisted.
Call Parameters:
Return Value:
getFactoryState
Returns all parameters from the factory.
Return Values:
getVaultState
Returns the parameters of a vault.
Call Parameters:
Return Values:
getVaultOngoingFees
Returns the amount of fees to harvest according to a vault address.
Call Parameters:
Return Values:
getShareState
Returns the share parameters from a vault according to its address.
Call Parameters:
Return Values:
getUserShareState
Returns user's share information according to the vault's address and the user address.
Call Parameters:
Return Values:
getRolesPerVault
Returns the roles names and the addresses of the admins, strategists and harvesters according to a vault address.
Call Parameters:
Return Values:
Write Methods
createVault
Creates a vault with the parameters requested.
This method can only be called by address with VAULT_CREATOR_ROLE.
Call Parameters:
setAccessManager
Settles the new AccessManager.
This method can only be called by the contract owner.
Call Parameters:
setFeesManager
Settles the new FeesManager.
This method can only be called by the contract owner.
Call Parameters:
setHarvester
Settles the new Harvester.
This method can only be called by the contract owner.
Call Parameters:
setSwapContracts
Settles the new aggregator proxy and router.
This method can only be called by the contract owner.
Call Parameters:
setSwapAdapter
Settles the new swap adapter.
This method can only be called by the contract owner.
Call Parameters:
addTokenAndPriceFeedsToWL
Whitelists a tokens and their oracles for vaults.
This method can only be called by the contract owner.
Call Parameters:
removeTokensFromWhitelist
Removes tokens and their oracles from the whitelist.
This method can only be called by the contract owner.
Parameters:
Last updated