Skip to main content

IChromaticLiquidityCallback.sol

IChromaticLiquidityCallback

Interface for a contract that handles liquidity callbacks in the Chromatic protocol. Liquidity callbacks are used to handle various operations related to liquidity management. This interface defines the function signatures for different types of liquidity callbacks.

addLiquidityCallback

function addLiquidityCallback(address settlementToken, address vault, bytes data) external

Handles the callback after adding liquidity to the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    settlementTokenaddressThe address of the settlement token used for adding liquidity.
    vaultaddressThe address of the vault where the liquidity is added.
    databytesAdditional data associated with the liquidity addition.

addLiquidityBatchCallback

function addLiquidityBatchCallback(address settlementToken, address vault, bytes data) external

Handles the callback after adding liquidity to the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    settlementTokenaddressThe address of the settlement token used for adding liquidity.
    vaultaddressThe address of the vault where the liquidity is added.
    databytesAdditional data associated with the liquidity addition.

claimLiquidityCallback

function claimLiquidityCallback(uint256 receiptId, int16 feeRate, uint256 depositedAmount, uint256 mintedCLBTokenAmount, bytes data) external

Handles the callback after claiming liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    receiptIduint256The ID of the liquidity claim receipt.
    feeRateint16The trading fee rate associated with the liquidity claim.
    depositedAmountuint256The amount of liquidity deposited.
    mintedCLBTokenAmountuint256The amount of CLB tokens minted as liquidity.
    databytesAdditional data associated with the liquidity claim.

claimLiquidityBatchCallback

function claimLiquidityBatchCallback(uint256[] receiptIds, int16[] feeRates, uint256[] depositedAmounts, uint256[] mintedCLBTokenAmounts, bytes data) external

Handles the callback after claiming liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    receiptIdsuint256[]The array of the liquidity receipt IDs.
    feeRatesint16[]The array of trading fee rates associated with each claim in the batch.
    depositedAmountsuint256[]The array of deposited liquidity amounts for each receipt in the batch.
    mintedCLBTokenAmountsuint256[]The array of CLB token amounts minted for each receipt in the batch.
    databytesAdditional data associated with the liquidity claim.

removeLiquidityCallback

function removeLiquidityCallback(address clbToken, uint256 clbTokenId, bytes data) external

Handles the callback after removing liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    clbTokenaddressThe address of the Chromatic liquidity token.
    clbTokenIduint256The ID of the Chromatic liquidity token to be removed.
    databytesAdditional data associated with the liquidity removal.

removeLiquidityBatchCallback

function removeLiquidityBatchCallback(address clbToken, uint256[] clbTokenIds, bytes data) external

Handles the callback after removing liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    clbTokenaddressThe address of the Chromatic liquidity token.
    clbTokenIdsuint256[]The array of the Chromatic liquidity token IDs to be removed.
    databytesAdditional data associated with the liquidity removal.

withdrawLiquidityCallback

function withdrawLiquidityCallback(uint256 receiptId, int16 feeRate, uint256 withdrawnAmount, uint256 burnedCLBTokenAmount, bytes data) external

Handles the callback after withdrawing liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    receiptIduint256The ID of the liquidity withdrawal receipt.
    feeRateint16The trading fee rate associated with the liquidity withdrawal.
    withdrawnAmountuint256The amount of liquidity that has been withdrawn.
    burnedCLBTokenAmountuint256The amount of CLB tokens burned during the withdrawal.
    databytesAdditional data associated with the liquidity withdrawal.

withdrawLiquidityBatchCallback

function withdrawLiquidityBatchCallback(uint256[] receiptIds, int16[] feeRates, uint256[] withdrawnAmounts, uint256[] burnedCLBTokenAmounts, bytes data) external

Handles the callback after withdrawing liquidity from the Chromatic protocol.

  • Parameters:

    NameTypeDescription
    receiptIdsuint256[]The array of the liquidity receipt IDs.
    feeRatesint16[]The array of trading fee rates associated with each withdrawal in the batch.
    withdrawnAmountsuint256[]The array of withdrawn liquidity amounts for each receipt in the batch.
    burnedCLBTokenAmountsuint256[]The array of CLB token amounts burned for each receipt in the batch.
    databytesAdditional data associated with the liquidity withdrawal.