Function: assertPoolOwner()
assertPoolOwner(
operation:string,chain:EVMChain,poolAddress:string,sender:string):Promise<void>
Defined in: cct/evm/token-pool/contracts.ts:200
Pre-flights sender against the pool's on-chain owner() for an owner-gated write, so an
unauthorized caller fails as a CCTParamsInvalidError here instead of as an opaque
OwnableUnauthorizedAccount revert after a multisig has already reviewed and signed.
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | string | Operation name, for the error's operation field. |
chain | EVMChain | Chain to read the owner from. |
poolAddress | string | Token pool being written to. |
sender | string | The address the tx will be sent from; compared checksummed. |
Returns
Promise<void>
Remarks
A single owner() call, not the full getTokenPoolState query: owner is the only
field this needs and the only one whose getter never changed spelling, so reading it directly
costs one eth_call instead of a second typeAndVersion resolution plus every admin field.
Throws
CCTParamsInvalidError if sender is not the pool owner