StrategVaultFactory
Factory contract for deploying StrategVault instances.
Methods
ERC3525_VERSION
The current version of the ERC3525 logic contract
Returns
_0
uint256
undefined
VAULT_VERSION
The current version of the vault logic contract
Returns
_0
uint256
undefined
addressIsWhitelistedOnVault
Check if an address is whitelisted on a vault
Parameters
_vault
address
Vault address
_user
address
undefined
Returns
_0
bool
whitelisted Boolean returning if a user is whitelisted
addressProvider
Address provider for the factory, indicating if the factory has been initialized
Returns
_0
contract IStrategAddressesProvider
undefined
authority
Returns the current authority.
Returns
_0
address
undefined
deployNewVault
Deploy a new StrategVault contract.
Parameters
_name
string
The name of the vault.
_symbol
string
The symbol of the vault.
_owner
address
The address of the vault owner.
_asset
address
The address of the underlying asset.
_strategy
uint256
The strategy to be used by the vault.
_bufferSize
uint256
The buffer size for the vault.
_creatorFees
uint256
The creator fees for the vault.
_harvestFees
uint256
The harvest fees for the vault.
_ipfsHash
string
The IPFS hash associated with the vault.
editVaultParams
Edit vault configuration.
Parameters
_user
address
sender from StrategUserInteractions.
_vault
address
Targeted vault
_settings
enum IStrategVault.StrategVaultSettings[]
Array of settings identifier to edits.
_data
bytes[]
Array of values corresponding to settings.
erc3525Implementation
The implementation address of the ERC3525 token
Returns
_0
address
undefined
executeVaultParamsEdit
Edit vault configuration.
Parameters
_vault
address
Targeted vault
_index
uint256
Array of settings identifier to edits.
getBatchVaultAddresses
Get the batch vault addresses for a given array of indices.
Parameters
_indexes
uint256[]
The array of vault index.
Returns
_0
address[]
An array of vault addresses corresponding to the given indices.
getVaultConfiguration
Sets the deposit limits for user and vault.
Parameters
_vault
address
Vault address
Returns
_0
DataTypes.VaultConfigurationMap
_config Vault configuration Bitmap
getVaultDepositLimits
Sets the deposit limits for user and vault.
Parameters
_vault
address
Vault address
Returns
_minUserDeposit
uint256
Minimum user deposit
_maxUserDeposit
uint256
Maximum user deposit
_minVaultDeposit
uint256
Minimum vault deposit
_maxVaultDeposit
uint256
Maximum vault deposit
getVaultHoldingParams
Get holding parameters for a vault
Parameters
_vault
address
Vault address
Returns
token
address
Token to hold
amount
uint256
Amount to hold
getVaultMinimalDepositLimits
get the min deposit limits for a vault.
Parameters
_vault
address
Vault address
Returns
_0
uint256
_minVaultDeposit Minimum vault deposit
getVaultReadableConfiguration
Return separated vault config bitmap value
Parameters
_vault
address
Vault address
Returns
_middlewareStrategy
uint256
The middleware strategy for the vault.
_limitMode
uint256
The limit mode for the vault.
_timelockDuration
uint256
The timelock duration for the vault.
_creatorFee
uint256
The creator fee for the vault.
_harvestFee
uint256
The harvest fee for the vault.
_protocolFee
uint256
The protocol fee for the vault.
_bufferSize
uint256
The buffer size for the vault.
_bufferDerivation
uint256
The buffer derivation for the vault.
_strategyBlocksLength
uint256
The strategy blocks length for the vault.
_harvestBlocksLength
uint256
The harvest blocks length for the vault.
_lastHarvestIndex
uint256
The last harvest index for the vault.
isConsumingScheduledOp
Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.
Returns
_0
bytes4
undefined
protocolFee
The protocol fee charged for vault operations
Returns
_0
uint256
undefined
setAuthority
Transfers control to a new authority. The caller must be the current authority.
Parameters
newAuthority
address
undefined
setProtocolFee
Set the protocol fee.
Parameters
_fee
uint256
The new protocol fee.
setVaultProtocolFee
Sets the deposit limits for user and vault.
Parameters
_vault
address
Vault address
_fee
uint256
The new vault protocol fee
setVaultStrat
Set the strategy blocks for the vault.
Parameters
_user
address
sender from StrategUserInteractions.
_vault
address
Targeted vault
_positionManagers
address[]
Array of position managers.
_stratBlocks
address[]
Array of strategy blocks.
_stratBlocksParameters
bytes[]
Array of strategy block parameters.
_isFinalBlock
bool[]
undefined
_harvestBlocks
address[]
Array of harvest blocks.
_harvestBlocksParameters
bytes[]
Array of harvest block parameters.
upgradeERC3525
Upgrade the ERC3525 implementation contract.
Parameters
_implementation
address
The address of the new implementation contract.
upgradeVault
Upgrade the vault implementation contract.
Parameters
_implementation
address
The address of the new implementation contract.
vaultDeposit
Edit vault configuration.
Parameters
_user
address
sender from StrategUserInteractions.
_vault
address
Targeted vault
_assets
uint256
Array of settings identifier to edits.
_receiver
address
Array of values corresponding to settings.
vaultImplementation
The implementation address of the vault
Returns
_0
address
undefined
vaultParamsChangeQueue
Mapping from vault address to vault settings update queue
Parameters
_0
address
undefined
_1
uint256
undefined
Returns
initializedAt
uint256
undefined
vaultParamsInitialized
Mapping from vault address to settings timelock
Parameters
_0
address
undefined
Returns
_0
bool
undefined
vaults
Mapping from vault index to vault address
Parameters
_0
uint256
undefined
Returns
_0
address
undefined
vaultsLength
The total number of vaults created by the factory
Returns
_0
uint256
undefined
Events
AuthorityUpdated
Authority that manages this contract was updated.
Parameters
authority
address
undefined
EditWhitelist
Emitted when the whitelist is edited for a vault.
Parameters
vault indexed
address
The address of the vault.
add
bool
Boolean indicating if the address is being added (true) or removed (false).
addr
address
The address being added or removed from the whitelist.
MiddlewareInit
Emitted when middleware is initialized for a vault.
Parameters
vault indexed
address
The address of the vault.
strategy
uint256
The identifier of the strategy.
NewBufferParams
Emitted when buffer parameters are updated for a vault.
Parameters
vault indexed
address
The address of the vault.
bufferSize
uint256
The size of the buffer.
bufferDerivation
uint256
The derivation method of the buffer.
NewDepositLimits
Emitted when deposit limits are updated for a vault.
Parameters
vault indexed
address
The address of the vault.
minUserDeposit
uint256
The minimum deposit amount allowed per user.
maxUserDeposit
uint256
The maximum deposit amount allowed per user.
minVaultDeposit
uint256
The minimum deposit amount allowed for the vault.
maxVaultDeposit
uint256
The maximum deposit amount allowed for the vault.
NewERC2535Implementation
Emitted when StrategERC3525 is upgraded
Parameters
version indexed
uint256
The new version id.
implementation
address
The address of the new implementation.
NewFeeParams
Emitted when fee parameters are updated for a vault.
Parameters
vault indexed
address
The address of the vault.
creatorFees
uint256
The fees allocated to the creator.
harvestFees
uint256
The fees allocated for harvesting.
NewHoldingParams
Emitted when holding parameters are set for a vault.
Parameters
vault indexed
address
The address of the vault.
token
address
The address of the token being held.
amount
uint256
The amount of the token being held.
NewTimelockParams
Emitted when new timelock parameters are set for a vault.
Parameters
vault indexed
address
The address of the vault.
duration
uint256
The duration of the timelock in seconds.
NewVault
Emitted when StrategVault is upgraded
Parameters
id indexed
uint256
The new version id.
addr indexed
address
The address of the new implementation.
name
string
The address of the new implementation.
symbol
string
The address of the new implementation.
asset
address
The address of the new implementation.
owner indexed
address
The address of the new implementation.
erc3525
address
The address of the new implementation.
implementation
address
The address of the new implementation.
ipfsHash
string
The address of the new implementation.
NewVaultImplementation
Emitted when StrategVault is upgraded
Parameters
version indexed
uint256
The new version id.
implementation
address
The address of the new implementation.
NewVaultParametersEditQueueItem
Emitted when fee parameters are updated for a vault.
Parameters
vault indexed
address
The address of the vault.
index
uint256
The fees allocated to the creator.
VaultParametersEditQueueItemExecuted
Emitted when fee parameters are updated for a vault.
Parameters
vault indexed
address
The address of the vault.
index
uint256
The fees allocated to the creator.
Errors
AccessManagedInvalidAuthority
Parameters
authority
address
undefined
AccessManagedRequiredDelay
Parameters
caller
address
undefined
delay
uint32
undefined
AccessManagedUnauthorized
Parameters
caller
address
undefined
BadBufferParams
Error thrown when the buffer parameters are not within acceptable parameters.
BadCreatorFee
Error thrown when the creator fee is not within acceptable parameters.
BadHarvestFee
Error thrown when the harvest fee is not within acceptable parameters.
BadPositionManagerAddress
Error thrown when an invalid position manager address is provided.
DepositExecutionFailed
Error thrown when a deposit execution fails.
Parameters
returnedData
bytes
The data returned from the failed deposit execution.
ERC1167FailedCreateClone
A clone instance deployment failed.
EditParamsQueueIndexOutOfBound
Error thrown when an attempt to edit settings is made before the timelock period has reached.
EditParamsQueueTimelockNotReach
Error thrown when an attempt to edit settings is made before the timelock period has reached.
INVALID_BUFFER_DERIVATION
Error triggered when the buffer derivation is not within the valid range
INVALID_BUFFER_SIZE
Error triggered when the buffer size is not within the valid range
INVALID_CREATOR_FEE
Error triggered when the creator fee is not within the valid range
INVALID_HARVEST_BLOCKS_LENGTH
Error triggered when the harvest blocks length is not within the valid range
INVALID_HARVEST_FEE
Error triggered when the harvest fee is not within the valid range
INVALID_LIMIT_MODE
Error triggered when the limit mode is not within the valid range
INVALID_MIDDLEWARE_STRATEGY
Error triggered when the middleware strategy is not within the valid range
INVALID_PROTOCOL_FEE
Error triggered when the protocol fee is not within the valid range
INVALID_STRATEGY_BLOCKS_LENGTH
Error triggered when the strategy blocks length is not within the valid range
INVALID_TIMELOCK_DURATION
Error triggered when the timelock duration is not within the valid range
InvalidProtocolFee
Error thrown when an invalid protocol fee is set.
NotFactory
Error thrown when the caller is not the factory contract.
NotInitialized
Error thrown when the factory has not been initialized.
NotOwner
Error thrown when the caller is not the owner.
NotUserInteractions
Error thrown when the caller is not the owner.
NotVaultOwner
Error thrown when the caller is not the vault owner.
NotWhitelisted
Error thrown when the caller is not whitelisted.
Last updated