Skip to main content
Version: 1.16.1

Class: CanAcceptLiquidity

Defined in: cct/evm/token-pool/operations/can-accept-liquidity.ts:33

Reads a v1.5.x LockRelease pool's canAcceptLiquidity(): the immutable i_acceptLiquidity its constructor fixed. A pool deployed with it false reverts every deposit with LiquidityNotAccepted for its whole lifetime. provideLiquidity pre-flights this itself.

Extends​

Constructors​

Constructor​

new CanAcceptLiquidity(): CanAcceptLiquidity

Returns​

CanAcceptLiquidity

Inherited from​

EVMQuery<CanAcceptLiquidityParams, CanAcceptLiquidityResult>.constructor

Properties​

name​

readonly name: "canAcceptLiquidity" = 'canAcceptLiquidity'

Defined in: cct/evm/token-pool/operations/can-accept-liquidity.ts:37

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

Overrides​

EVMQuery.name

Methods​

prepare()​

protected prepare(params: CanAcceptLiquidityParams): CanAcceptLiquidityParams

Defined in: cct/evm/token-pool/operations/can-accept-liquidity.ts:40

Parameters​

ParameterType
paramsCanAcceptLiquidityParams

Returns​

CanAcceptLiquidityParams

Throws​

CCTParamsInvalidError if poolAddress is not a valid address

Overrides​

EVMQuery.prepare


query()​

query(chain: EVMChain, params: CanAcceptLiquidityParams): Promise<boolean>

Defined in: cct/query.ts:25

Run prepare and read; no wallet.

Parameters​

ParameterType
chainEVMChain
paramsCanAcceptLiquidityParams

Returns​

Promise<boolean>

Inherited from​

EVMQuery.query


read()​

protected read(chain: EVMChain, __namedParameters: CanAcceptLiquidityParams): Promise<boolean>

Defined in: cct/evm/token-pool/operations/can-accept-liquidity.ts:53

Resolves the pool's type/version before the read, so a pool without the getter reports which of the two reasons applies rather than a bare call failure.

Parameters​

ParameterType
chainEVMChain
__namedParametersCanAcceptLiquidityParams

Returns​

Promise<boolean>

Throws​

CCTContractTypeInvalidError if the pool is a BurnMint pool

Throws​

CCTOperationUnsupportedError on a v1.6.x or v2.0.0 pool (siloed included), which declares no flag: v1.6.x always accepts, v2.0.0 escrows through an ERC20LockBox

Throws​

CCTContractVersionUnsupportedError if the pool reports an unknown version

Overrides​

EVMQuery.read