Skip to main content
Version: 1.16.0

Function: assertTokenOwnershipTransfer()

assertTokenOwnershipTransfer(operation: string, chain: EVMChain, tokenAddress: string, newOwner: string, sender?: string, newOwnerParam?: string): Promise<void>

Defined in: cct/evm/token/contracts.ts:296

The token-side assertPoolOwnershipTransfer: bounds a v1 two-step transfer against the token's owner() in one eth_call.

Parameters​

ParameterTypeDefault valueDescription
operationstringundefinedOperation name, for the error's operation field.
chainEVMChainundefinedChain to read the owner from.
tokenAddressstringundefinedToken being written to.
newOwnerstringundefinedThe address being proposed as the next owner.
sender?stringundefinedThe address the tx will be sent from, when known.
newOwnerParam?string'newOwner'Param name newOwner is reported under, e.g. newAdmin for beginDefaultAdminTransfer.

Returns​

Promise<void>

Throws​

CCTParamsInvalidError if sender is not the owner, or newOwner already is