StrategPositionManagerFactory
Factory contract for creating and managing Strateg Position Managers. It allows the deployment of new position managervand the management of position manager types
Methods
addNewPositionManagerType
Parameters
name
string
undefined
implementation
address
undefined
info
address
undefined
deployNewPositionManagers
Deploys new position managers based on the specified types and initializes them with the provided parameters.
This function creates new position managers, initializes them, and emits a NewPositionManager event for each.
Parameters
_owner
address
The owner of the new position managers.
_types
uint256[]
An array of position manager types. Each type corresponds to a PositionManagerType struct.
_blockIndexes
uint256[]
An array of block indexes for the position managers. Used during initialization.
_collaterals
address[]
An array of collateral addresses for the position managers.
_borroweds
address[]
An array of borrowed asset addresses for the position managers.
_params
bytes[]
An array of bytes containing initialization parameters for each position manager.
disablePositionManagerType
Parameters
_type
uint256
undefined
getOwnedPositionManagerBy
Parameters
owner
address
undefined
Returns
_0
address[]
undefined
isPositionManager
Parameters
_0
address
undefined
Returns
_0
bool
undefined
positionManagerLength
Total number of position managers created
Returns
_0
uint256
undefined
positionManagerTypeLength
Total number of position manager types available
Returns
_0
uint256
undefined
positionManagerTypes
Mapping from type ID to PositionManagerType details
Parameters
_0
uint256
undefined
Returns
name
string
undefined
implementation
address
undefined
info
address
undefined
version
uint256
undefined
positionManagers
Mapping from position manager ID to PositionManager details
Parameters
_0
uint256
undefined
Returns
owner
address
undefined
addr
address
undefined
info
address
undefined
pmType
uint256
undefined
renounceOwnership
Leaves the contract without owner. It will not be possible to call onlyOwner
functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
transferOwnership
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
newOwner
address
undefined
upgradePositionManagerType
Parameters
_type
uint256
undefined
_implementation
address
undefined
_info
address
undefined
Events
NewPositionManager
Emitted when a new Position Manager is created.
Parameters
index
uint256
The index of the new Position Manager.
owner
address
The address of the owner of the new Position Manager.
pmType
uint256
The type of the new Position Manager.
collateral
address
The address of the collateral token for the new Position Manager.
borrowed
address
The address of the borrowed token for the new Position Manager.
addr
address
The address of the new Position Manager.
info
address
The address of the info contract associated with the new Position Manager.
NewPositionManagerType
Emitted when a new Position Manager Type is added.
Parameters
index
uint256
The index of the new Position Manager Type.
name
string
The name of the new Position Manager Type.
implementation
address
The address of the implementation of the new Position Manager Type.
info
address
The address of the info contract associated with the new Position Manager Type.
version
uint256
The version of the new Position Manager Type.
OwnershipTransferred
Parameters
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
PositionManagerTypeDisabled
Emitted when a Position Manager Type is disabled.
Parameters
index
uint256
The index of the disabled Position Manager Type.
PositionManagerTypeUpdated
Emitted when an existing Position Manager Type is updated.
Parameters
index
uint256
The index of the updated Position Manager Type.
implementation
address
The new address of the implementation of the updated Position Manager Type.
info
address
The new address of the info contract associated with the updated Position Manager Type.
version
uint256
The new version of the updated Position Manager Type.
Errors
ERC1167FailedCreateClone
A clone instance deployment failed.
InvalidPositionManagerType
returned when the Position Manager Type is invalid.
NotOwner
returned when the caller is not the owner of the Position Manager.
OwnableInvalidOwner
The owner is not a valid owner account. (eg. address(0)
)
Parameters
owner
address
undefined
OwnableUnauthorizedAccount
The caller account is not authorized to perform an operation.
Parameters
account
address
undefined
Last updated