PoolFactory

Functions:

Events:

Function initialize(address _poolLogic, address _managerLogic, address assetHandler, address _daoAddress, address _governanceAddress)

Initialize the factory

Parameters:

  • _poolLogic: The pool logic address

  • _managerLogic: The manager logic address

  • assetHandler: 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

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)

Set the DAO address

Parameters:

  • _daoAddress: The address of the DAO

Function setGovernanceAddress(address _governanceAddress)

Set the governance address

Parameters:

  • _governanceAddress: The address of the governance contract

Function setDaoFee(uint256 numerator, uint256 denominator)

Set the DAO fee

Parameters:

  • numerator: The numerator of the DAO fee

  • denominator: The denominator of the DAO fee

Function 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

Get the maximum manager fee

Return Values:

  • The maximum manager fee numerator

  • The maximum manager fee denominator

Function setMaximumManagerFee(uint256 numerator)

Set the maximum manager fee

Parameters:

  • numerator: The numerator of the maximum manager fee

Function setMaximumManagerFeeNumeratorChange(uint256 amount)

Set maximum manager fee numberator change

Parameters:

  • amount: The amount for the maximum manager fee numerator change

Function 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)

Set exit cool down time (in seconds)

Parameters:

  • cooldown: The cool down time in seconds

Function getExitCooldown() → uint256

Get the exit cool down time (in seconds)

Return Values:

  • The exit cool down time in seconds

Function setMaximumSupportedAssetCount(uint256 count)

Set maximum supported asset count

Parameters:

  • count: The maximum supported asset count

Function getMaximumSupportedAssetCount() → uint256

Get maximum supported asset count

Return Values:

  • The maximum supported asset count

Function 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

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

Return type of the asset

Parameters:

  • asset: The address of the asset

Return Values:

  • assetType The type of the asset

Function getAssetHandler() → address

Return the address of the asset handler

Return Values:

  • Address of the asset handler

Function setAssetHandler(address assetHandler)

Set the asset handler address

Parameters:

  • assetHandler: The address of the asset handler

Function 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)

Upgrade pools in batch

Parameters:

  • startIndex: The start index of the pool upgrade

  • endIndex: The end index of the pool upgrade

  • sourceVersion: The source version of the pool upgrade

  • targetVersion: The target version of the pool upgrade

  • data: The calldata for the target address

Function pause()

call the pause the contract

Function unpause()

call the unpause the contract

Function isPaused() → bool

Return the pause status

Return Values:

  • The pause status

Function 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

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

Get address from the Governance contract

Parameters:

  • name: The name of the address

Return Values:

  • destination The destination address

Function getDeployedFunds() → address[]

Return full array of deployed funds

Return Values:

  • Full array of deployed funds

Function 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

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