Skip to main content
Version: 1.15.0

Type Alias: TransferLiquidityParams

TransferLiquidityParams = { amount: bigint; from: string; poolAddress: string; sender?: string; }

Defined in: cct/evm/token-pool/operations/transfer-liquidity.ts:52

Parameters for TransferLiquidity.

Properties​

amount​

amount: bigint

Defined in: cct/evm/token-pool/operations/transfer-liquidity.ts:72

Amount of the pool's token to move (uint256), in the token's smallest unit.

Remarks​

MaxUint256 is a v1.6.1 sentinel meaning "the source pool's whole balance". A v1.5.x pool has no such branch and would try to withdraw that literal amount, so it is rejected there rather than left to revert. It is also rejected for a siloed from, which pays out of its unsiloed bucket only, never its whole balance.


from​

from: string

Defined in: cct/evm/token-pool/operations/transfer-liquidity.ts:64

Source pool — not the tx sender, which is sender. The pool liquidity is pulled out of, typically the one being replaced; poolAddress is where it lands. Named after the on-chain transferLiquidity(address from, uint256 amount) parameter.

Must already have poolAddress set as its rebalancer, which is what authorizes the withdrawal.


poolAddress​

poolAddress: string

Defined in: cct/evm/token-pool/operations/transfer-liquidity.ts:55

Destination LockRelease pool — the one being written to, and the one that receives the liquidity. Must be non-zero: it is the tx to.


sender?​

optional sender?: string

Defined in: cct/evm/token-pool/operations/transfer-liquidity.ts:79

Owner of the destination pool. Sets tx.from for offline / multisig signing, and when supplied is checked against that pool's on-chain owner() before any calldata is built. Optional for TransferLiquidity.generate; TransferLiquidity.execute defaults it to the signing wallet, so the owner check always runs on a broadcast tx.