Class: TransferPoolOwnership
Defined in: cct/evm/token-pool/operations/transfer-pool-ownership.ts:63
Proposes a new TokenPool owner via Ownable2Step transferOwnership. Owner-only.
Extends
EVMOperation<TransferPoolOwnershipParams>
Constructors
Constructor
new TransferPoolOwnership():
TransferPoolOwnership
Returns
TransferPoolOwnership
Inherited from
EVMOperation<TransferPoolOwnershipParams>.constructor
Properties
name
readonlyname:"transferPoolOwnership"='transferPoolOwnership'
Defined in: cct/evm/token-pool/operations/transfer-pool-ownership.ts:64
camelCase id; matches the token-manager facade method and error context.
Overrides
EVMOperation.name
Methods
buildUnsigned()
protectedbuildUnsigned(chain:EVMChain,params:TransferPoolOwnershipParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/token-pool/operations/transfer-pool-ownership.ts:110
Reads the pool's type-and-version, floor-matches the encoder and its interface, then bounds
the transfer against the pool's on-chain owner().
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | TransferPoolOwnershipParams |
Returns
Promise<UnsignedEVMTx>
Remarks
The owner check lives here, not only in execute, so the offline / multisig
path gets it too: generateUnsignedTransferPoolOwnership with an unauthorized sender would
otherwise hand back a fully-formed transaction that reverts only after being reviewed and
signed. Every sibling owner-gated pool write gates in buildUnsigned for the same reason.
Throws
CCTContractTypeInvalidError if poolAddress is not a supported pool type
Throws
CCTParamsInvalidError if sender is given and is not the pool owner, or if
newOwner is already the pool owner
Overrides
EVMOperation.buildUnsigned
execute()
execute(
chain:EVMChain,params:EVMExecuteParams<TransferPoolOwnershipParams>):Promise<TransactionResult>
Defined in: cct/evm/operation.ts:150
generate, then sign and submit; returns the confirmed tx hash.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | EVMExecuteParams<TransferPoolOwnershipParams> |
Returns
Promise<TransactionResult>
Inherited from
EVMOperation.execute
generate()
generate(
chain:EVMChain,params:TransferPoolOwnershipParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/operation.ts:110
Run prepare and buildUnsigned, applying optional sender; no signing.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | TransferPoolOwnershipParams |
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()
protectedprepare(params:TransferPoolOwnershipParams):TransferPoolOwnershipParams
Defined in: cct/evm/token-pool/operations/transfer-pool-ownership.ts:82
Validates both addresses and, when sender is known, rejects a self-transfer — the single
bound the contract puts on newOwner, and free to catch here.
Parameters
| Parameter | Type |
|---|---|
params | TransferPoolOwnershipParams |
Returns
Throws
CCTParamsInvalidError if poolAddress is zero or malformed, newOwner is
malformed, or newOwner equals sender
Overrides
EVMOperation.prepare
resolveWalletSender()
protectedresolveWalletSender(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
| Parameter | Type |
|---|---|
wallet | unknown |
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