Skip to main content
Version: 1.15.0

Class: ProvideSiloedLiquidity

Defined in: cct/evm/token-pool/operations/provide-siloed-liquidity.ts:77

Deposits tokens into one lane's silo as its rebalancer (v1.6.0–v1.6.1).

Extends​

Constructors​

Constructor​

new ProvideSiloedLiquidity(): ProvideSiloedLiquidity

Returns​

ProvideSiloedLiquidity

Inherited from​

EVMOperation<ProvideSiloedLiquidityParams>.constructor

Properties​

name​

readonly name: "provideSiloedLiquidity" = 'provideSiloedLiquidity'

Defined in: cct/evm/token-pool/operations/provide-siloed-liquidity.ts:78

camelCase id; matches the token-manager facade method and error context.

Overrides​

EVMOperation.name

Methods​

buildUnsigned()​

protected buildUnsigned(chain: EVMChain, params: ProvideSiloedLiquidityParams): Promise<UnsignedEVMTx>

Defined in: cct/evm/token-pool/operations/provide-siloed-liquidity.ts:126

Resolves the pool's type/version, floor-matches the encoder, confirms the lane is siloed, then that sender (when given) is the silo's rebalancer and can fund the deposit.

Parameters​

ParameterType
chainEVMChain
paramsProvideSiloedLiquidityParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

The lane check is a property of the pool, not of the caller, so it runs with or without sender, and first: on an unsiloed lane getChainRebalancer would answer with the unsiloed rebalancer, and the sender check would pass or fail for the wrong reason.

Throws​

CCTContractTypeInvalidError if the pool is not a SiloedLockReleaseTokenPool

Throws​

CCTOperationUnsupportedError on a v2.0.0 pool, which escrows through per-lane lockboxes instead

Throws​

CCTParamsInvalidError if the lane is not siloed, or sender is given and is not the silo's rebalancer

Throws​

CCTTxFailedError if sender holds, or has approved the pool for, less than amount

Throws​

CCTContractVersionUnsupportedError if the pool reports an unknown version

Overrides​

EVMOperation.buildUnsigned


execute()​

execute(chain: EVMChain, params: EVMExecuteParams<ProvideSiloedLiquidityParams>): Promise<TransactionResult>

Defined in: cct/evm/token-pool/operations/provide-siloed-liquidity.ts:156

Signs and submits as the silo's rebalancer, defaulting sender to the signing wallet: the only address that can satisfy buildUnsigned's rebalancer check for a broadcast tx. See EVMOperation.resolveWalletSender for why a divergent sender is rejected rather than signed.

Parameters​

ParameterType
chainEVMChain
paramsEVMExecuteParams<ProvideSiloedLiquidityParams>

Returns​

Promise<TransactionResult>

Throws​

CCIPWalletInvalidError if wallet is not a valid signer

Throws​

CCTParamsInvalidError if sender is given and is not the wallet's address, or the wallet is not the silo's rebalancer

Throws​

CCTTxFailedError if the wallet's balance or its allowance to the pool is below amount

Throws​

CCIPExecTxRevertedError if the tx reverts on-chain

Overrides​

EVMOperation.execute


generate()​

generate(chain: EVMChain, params: ProvideSiloedLiquidityParams): Promise<UnsignedEVMTx>

Defined in: cct/evm/operation.ts:110

Run prepare and buildUnsigned, applying optional sender; no signing.

Parameters​

ParameterType
chainEVMChain
paramsProvideSiloedLiquidityParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

Also pins every built transaction to chain.network.chainId (no RPC, known at construction). This is the one point every CCT builder and both execute paths pass through; unpinned, ethers would infer the chain from the eventual signer's provider.

Inherited from​

EVMOperation.generate


parse()​

protected parse(params: ProvideSiloedLiquidityParams): ProvideSiloedLiquidityParams

Defined in: cct/operation.ts:42

Normalize validated params for the builder — defaults, conversions, derived values. Identity by default, so an op that needs no normalization declares nothing.

Parameters​

ParameterType
paramsProvideSiloedLiquidityParams

Returns​

ProvideSiloedLiquidityParams

Inherited from​

EVMOperation.parse


prepare()​

protected prepare(params: ProvideSiloedLiquidityParams): ProvideSiloedLiquidityParams

Defined in: cct/operation.ts:48

validate then parse — the single pre-RPC step, before any chain access.

Parameters​

ParameterType
paramsProvideSiloedLiquidityParams

Returns​

ProvideSiloedLiquidityParams

Inherited from​

EVMOperation.prepare


resolveWalletSender()​

protected resolveWalletSender(wallet: unknown, sender?: string): Promise<string>

Defined in: cct/evm/operation.ts:130

Resolves the address a signed submission is authorized against: the signing wallet's own. The chain gates on msg.sender, and submit clears any builder-set tx.from before populating the tx (so ethers' own from/signer guard never fires) — an explicit sender that differs from the wallet would therefore let an op's pre-tx checks authorize one address while a different one actually signs, passing every local guard and reverting on-chain. Ops that gate on an on-chain role call this from execute; build with generateUnsigned* instead when the eventual signer isn't known yet, where sender is trusted as given.

Parameters​

ParameterType
walletunknown
sender?string

Returns​

Promise<string>

Throws​

CCIPWalletInvalidError if wallet is not a valid signer

Throws​

CCTParamsInvalidError if sender is given and is not the wallet's address

Inherited from​

EVMOperation.resolveWalletSender


validate()​

protected validate(__namedParameters: ProvideSiloedLiquidityParams): void

Defined in: cct/evm/token-pool/operations/provide-siloed-liquidity.ts:93

Validates the pool, lane and amount before any RPC. Lane 0 and a zero amount both revert on-chain (ChainNotSiloed, LiquidityAmountCannotBeZero).

Parameters​

ParameterType
__namedParametersProvideSiloedLiquidityParams

Returns​

void

Overrides​

EVMOperation.validate