StrategOperatorProxy
This contract serves as a proxy for executing operations on strategy vaults. It requires the OPERATOR_ROLE to perform the operations.
Methods
addressProvider
function addressProvider() external view returns (contract IStrategAddressesProvider)
Mapping of vault addresses to their locked status.
Returns
_0
contract IStrategAddressesProvider
undefined
authority
function authority() external view returns (address)
Returns the current authority.
Returns
_0
address
undefined
initialize
function initialize(address _authority, address _addressProvider) external nonpayable
Initializes the contract by granting the DEFAULT_ADMIN_ROLE to the treasury address.
Parameters
_authority
address
The address of the access manager.
_addressProvider
address
undefined
isConsumingScheduledOp
function isConsumingScheduledOp() external view returns (bytes4)
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
lockVaults
function lockVaults(address[] _vaults) external nonpayable
Locks the specified vaults, preventing any operations on them.
Parameters
_vaults
address[]
Array of vault addresses to be locked.
lockedVault
function lockedVault(address) external view returns (bool)
Mapping of vault addresses to their locked status.
Parameters
_0
address
undefined
Returns
_0
bool
undefined
oracleUpdateOperation
function oracleUpdateOperation(address[] _addresses, uint256[] _prices) external nonpayable
Executes price updates on portal oracle.
Parameters
_addresses
address[]
Addresses of tokens.
_prices
uint256[]
related prices
positionManagerOperation
function positionManagerOperation(address _positionManager, address _payer, uint256 _gasCost, bytes _payload) external nonpayable
Executes the rebalance function on the position manager.
Parameters
_positionManager
address
Address of the position manager.
_payer
address
payer for operation cost
_gasCost
uint256
gas cost to pay for operation
_payload
bytes
Array of dynamic parameter indexes for exiting positions.
setAuthority
function setAuthority(address newAuthority) external nonpayable
Transfers control to a new authority. The caller must be the current authority.
Parameters
newAuthority
address
undefined
unlockVaults
function unlockVaults(address[] _vaults) external nonpayable
Unlocks the specified vaults, allowing operations on them.
Parameters
_vaults
address[]
Array of vault addresses to be unlocked.
userWithdrawalRebalancedNonce
function userWithdrawalRebalancedNonce(address) external view returns (uint256)
Mapping of addresses to their respective withdrawal rebalance nonce.
Parameters
_0
address
undefined
Returns
_0
uint256
undefined
vaultHarvest
function vaultHarvest(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndex, bytes[] _dynParams, bytes _portalPayload) external nonpayable
Executes the harvest function on the strategy vault.
Parameters
_vault
address
Address of the strategy vault.
_payer
address
payer for operation cost
_gasCost
uint256
gas cost to pay for operation
_dynParamsIndex
uint256[]
Array of dynamic parameter indexes.
_dynParams
bytes[]
Array of dynamic parameters.
_portalPayload
bytes
undefined
vaultRebalance
function vaultRebalance(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndexEnter, bytes[] _dynParamsEnter, uint256[] _dynParamsIndexExit, bytes[] _dynParamsExit) external nonpayable
Executes the rebalance function on the strategy vault.
Parameters
_vault
address
Address of the strategy vault.
_payer
address
payer for operation cost
_gasCost
uint256
gas cost to pay for operation
_dynParamsIndexEnter
uint256[]
Array of dynamic parameter indexes for entering positions.
_dynParamsEnter
bytes[]
Array of dynamic parameters for entering positions.
_dynParamsIndexExit
uint256[]
Array of dynamic parameter indexes for exiting positions.
_dynParamsExit
bytes[]
Array of dynamic parameters for exiting positions.
vaultStopStrategy
function vaultStopStrategy(address _vault, address _payer, uint256 _gasCost, uint256[] _dynParamsIndex, bytes[] _dynParams) external nonpayable
Executes the harvest function on the strategy vault.
Parameters
_vault
address
Address of the strategy vault.
_payer
address
payer for operation cost
_gasCost
uint256
gas cost to pay for operation
_dynParamsIndex
uint256[]
Array of dynamic parameter indexes.
_dynParams
bytes[]
Array of dynamic parameters.
vaultWithdrawalRebalance
function vaultWithdrawalRebalance(address _user, address _vault, uint256 _deadline, uint256 _amount, bytes _signature, bytes _portalPayload, bytes _permitParams, uint256[] _dynParamsIndexExit, bytes[] _dynParamsExit) external payable returns (uint256 returnedAssets)
Executes the withdrawalRebalance function on the strategy vault.
Parameters
_user
address
undefined
_vault
address
Address of the strategy vault.
_deadline
uint256
undefined
_amount
uint256
Amount to be withdrawn.
_signature
bytes
Needed if vault need
_portalPayload
bytes
Parameters for executing a swap with returned assets.
_permitParams
bytes
Parameters for executing a permit (optional).
_dynParamsIndexExit
uint256[]
Array of dynamic parameter indexes for exiting positions.
_dynParamsExit
bytes[]
Array of dynamic parameters for exiting positions.
Returns
returnedAssets
uint256
undefined
withdraw
function withdraw(address[] _tokens) external nonpayable
Withdraws fees from the contract and transfers them to the caller.
Parameters
_tokens
address[]
Array of token addresses to withdraw fees from.
Events
AuthorityUpdated
event AuthorityUpdated(address authority)
Authority that manages this contract was updated.
Parameters
authority
address
undefined
Initialized
event Initialized(uint64 version)
Triggered when the contract has been initialized or reinitialized.
Parameters
version
uint64
undefined
PositionManagerRebalanced
event PositionManagerRebalanced(address indexed positionManager, address payer, uint256 gasCost)
Emitted when a position manager is rebalanced.
Parameters
positionManager indexed
address
Address of the position manager that was rebalanced.
payer
address
Address of the payer for the operation cost.
gasCost
uint256
Amount of gas cost paid for the operation.
VaultLocked
event VaultLocked(address indexed vault)
Emitted when a vault is locked.
Parameters
vault indexed
address
Address of the vault that was locked.
VaultStrategyHarvested
event VaultStrategyHarvested(address indexed vault, address payer, uint256 gasCost)
Emitted when a strategy on a vault is harvested.
Parameters
vault indexed
address
Address of the vault where the strategy was harvested.
payer
address
Address of the payer for the operation cost.
gasCost
uint256
Amount of gas cost paid for the operation.
VaultStrategyRebalanced
event VaultStrategyRebalanced(address indexed vault, address payer, uint256 gasCost)
Emitted when a strategy on a vault is rebalanced.
Parameters
vault indexed
address
Address of the vault where the strategy was rebalanced.
payer
address
Address of the payer for the operation cost.
gasCost
uint256
Amount of gas cost paid for the operation.
VaultStrategyStopped
event VaultStrategyStopped(address indexed vault, address payer, uint256 gasCost)
Emitted when a strategy on a vault is stopped.
Parameters
vault indexed
address
Address of the vault where the strategy was stopped.
payer
address
Address of the payer for the operation cost.
gasCost
uint256
Amount of gas cost paid for the operation.
VaultStrategyWithdrawalRebalanced
event VaultStrategyWithdrawalRebalanced(address indexed vault)
Emitted when a withdrawal rebalance is performed on a vault.
Parameters
vault indexed
address
Address of the vault where the withdrawal rebalance was performed.
VaultUnlocked
event VaultUnlocked(address indexed vault)
Emitted when a vault is unlocked.
Parameters
vault indexed
address
Address of the vault that was unlocked.
Errors
AccessManagedInvalidAuthority
error AccessManagedInvalidAuthority(address authority)
Parameters
authority
address
undefined
AccessManagedRequiredDelay
error AccessManagedRequiredDelay(address caller, uint32 delay)
Parameters
caller
address
undefined
delay
uint32
undefined
AccessManagedUnauthorized
error AccessManagedUnauthorized(address caller)
Parameters
caller
address
undefined
AddressEmptyCode
error AddressEmptyCode(address target)
There's no code at target
(it is not a contract).
Parameters
target
address
undefined
AddressInsufficientBalance
error AddressInsufficientBalance(address account)
The ETH balance of the account is not enough to perform the operation.
Parameters
account
address
undefined
DeadlineExceeded
error DeadlineExceeded()
Error for when an operation exceeds the specified deadline.
ECDSAInvalidSignature
error ECDSAInvalidSignature()
The signature derives the address(0)
.
ECDSAInvalidSignatureLength
error ECDSAInvalidSignatureLength(uint256 length)
The signature has an invalid length.
Parameters
length
uint256
undefined
ECDSAInvalidSignatureS
error ECDSAInvalidSignatureS(bytes32 s)
The signature has an S value that is in the upper half order.
Parameters
s
bytes32
undefined
FailedInnerCall
error FailedInnerCall()
A call to an address target failed. The target may have reverted.
InvalidInitialization
error InvalidInitialization()
The contract is already initialized.
NotInitializing
error NotInitializing()
The contract is not initializing.
OnlyUserInteraction
error OnlyUserInteraction()
Error for when an operation is restricted to user interactions only.
PortalExecutionFailed
error PortalExecutionFailed(bytes data)
Error for when portal execution fails.
Parameters
data
bytes
Additional data about the failed execution.
PositionManagerOperationReverted
error PositionManagerOperationReverted(bytes data)
Error for when a position manager operation is reverted.
Parameters
data
bytes
Additional data about the reverted call.
SOPTAllowanceNotSufficient
error SOPTAllowanceNotSufficient()
Error for when the SOPT allowance is not sufficient for an operation.
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
An operation with an ERC20 token failed.
Parameters
token
address
undefined
VaultIsLocked
error VaultIsLocked()
Error for when an operation is attempted on a locked vault.
VaultRebalanceReverted
error VaultRebalanceReverted(bytes data)
Error for when a vault rebalance operation is reverted.
Parameters
data
bytes
Additional data about the reverted call.
Last updated