Skip to main content

Class: ChromaticLens

A class representing Chromatic Lens, which provides access to liquidity-related functions.

Constructors

constructor

new ChromaticLens(_client)

Creates a new instance of ChromaticLens.

Parameters

NameTypeDescription
_clientClientThe Chromatic Client instance.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:90

Methods

claimableLiquidities

claimableLiquidities(marketAddress, params): Promise<{ [tradingFeeRate: string | number]: { [oracleVersion: string | number]: ClaimableLiquidityResult; }; }>

Retrieves the claimable liquidities for a given market and parameters.

Parameters

NameTypeDescription
marketAddressstringThe address of the Chromatic Market contract.
params{ oracleVersion: bigint ; tradingFeeRate: number }[]An array of objects containing tradingFeeRate and oracleVersion.

Returns

Promise<{ [tradingFeeRate: string | number]: { [oracleVersion: string | number]: ClaimableLiquidityResult; }; }>

A promise that resolves to an object with mappings between tradingFee and oracleVersion.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:202


contracts

contracts(): Object

Retrieves the ChromaticLens contract.

Returns

Object

The ChromaticLens contract.

NameType
lensChromaticLens

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:103


liquidityBins

liquidityBins(marketAddress): Promise<LiquidityBinResult[]>

Retrieves the liquidity bins for a given market.

Parameters

NameTypeDescription
marketAddressstringThe address of the Chromatic Market contract.

Returns

Promise<LiquidityBinResult[]>

A promise that resolves to an array of LiquidityBinResult.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:114


lpReceipts

lpReceipts(marketAddress, owner?): Promise<LpReceiptStructOutput[]>

Retrieves the LP receipts for a given market and owner.

Parameters

NameTypeDescription
marketAddressstringThe address of the Chromatic Market contract.
owner?stringThe address of the LP owner.

Returns

Promise<LpReceiptStructOutput[]>

A promise that resolves to the LP receipts.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:280


ownedLiquidityBins

ownedLiquidityBins(marketAddress, ownerAddress?): Promise<OwnedLiquidityBinResult[]>

Retrieves the owned liquidity bins for a given market and owner.

Parameters

NameTypeDescription
marketAddressstringThe address of the Chromatic Market contract.
ownerAddress?stringThe address of the liquidity owner.

Returns

Promise<OwnedLiquidityBinResult[]>

A promise that resolves to an array of OwnedLiquidityBinResult.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:146


pendingLiquidityBatch

pendingLiquidityBatch(marketAddress, tradingFeeRates): Promise<PendingLiquidityResult[]>

Retrieves the pending liquidities for a given market and trading fee rates.

Parameters

NameTypeDescription
marketAddressstringThe address of the Chromatic Market contract.
tradingFeeRatesnumber[]An array of tradingFeeRate.

Returns

Promise<PendingLiquidityResult[]>

A promise that resolves to an array of PendingLiquidity.

Defined in

packages/sdk-ethers-v6/src/entities/ChromaticLens.ts:257