ICCIPLockReleaseTokenPool
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
| Name | Type | Description |
|---|---|---|
| rebalancer | address | The 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
| Name | Type | Description |
|---|---|---|
| rebalancer | address | The 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
| Name | Type | Description |
|---|---|---|
| accepts | bool | True 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
| Name | Type | Description |
|---|---|---|
| from | address | The pool to pull liquidity from. |
| amount | uint256 | The amount to transfer. |
Events
LiquidityTransferred
Emitted when liquidity is pulled from another pool into this pool.
event LiquidityTransferred(address indexed from, uint256 amount);
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | The pool the liquidity was pulled from. |
| amount | uint256 | The 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();