Skip to main content

ICCIPLockReleaseTokenPool

Git Source

Inherits: ICCIPLiquidityContainer

Title: ICCIPLockReleaseTokenPool

The liquidity surface of a Chainlink CCIP LockReleaseTokenPool (version 1.5.1).

The pool keeps no internal liquidity accounting: it releases from and reports its token balance. withdrawLiquidity and provideLiquidity are restricted to the rebalancer, and provideLiquidity additionally requires the pool to have been deployed with liquidity acceptance enabled.

Functions​

getRebalancer​

Returns the rebalancer, or the zero address if none is set.

function getRebalancer() external view returns (address rebalancer);

Returns

NameTypeDescription
rebalanceraddressThe rebalancer.

setRebalancer​

Sets the rebalancer. Restricted to the pool owner. The zero address clears the rebalancer. No event is emitted by the pool.

function setRebalancer(address rebalancer) external;

Parameters

NameTypeDescription
rebalanceraddressThe rebalancer address.

canAcceptLiquidity​

Returns whether the pool accepts liquidity through provideLiquidity. The flag is fixed at pool construction.

function canAcceptLiquidity() external view returns (bool accepts);

Returns

NameTypeDescription
acceptsboolTrue if the pool accepts liquidity.

transferLiquidity​

Pulls liquidity from another lock/release pool into this pool by calling withdrawLiquidity on it. Restricted to the pool owner. This pool must be the rebalancer of from.

function transferLiquidity(address from, uint256 amount) external;

Parameters

NameTypeDescription
fromaddressThe pool to pull liquidity from.
amountuint256The amount to transfer.

Events​

LiquidityTransferred​

Emitted when liquidity is pulled from another pool into this pool.

event LiquidityTransferred(address indexed from, uint256 amount);

Parameters

NameTypeDescription
fromaddressThe pool the liquidity was pulled from.
amountuint256The amount transferred.

Errors​

InsufficientLiquidity​

Thrown when a withdrawal exceeds the pool balance.

error InsufficientLiquidity();

LiquidityNotAccepted​

Thrown when liquidity is provided to a pool deployed without liquidity acceptance.

error LiquidityNotAccepted();