Skip to main content
Version: 1.16.1

Class: TransferLockboxOwnership

Defined in: cct/evm/lockbox/operations/transfer-lockbox-ownership.ts:41

Proposes a new ERC20LockBox owner via Ownable2Step transferOwnership. Owner-only.

Extends​

Constructors​

Constructor​

new TransferLockboxOwnership(): TransferLockboxOwnership

Returns​

TransferLockboxOwnership

Inherited from​

EVMOperation<TransferLockboxOwnershipParams>.constructor

Properties​

name​

readonly name: "transferLockboxOwnership" = 'transferLockboxOwnership'

Defined in: cct/evm/lockbox/operations/transfer-lockbox-ownership.ts:42

camelCase id; matches the token-manager facade method and error context.

Overrides​

EVMOperation.name

Methods​

buildUnsigned()​

protected buildUnsigned(chain: EVMChain, __namedParameters: TransferLockboxOwnershipParams): Promise<UnsignedEVMTx>

Defined in: cct/evm/lockbox/operations/transfer-lockbox-ownership.ts:83

Confirms lockbox is a deployed, supported ERC20LockBox, then bounds the transfer against its on-chain owner() before building transferOwnership calldata.

Parameters​

ParameterType
chainEVMChain
__namedParametersTransferLockboxOwnershipParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

assertLockbox runs first: transferOwnership sent to an EOA or an undeployed address mines as a successful no-op, and a pool or token answers the same selector, so the wrong contract's ownership would move. Both checks live here, not in execute, so the offline / multisig path gets them too.

Throws​

CCTParamsInvalidError if nothing at lockbox answers typeAndVersion(), sender is given and is not the lockbox owner, or newOwner is already the owner

Throws​

CCTContractTypeInvalidError if lockbox is some other contract, e.g. the pool

Throws​

CCTContractVersionUnsupportedError if it reports an unsupported version

Throws​

CCIPTypeVersionInvalidError if lockbox answers typeAndVersion() with a string that is not a type version pair

Overrides​

EVMOperation.buildUnsigned


execute()​

execute(chain: EVMChain, params: EVMExecuteParams<TransferLockboxOwnershipParams>): Promise<TransactionResult>

Defined in: cct/evm/operation.ts:150

generate, then sign and submit; returns the confirmed tx hash.

Parameters​

ParameterType
chainEVMChain
paramsEVMExecuteParams<TransferLockboxOwnershipParams>

Returns​

Promise<TransactionResult>

Inherited from​

EVMOperation.execute


generate()​

generate(chain: EVMChain, params: TransferLockboxOwnershipParams): Promise<UnsignedEVMTx>

Defined in: cct/evm/operation.ts:110

Run prepare and buildUnsigned, applying optional sender; no signing.

Parameters​

ParameterType
chainEVMChain
paramsTransferLockboxOwnershipParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

Also pins every built transaction to chain.network.chainId (no RPC, known at construction). This is the one point every CCT builder and both execute paths pass through; unpinned, ethers would infer the chain from the eventual signer's provider.

Inherited from​

EVMOperation.generate


prepare()​

protected prepare(params: TransferLockboxOwnershipParams): TransferLockboxOwnershipParams

Defined in: cct/evm/lockbox/operations/transfer-lockbox-ownership.ts:49

Validates the addresses and, when sender is known, rejects a self-transfer.

Parameters​

ParameterType
paramsTransferLockboxOwnershipParams

Returns​

TransferLockboxOwnershipParams

Throws​

CCTParamsInvalidError if lockbox is zero or malformed, newOwner is malformed, or newOwner equals sender

Overrides​

EVMOperation.prepare


resolveWalletSender()​

protected resolveWalletSender(wallet: unknown, sender?: string): Promise<string>

Defined in: cct/evm/operation.ts:130

Resolves the address a signed submission is authorized against: the signing wallet's own. The chain gates on msg.sender, and submit clears any builder-set tx.from before populating the tx (so ethers' own from/signer guard never fires) — an explicit sender that differs from the wallet would therefore let an op's pre-tx checks authorize one address while a different one actually signs, passing every local guard and reverting on-chain. Ops that gate on an on-chain role call this from execute; build with generateUnsigned* instead when the eventual signer isn't known yet, where sender is trusted as given.

Parameters​

ParameterType
walletunknown
sender?string

Returns​

Promise<string>

Throws​

CCIPWalletInvalidError if wallet is not a valid signer

Throws​

CCTParamsInvalidError if sender is given and is not the wallet's address

Inherited from​

EVMOperation.resolveWalletSender