Skip to main content
Version: 1.15.0

Function: assertPoolOwnershipTransfer()

assertPoolOwnershipTransfer(operation: string, chain: EVMChain, poolAddress: string, newOwner: string, sender?: string): Promise<void>

Defined in: cct/evm/token-pool/contracts.ts:226

Bounds a two-step ownership transfer against the pool's owner(), in one eth_call: sender, when known, must be it, and newOwner must not already be (CannotTransferToSelf). Bounding newOwner against the chain is what makes it hold with no sender.

Parameters​

ParameterTypeDescription
operationstringOperation name, for the error's operation field.
chainEVMChainChain to read the owner from.
poolAddressstringPool being written to.
newOwnerstringThe address being proposed as the next owner.
sender?stringThe address the tx will be sent from, when known.

Returns​

Promise<void>

Throws​

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