Skip to main content
Version: 1.15.0

Function: assertAdvancedPoolHooksOwner()

assertAdvancedPoolHooksOwner(operation: string, chain: EVMChain, advancedPoolHooks: string, sender: string): Promise<void>

Defined in: cct/evm/advanced-pool-hooks/contracts.ts:196

Pre-flights a known sender against the AdvancedPoolHooks owner, so an unauthorized caller fails here instead of as an OnlyCallableByOwner revert after a multisig has signed.

Parameters​

ParameterTypeDescription
operationstringOperation name for error context.
chainEVMChainChain hosting the hooks contract.
advancedPoolHooksstringHooks contract to read.
senderstringProposed transaction sender.

Returns​

Promise<void>

Remarks​

The hooks are a separately owned Ownable2Step contract, not part of the pool: the deployer becomes their owner, and binding them to a pool transfers nothing. A pool owner who did not deploy the hooks cannot write through them, so checking the pool owner instead would pass a sender the hooks then revert.

Throws​

CCTParamsInvalidError if sender is not the current hooks owner.