StrategUserInteractions
Additional contract to implement permit1, permit2 and ERC2771 features. It is used as main user interactions contract
Methods
addressProvider
The address provider contract.
Returns
_0
contract IStrategAddressesProvider
undefined
authority
Returns the current authority.
Returns
_0
address
undefined
claimERC3525Rewards
Claims rewards for ERC3525 tokens.
Parameters
_erc3525s
address[]
The addresses of the ERC3525 tokens for which to claim rewards.
_tokenIds
uint256[]
The token IDs for which to claim rewards.
deployNewVault
Deploys a new vault with the specified parameters.
This function calls the factory contract to create a new vault.
Parameters
_name
string
The name of the new vault.
_symbol
string
The symbol of the new vault.
_asset
address
The address of the asset token for the vault.
_strategy
uint256
The identifier for the strategy to be used by the vault.
_bufferSize
uint256
The size of the buffer for the vault.
_creatorFees
uint256
The fees to be paid to the creator of the vault.
_harvestFees
uint256
The fees to be paid for harvesting the vault.
_ipfsHash
string
The IPFS hash containing additional information about the vault.
editVaultParams
Edits the parameters of an existing vault.
Parameters
_vault
address
The address of the vault to be edited.
settings
enum IStrategVault.StrategVaultSettings[]
An array of StrategVaultSettings indicating which settings to edit.
data
bytes[]
An array of bytes data corresponding to each setting in settings
.
executeVaultParamsEdit
Edits the parameters of an existing vault.
Parameters
_vault
address
The address of the vault to be edited.
_index
uint256
An array of bytes data corresponding to each setting in settings
.
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
isTrustedForwarder
Checks if the given address is a trusted forwarder.
Overrides the ERC2771Context isTrustedForwarder function to utilize the RELAYER_ROLE.
Parameters
_forwarder
address
The address to check.
Returns
_0
bool
bool True if the address has the RELAYER_ROLE, false otherwise.
portalVaultDeposit
Allows a user to deposit assets into a vault after a portal swap.
Parameters
_sender
address
The address of the vault where assets will be deposited.
_vault
address
The address of the vault where assets will be deposited.
_assets
uint256
The amount of assets to deposit.
_receiver
address
The vault shares receiver
setAuthority
Transfers control to a new authority. The caller must be the current authority.
Parameters
newAuthority
address
undefined
setVaultStrategy
Sets the strategy for a given vault.
This function configures the strategy for a vault by specifying position managers, strategy blocks, their parameters, and harvest blocks.
Parameters
vault
address
The address of the vault for which the strategy is being set.
_positionManagers
address[]
An array of addresses for the position managers associated with the strategy.
_stratBlocks
address[]
An array of addresses for the strategy blocks to be used in the strategy.
_stratBlocksParameters
bytes[]
An array of bytes representing the parameters for each strategy block.
_isFinalBlock
bool[]
An array of booleans indicating whether each corresponding strategy block is a final block in the strategy.
_harvestBlocks
address[]
An array of addresses for the harvest blocks to be used in the strategy.
_harvestBlocksParameters
bytes[]
An array of bytes representing the parameters for each harvest block.
vaultDeposit
Allows a user to deposit assets into a vault.
Parameters
_vault
address
The address of the vault where assets will be deposited.
_assets
uint256
The amount of assets to deposit.
_receiver
address
undefined
_permitParams
bytes
The permit parameters for approving the vault to spend assets on behalf of the sender.
vaultRedeem
Redeems shares from the vault and sends the underlying assets to the sender.
Parameters
_vault
address
The address of the vault from which to redeem shares.
_shares
uint256
The amount of shares to redeem.
_permitParams
bytes
The permit parameters for approving the vault to spend shares on behalf of the sender.
vaultWithdrawalRebalance
Performs a withdrawal rebalance operation on the vault.
Parameters
_vault
address
The address of the vault to perform the withdrawal rebalance on.
_deadline
uint256
The deadline by which the operation must be completed.
_amount
uint256
The amount to withdraw from the vault.
_signature
bytes
The signature for permit-based withdrawals.
_portalPayload
bytes
The payload for interacting with external protocols during the rebalance.
_permitParams
bytes
The permit parameters for approving the vault to spend tokens on behalf of the sender.
_dynParamsIndexExit
uint256[]
Dynamic parameters index for exiting strategies.
_dynParamsExit
bytes[]
Dynamic parameters for exiting strategies.
Returns
returnedAssets
uint256
undefined
Events
AuthorityUpdated
Authority that manages this contract was updated.
Parameters
authority
address
undefined
Errors
AccessManagedInvalidAuthority
Parameters
authority
address
undefined
AccessManagedRequiredDelay
Parameters
caller
address
undefined
delay
uint32
undefined
AccessManagedUnauthorized
Parameters
caller
address
undefined
AddressEmptyCode
There's no code at target
(it is not a contract).
Parameters
target
address
undefined
AddressInsufficientBalance
The ETH balance of the account is not enough to perform the operation.
Parameters
account
address
undefined
BadInput
Triggered when functions inputs are invalid
FailedInnerCall
A call to an address target failed. The target may have reverted.
NotPortal
Triggered when function caller is not the portal
SafeERC20FailedOperation
An operation with an ERC20 token failed.
Parameters
token
address
undefined
Last updated