Function: assertTokenOwner()
assertTokenOwner(
operation:string,chain:EVMChain,tokenAddress:string,sender:string):Promise<void>
Defined in: cct/evm/token/contracts.ts:307
Pre-flights sender against the token's on-chain owner() for an owner-gated write, so an
unauthorized caller fails as a CCTParamsInvalidError here instead of as an opaque
OnlyCallableByOwner revert after a multisig has already reviewed and signed. The token-side
counterpart of assertPoolOwner.
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | string | Operation name, for the error's operation field. |
chain | EVMChain | Chain to read the owner from. |
tokenAddress | string | Token being written to. |
sender | string | The address the tx will be sent from; compared checksummed. |
Returns
Promise<void>
Throws
CCTParamsInvalidError if sender is not the token owner