IMaverickV2BoostedPositionFactory

Functions

createBoostedPosition

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);

lookup

Look up BPs by range of indexes.

function lookup(uint256 startIndex, uint256 endIndex) external view returns (IMaverickV2BoostedPosition[] memory);

lookup

Look up BPs by range of indexes for a given pool.

function lookup(IMaverickV2Pool pool, uint256 startIndex, uint256 endIndex)
    external
    view
    returns (IMaverickV2BoostedPosition[] memory);

isFactoryBoostedPosition

Returns whether or not input BP was created by this factory.

function isFactoryBoostedPosition(IMaverickV2BoostedPosition) external returns (bool);

poolFactory

Pool factory that all BPs pool must be deployed from.

function poolFactory() external returns (IMaverickV2Factory);

Events

CreateBoostedPosition

event CreateBoostedPosition(
    IMaverickV2Pool pool, uint32[] binIds, uint128[] ratios, uint8 kind, IMaverickV2BoostedPosition boostedPosition
);

Errors

BoostedPositionFactoryNotFactoryPool

error BoostedPositionFactoryNotFactoryPool();

BoostedPositionFactoryKindNotSupportedByPool

error BoostedPositionFactoryKindNotSupportedByPool(uint8 poolKinds, uint8 kind);

BoostedPositionFactoryInvalidRatioZero

error BoostedPositionFactoryInvalidRatioZero(uint128 ratioZero);

BoostedPositionFactoryInvalidLengths

error BoostedPositionFactoryInvalidLengths(uint256 ratioLength, uint256 binIdsLength);

BoostedPositionFactoryInvalidLengthForKind

error BoostedPositionFactoryInvalidLengthForKind(uint8 kind, uint256 ratiosLength);

BoostedPositionFactoryInvalidBinIdOrder

error BoostedPositionFactoryInvalidBinIdOrder(uint32 lastBinId, uint32 thisBinId);

BoostedPositionFactoryInvalidBinKind

error BoostedPositionFactoryInvalidBinKind(uint8 inputKind, uint8 binKind, uint32 binId);

Last updated