SteerPeriphery.sol
You can use this contract to enumerate strategy and vault details but also create, join, and leave vaults
This function should be used when doing protocol integrations
Methods
deposit(address,uint256,uint256,uint256,uint256,address)
Deposits tokens in proportion to the vault's current holdings.
function deposit(address _vaultAddress, uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable
These tokens sit in the vault and are not used for liquidity on Uniswap until the next rebalance.
Parameters
Name | Type | Description |
---|---|---|
_vaultAddress | address | The address of the vault to deposit to |
amount0Desired | uint256 | Max amount of token0 to deposit |
amount1Desired | uint256 | Max amount of token1 to deposit |
amount0Min | uint256 | Revert if resulting amount0 is less than this |
amount1Min | uint256 | Revert if resulting amount1 is less than this |
to | address | Recipient of shares |
initialize(address,address)
function initialize(address _strategyRegistry, address _vaultRegistry) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_strategyRegistry | address | undefined |
_vaultRegistry | address | undefined |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
renounceOwnership()
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
strategiesByCreator(address)
Get the strategies by creator
function strategiesByCreator(address _address) external view returns (struct IStrategyRegistry.RegisteredStrategy[])
Parameters
Name | Type | Description |
---|---|---|
_address | address | The creator of the strategies |
Returns
Name | Type | Description |
---|---|---|
_0 | IStrategyRegistry.RegisteredStrategy[] | The list of strategies created by the creator |
transferOwnership(address)
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
upgradeTo(address)
function upgradeTo(address newImplementation) external nonpayable
Upgrade the implementation of the proxy to newImplementation
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
upgradeToAndCall(address,bytes)
function upgradeToAndCall(address newImplementation, bytes data) external payable
Upgrade the implementation of the proxy to newImplementation
, and subsequently execute the function call encoded in data
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
data | bytes | undefined |
vaultDetailsByAddress(address)
function vaultDetailsByAddress(address _vault) external view returns (struct IUniLiquidityManager.VaultDetails details)
Parameters
Name | Type | Description |
---|---|---|
_vault | address | undefined |
Returns
Name | Type | Description |
---|---|---|
details | IUniLiquidityManager.VaultDetails | undefined |
vaultsByStrategy(uint256)
Get the vaults using a given strategy
function vaultsByStrategy(uint256 _strategyId) external view returns (struct IVaultRegistry.VaultData[])
Parameters
Name | Type | Description |
---|---|---|
_strategyId | uint256 | The strategyId (ERC-721 tokenId) |
Returns
Name | Type | Description |
---|---|---|
_0 | IVaultRegistry.VaultData[] | The list of vault details using the strategy |
Events
AdminChanged
event AdminChanged(address previousAdmin, address newAdmin)
Parameters
Name | Type | Description |
---|---|---|
previousAdmin | address | undefined |
newAdmin | address | undefined |
BeaconUpgraded
event BeaconUpgraded(address indexed beacon)
Parameters
Name | Type | Description |
---|---|---|
beacon indexed | address | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
Upgraded
event Upgraded(address indexed implementation)
Parameters
Name | Type | Description |
---|---|---|
implementation indexed | address | undefined |