Skip to main content
Version: 1.15.0

Function: readTokenPoolLockbox()

readTokenPoolLockbox(chain: EVMChain, poolAddress: string): Promise<string>

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

Reads a non-siloed v2.0.0 LockRelease pool's getLockBox() — the ERC20LockBox it escrows through — in one eth_call.

Parameters​

ParameterTypeDescription
chainEVMChainChain to read from.
poolAddressstringNon-siloed v2.0.0 LockRelease pool to read getLockBox() from.

Returns​

Promise<string>

The pool's lockbox, checksummed. Set in the constructor and immutable thereafter.

Remarks​

No dispatch, but callers must resolve the pool first and gate on both halves of the result: getLockBox() exists only at v2.0.0 (pre-2.0.0 pools hold liquidity themselves) and only on the non-siloed LockRelease type — assertNonSiloedLockReleasePool for the type, an explicit v2.0.0 check for the version. Otherwise this reads as a bare revert instead of naming which of the two is wrong. Same reasoning as readTokenPoolRebalancer.