Skip to main content
Version: 1.15.0

Function: assertLockboxCaller()

assertLockboxCaller(operation: string, chain: EVMChain, lockbox: string, account: string): Promise<void>

Defined in: cct/evm/lockbox/contracts.ts:197

Pre-flights account against the lockbox's getAllAuthorizedCallers().

Parameters​

ParameterTypeDescription
operationstringOperation name, for the error's operation field.
chainEVMChainChain to read from.
lockboxstringLockbox being written to.
accountstringThe address the tx will be sent from; compared checksummed.

Returns​

Promise<void>

Remarks​

The check the documented LockRelease sequences stop short of: _validateDepositWithdraw ends in _validateCaller, so a depositor must itself be an authorized caller, not only the pool. Without this the only signal is an UnauthorizedCaller(address) revert (selector 0xd86ad9cf) at wallet-confirmation time, which names neither the lockbox nor the op that cures it. The error names updateLockboxAuthorizedCallers, which grants exactly this.

Throws​

CCTParamsInvalidError if account is not an authorized caller