Skip to main content

ChromaticLens.sol

ChromaticLens

A contract that provides utility functions for interacting with Chromatic markets.

CLBBalance

struct CLBBalance {
uint256 tokenId;
uint256 balance;
uint256 totalSupply;
uint256 binValue;
}

router

contract IChromaticRouter router

constructor

constructor(contract IChromaticRouter _router) public

oracleVersion

function oracleVersion(contract IChromaticMarket market, uint256 version) external view returns (struct IOracleProvider.OracleVersion)

Retrieves the OracleVersion for the specified oracle version in the given Chromatic market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe address of the Chromatic market contract.
    versionuint256An oracle version.
  • Return Values:

    NameTypeDescription
    [0]struct IOracleProvider.OracleVersionoracleVersion The OracleVersion for the specified oracle version.

lpReceipts

function lpReceipts(contract IChromaticMarket market, address owner) public view returns (struct LpReceipt[] result)

Retrieves the LP receipts for the specified owner in the given Chromatic market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe address of the Chromatic market contract.
    owneraddressThe address of the LP token owner.
  • Return Values:

    NameTypeDescription
    resultstruct LpReceipt[]An array of LpReceipt containing the LP receipts for the owner.

clbBalanceOf

function clbBalanceOf(contract IChromaticMarket market, address owner) external view returns (struct ChromaticLens.CLBBalance[])

Retrieves the CLB token balances for the specified owner in the given Chromatic market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe address of the Chromatic market contract.
    owneraddressThe address of the CLB token owner.
  • Return Values:

    NameTypeDescription
    [0]struct ChromaticLens.CLBBalance[]An array of CLBBalance containing the CLB token balance information for the owner.

pendingLiquidity

function pendingLiquidity(contract IChromaticMarket market, int16 tradingFeeRate) external view returns (struct PendingLiquidity)

Retrieves the pending liquidity information for a specific trading fee rate in the given Chromatic market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe Chromatic market from which to retrieve the pending liquidity information.
    tradingFeeRateint16The trading fee rate for which to retrieve the pending liquidity.
  • Return Values:

    NameTypeDescription
    [0]struct PendingLiquiditypendingLiquidity An instance of PendingLiquidity representing the pending liquidity information.

pendingLiquidityBatch

function pendingLiquidityBatch(contract IChromaticMarket market, int16[] tradingFeeRates) external view returns (struct PendingLiquidity[])

Retrieves the pending liquidity information for a list of trading fee rates in the given Chromatic market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe Chromatic market from which to retrieve the pending liquidity information.
    tradingFeeRatesint16[]The list of trading fee rates for which to retrieve the pending liquidity.
  • Return Values:

    NameTypeDescription
    [0]struct PendingLiquidity[]pendingLiquidityList An array of PendingLiquidity representing the pending liquidity information for each trading fee rate.

claimableLiquidity

function claimableLiquidity(contract IChromaticMarket market, int16 tradingFeeRate, uint256 _oracleVersion) external view returns (struct ClaimableLiquidity)

Retrieves the claimable liquidity information for a specific trading fee rate and oracle version from the given Chromatic Market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe Chromatic Market from which to retrieve the claimable liquidity information.
    tradingFeeRateint16The trading fee rate for which to retrieve the claimable liquidity.
    _oracleVersionuint256The oracle version for which to retrieve the claimable liquidity.
  • Return Values:

    NameTypeDescription
    [0]struct ClaimableLiquidityclaimableLiquidity An instance of ClaimableLiquidity representing the claimable liquidity information.

claimableLiquidityBatch

function claimableLiquidityBatch(contract IChromaticMarket market, int16[] tradingFeeRates, uint256 _oracleVersion) external view returns (struct ClaimableLiquidity[])

Retrieves the claimable liquidity information for a list of trading fee rates and a specific oracle version from the given Chromatic Market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe Chromatic Market from which to retrieve the claimable liquidity information.
    tradingFeeRatesint16[]The list of trading fee rates for which to retrieve the claimable liquidity.
    _oracleVersionuint256The oracle version for which to retrieve the claimable liquidity.
  • Return Values:

    NameTypeDescription
    [0]struct ClaimableLiquidity[]claimableLiquidityList An array of ClaimableLiquidity representing the claimable liquidity information for each trading fee rate and the oracle version.

liquidityBinStatuses

function liquidityBinStatuses(contract IChromaticMarket market) external view returns (struct LiquidityBinStatus[])

Retrieves the liquidity bin statuses for the specified Chromatic Market.

  • Parameters:

    NameTypeDescription
    marketcontract IChromaticMarketThe Chromatic Market contract for which liquidity bin statuses are retrieved.
  • Return Values:

    NameTypeDescription
    [0]struct LiquidityBinStatus[]statuses An array of LiquidityBinStatus representing the liquidity bin statuses.