IMaverickV2BoostedPositionFactory
Last updated
Last updated
Creates BP from the specified input parameters. Requirements:
Pool must be from pool factory
BP kind must be supported by the pool
BinIds have to be sorted in ascending order
ratios[0] must be 1e18; ratios are specified in D18 scale
ratio and binId arrays have to be the same length
movement-mode BPs can only have one binId
static-mode BPs can have at most 24 binIds
function createBoostedPosition(IMaverickV2Pool pool, uint32[] memory binIds, uint128[] memory ratios, uint8 kind)
external
returns (IMaverickV2BoostedPosition boostedPosition);
Look up BPs by range of indexes.
function lookup(uint256 startIndex, uint256 endIndex) external view returns (IMaverickV2BoostedPosition[] memory);
Look up BPs by range of indexes for a given pool.
function lookup(IMaverickV2Pool pool, uint256 startIndex, uint256 endIndex)
external
view
returns (IMaverickV2BoostedPosition[] memory);
Returns whether or not input BP was created by this factory.
function isFactoryBoostedPosition(IMaverickV2BoostedPosition) external returns (bool);
Pool factory that all BPs pool must be deployed from.
function poolFactory() external returns (IMaverickV2Factory);
event CreateBoostedPosition(
IMaverickV2Pool pool, uint32[] binIds, uint128[] ratios, uint8 kind, IMaverickV2BoostedPosition boostedPosition
);
error BoostedPositionFactoryNotFactoryPool();
error BoostedPositionFactoryKindNotSupportedByPool(uint8 poolKinds, uint8 kind);
error BoostedPositionFactoryInvalidRatioZero(uint128 ratioZero);
error BoostedPositionFactoryInvalidLengths(uint256 ratioLength, uint256 binIdsLength);
error BoostedPositionFactoryInvalidLengthForKind(uint8 kind, uint256 ratiosLength);
error BoostedPositionFactoryInvalidBinIdOrder(uint32 lastBinId, uint32 thisBinId);
error BoostedPositionFactoryInvalidBinKind(uint8 inputKind, uint8 binKind, uint32 binId);