Skip to main content
Version: 1.15.0

Function: assertLockReleasePool()

assertLockReleasePool(operation: string, poolAddress: string, type: "BurnMintTokenPool" | "BurnFromMintTokenPool" | "BurnWithFromMintTokenPool" | "BurnToAddressTokenPool" | "BurnMintWithLockReleaseFlagTokenPool" | "LockReleaseTokenPool" | "SiloedLockReleaseTokenPool"): void

Defined in: cct/evm/token-pool/contracts.ts:257

Guards a LockRelease-only op: the liquidity and rebalancer functions are absent from the BurnMint ABI, so without this the op would hand that Interface an unknown function name and fail as an opaque ethers error instead of naming the real problem.

Parameters​

ParameterTypeDescription
operationstringOperation name, for the error's context.
poolAddressstringToken pool being acted on.
type"BurnMintTokenPool" | "BurnFromMintTokenPool" | "BurnWithFromMintTokenPool" | "BurnToAddressTokenPool" | "BurnMintWithLockReleaseFlagTokenPool" | "LockReleaseTokenPool" | "SiloedLockReleaseTokenPool"Pool type, as resolved by resolveTokenPool.

Returns​

void

Throws​

CCTContractTypeInvalidError if type is not a LockReleaseTokenPoolType