Skip to main content
Version: 1.15.0

Function: assertOwnable2StepToken()

assertOwnable2StepToken(operation: string, chain: EVMChain, tokenAddress: string): Promise<void>

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

Rejects a v2.0.0 CrossChainToken before an Ownable2Step ownership write is built: it declares neither transferOwnership nor acceptOwnership, and its owner() alias passes the assertTokenOwner pre-flight, so the tx would mine reverted.

Parameters​

ParameterTypeDescription
operationstringOperation name, for the error's operation field.
chainEVMChainChain to read typeAndVersion() from.
tokenAddressstringToken the ownership write targets.

Returns​

Promise<void>

Remarks​

Only v2 reports that type, so any read failure (v1.5.1 predating typeAndVersion(), a revert, a transient error) proceeds and v1.x is untouched.

Throws​

CCTOperationUnsupportedError if the token reports CrossChainToken