PoolFactory
Functions:
Events:
Function initialize(address _poolLogic, address _managerLogic, address assetHandler, address _daoAddress, address _governanceAddress)
initialize(address _poolLogic, address _managerLogic, address assetHandler, address _daoAddress, address _governanceAddress)
Initialize the factory
Parameters:
_poolLogic
: The pool logic address_managerLogic
: The manager logic addressassetHandler
: The address of the asset handler_daoAddress
: The address of the DAO_governanceAddress
: The address of the governance contract
Function createFund(bool _privatePool, address _manager, string _managerName, string _fundName, string _fundSymbol, uint256 _managerFeeNumerator, struct IHasSupportedAsset.Asset[] _supportedAssets) → address fund
createFund(bool _privatePool, address _manager, string _managerName, string _fundName, string _fundSymbol, uint256 _managerFeeNumerator, struct IHasSupportedAsset.Asset[] _supportedAssets) → address fund
Function to create a new fund
Parameters:
_privatePool
: A boolean indicating whether the fund is private or not_manager
: A manager address_managerName
: The name of the manager_fundName
: The name of the fund_fundSymbol
: The symbol of the fund_managerFeeNumerator
: The numerator of the manager fee_supportedAssets
: An array of supported assets
Return Values:
fund Address of the fund
Function setDAOAddress(address _daoAddress)
setDAOAddress(address _daoAddress)
Set the DAO address
Parameters:
_daoAddress
: The address of the DAO
Function setGovernanceAddress(address _governanceAddress)
setGovernanceAddress(address _governanceAddress)
Set the governance address
Parameters:
_governanceAddress
: The address of the governance contract
Function setDaoFee(uint256 numerator, uint256 denominator)
setDaoFee(uint256 numerator, uint256 denominator)
Set the DAO fee
Parameters:
numerator
: The numerator of the DAO feedenominator
: The denominator of the DAO fee
Function getDaoFee() → uint256, uint256
getDaoFee() → uint256, uint256
Get the DAO fee
Return Values:
The numerator of the DAO fee
The denominator of the DAO fee
Function getMaximumManagerFee() → uint256, uint256
getMaximumManagerFee() → uint256, uint256
Get the maximum manager fee
Return Values:
The maximum manager fee numerator
The maximum manager fee denominator
Function setMaximumManagerFee(uint256 numerator)
setMaximumManagerFee(uint256 numerator)
Set the maximum manager fee
Parameters:
numerator
: The numerator of the maximum manager fee
Function setMaximumManagerFeeNumeratorChange(uint256 amount)
setMaximumManagerFeeNumeratorChange(uint256 amount)
Set maximum manager fee numberator change
Parameters:
amount
: The amount for the maximum manager fee numerator change
Function setManagerFeeNumeratorChangeDelay(uint256 delay)
setManagerFeeNumeratorChangeDelay(uint256 delay)
Set manager fee numberator change delay
Parameters:
delay
: The delay in seconds for the manager fee numerator change
Function setExitCooldown(uint256 cooldown)
setExitCooldown(uint256 cooldown)
Set exit cool down time (in seconds)
Parameters:
cooldown
: The cool down time in seconds
Function getExitCooldown() → uint256
getExitCooldown() → uint256
Get the exit cool down time (in seconds)
Return Values:
The exit cool down time in seconds
Function setMaximumSupportedAssetCount(uint256 count)
setMaximumSupportedAssetCount(uint256 count)
Set maximum supported asset count
Parameters:
count
: The maximum supported asset count
Function getMaximumSupportedAssetCount() → uint256
getMaximumSupportedAssetCount() → uint256
Get maximum supported asset count
Return Values:
The maximum supported asset count
Function isValidAsset(address asset) → bool
isValidAsset(address asset) → bool
Return boolean if the asset is supported
Return Values:
True if it's valid asset, false otherwise
Function getAssetPrice(address asset) → uint256 price
getAssetPrice(address asset) → uint256 price
Return the latest price of a given asset
Parameters:
asset
: The address of the asset
Return Values:
price The latest price of a given asset
Function getAssetType(address asset) → uint16 assetType
getAssetType(address asset) → uint16 assetType
Return type of the asset
Parameters:
asset
: The address of the asset
Return Values:
assetType The type of the asset
Function getAssetHandler() → address
getAssetHandler() → address
Return the address of the asset handler
Return Values:
Address of the asset handler
Function setAssetHandler(address assetHandler)
setAssetHandler(address assetHandler)
Set the asset handler address
Parameters:
assetHandler
: The address of the asset handler
Function setPoolStorageVersion(uint256 _poolStorageVersion)
setPoolStorageVersion(uint256 _poolStorageVersion)
Set the pool storage version
Parameters:
_poolStorageVersion
: The pool storage version
Function upgradePoolBatch(uint256 startIndex, uint256 endIndex, uint256 sourceVersion, uint256 targetVersion, bytes data)
upgradePoolBatch(uint256 startIndex, uint256 endIndex, uint256 sourceVersion, uint256 targetVersion, bytes data)
Upgrade pools in batch
Parameters:
startIndex
: The start index of the pool upgradeendIndex
: The end index of the pool upgradesourceVersion
: The source version of the pool upgradetargetVersion
: The target version of the pool upgradedata
: The calldata for the target address
Function pause()
pause()
call the pause the contract
Function unpause()
unpause()
call the unpause the contract
Function isPaused() → bool
isPaused() → bool
Return the pause status
Return Values:
The pause status
Function getGuard(address extContract) → address guard
getGuard(address extContract) → address guard
Get address of the transaction guard
Parameters:
extContract
: The address of the external contract
Return Values:
guard Return the address of the transaction guard
Function getAssetGuard(address extAsset) → address guard
getAssetGuard(address extAsset) → address guard
Get address of the asset guard
Parameters:
extAsset
: The address of the external asset
Return Values:
guard Address of the asset guard
Function getAddress(bytes32 name) → address destination
getAddress(bytes32 name) → address destination
Get address from the Governance contract
Parameters:
name
: The name of the address
Return Values:
destination The destination address
Function getDeployedFunds() → address[]
getDeployedFunds() → address[]
Return full array of deployed funds
Return Values:
Full array of deployed funds
Function getInvestedPools(address user) → address[] investedPools
getInvestedPools(address user) → address[] investedPools
Returns all invested pools by a given user
Parameters:
user
: the user address
Return Values:
investedPools All invested pools by a given user
Function getManagedPools(address manager) → address[] managedPools
getManagedPools(address manager) → address[] managedPools
Returns all managed pools by a given manager
Parameters:
manager
: The manager address
Return Values:
managedPools All managed pools by a given manager
Last updated