SteerPeriphery.sol
You can use this contract to enumerate strategy and vault details but also create, join, and leave vaultsThis function should be used when doing protocol integrations
Methods
createVaultAndDepositGas(uint256,bytes,string,address,string)
function createVaultAndDepositGas(uint256 tokenId, bytes params, string beaconName, address vaultManager, string payloadIpfs) external payable returns (address newVault)
Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | undefined |
| params | bytes | undefined |
| beaconName | string | undefined |
| vaultManager | address | undefined |
| payloadIpfs | string | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| newVault | address | undefined |
createVaultAndStrategy(address,string,string,uint128,uint128,bytes,string,address,string)
function createVaultAndStrategy(address strategyCreator, string name, string execBundle, uint128 maxGasCost, uint128 maxGasPerAction, bytes params, string beaconName, address vaultManager, string payloadIpfs) external payable returns (uint256 tokenId, address newVault)
Parameters
| Name | Type | Description |
|---|---|---|
| strategyCreator | address | undefined |
| name | string | undefined |
| execBundle | string | undefined |
| maxGasCost | uint128 | undefined |
| maxGasPerAction | uint128 | undefined |
| params | bytes | undefined |
| beaconName | string | undefined |
| vaultManager | address | undefined |
| payloadIpfs | string | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | undefined |
| newVault | address | undefined |
deposit(address,uint256,uint256,uint256,uint256,address)
function deposit(address vaultAddress, uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable
Deposits tokens in proportion to the vault's current holdings.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 |
depositAndStake(address,uint256,uint256,uint256,uint256,uint256)
function depositAndStake(address vaultAddress, uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, uint256 poolId) external nonpayable
Deposits tokens in proportion to the vault's current holdings and stake the share.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 |
| poolId | uint256 | The id of the pool in which the share should be staked |
initialize(address,address,address,address,string)
function initialize(address _strategyRegistry, address _vaultRegistry, address _gasVault, address _stakingRewards, string _nodeConfig) external nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| _strategyRegistry | address | undefined |
| _vaultRegistry | address | undefined |
| _gasVault | address | undefined |
| _stakingRewards | address | undefined |
| _nodeConfig | string | undefined |
nodeConfig()
The IPFS reference of the node configuration.
function nodeConfig() external view returns (string)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | 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.
setNodeConfig(string)
function setNodeConfig(string _nodeConfig) external nonpayable
Only for ownerSets the config for node
Parameters
| Name | Type | Description |
|---|---|---|
| _nodeConfig | string | undefined |
strategiesByCreator(address)
function strategiesByCreator(address creator) external view returns (struct IStrategyRegistry.RegisteredStrategy[])
Get the strategies by creator
Parameters
| Name | Type | Description |
|---|---|---|
| creator | 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 |
vaultBalancesByAddressWithFees(address)
function vaultBalancesByAddressWithFees(address vault) external nonpayable returns (struct IMultiPositionManager.VaultBalance balances)
Parameters
| Name | Type | Description |
|---|---|---|
| vault | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| balances | IMultiPositionManager.VaultBalance | undefined |
vaultDetailsByAddress(address)
function vaultDetailsByAddress(address vault) external view returns (struct IMultiPositionManager.VaultDetails details)
Parameters
| Name | Type | Description |
|---|---|---|
| vault | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| details | IMultiPositionManager.VaultDetails | undefined |
vaultsByStrategy(uint256)
function vaultsByStrategy(uint256 strategyId) external view returns (struct IVaultRegistry.VaultData[])
Get the vaults using a given strategy
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 |