FundManager

This contract does management related jobs such as controlling fund addresses, checks and gets allowed tokens for a fund, calls FundV1 contract to create clones for each different funds.

Function Calls

FundManager Contract Function Calls

FunctionsDefinitons
getFundMetaGets unique identifier of the fund as parameter get a fund's name and focus and returns them.
getFundsGets all fund addresses and return them.
getDepositAddressForGets unique identifier of the fund as parameter and address of token tracker and return the address of the fund.
getFundAddressGets unique identifier of a fund as parameter and returns the fund’s deposit address.
getAllowedTokensGets unique identifier of a fund as parameter and returns list of allowed tokens for a fund.
isTokenAllowedGets unique identifier of a fund and token address as parameter and check id token is allowed to this fund.
createFundGets name of the fund, focus of the fund, description of the fund, address of underlying Gnosis Safe, Array of allowed token addresses, a Boolean indicating if fund is requestable and a list of checks if fund is requestable as parameters, create a clone of FundV1 contract, and emits an event to blockchain.
createFundWithSafeSimilar to createFund but has 2 additional parameters as address array of owners of the safe and uint256 threshold value. If threshold value is greater than owner’s length than it reverts.
setImplementationGets address of underlying Gnosis Safe sets implementation address and returns Boolean indicating operation result.
_setupSafe?
_encodeSetupGets a list of safe owners, number of required confrimations for a Safe transaction, contract address for optional delegate call, data payload for optional delegate call, a handler for fallback calls to this contract, a token that should be used for the payment, a value sthat should be paid, an address that should receive the payment as parameters and returns encoded bytes representation of the parameters with setup signature.

Creating Clones of FundV1 for Each Fund

FundV1 Clone Creation by FundManager

Inheritance Flow

FundManager Inheritance Relations

Contracts Description Table

ContractTypeBases
Function NameVisibilityMutabilityModifiers
FundManagerImplementationAccessControl, Registered
Public ❗️🛑NO❗️
getFundMetaPublic ❗️NO❗️
getFundsPublic ❗️NO❗️
getDepositAddressForPublic ❗️NO❗️
getFundAddressPublic ❗️NO❗️
getAllowedTokensPublic ❗️NO❗️
isTokenAllowedPublic ❗️NO❗️
createFundExternal ❗️🛑onlyRole
createFundWithSafeExternal ❗️🛑onlyRole
setImplementationExternal ❗️🛑onlyRole
_setupSafeInternal 🔒🛑
_encodeSetupInternal 🔒

Legend

SymbolMeaning
🛑Function can modify state
💵Function is payable