Skip to main content
Version: 1.15.0

Class: WithdrawFeeTokens

Defined in: cct/evm/token-pool/operations/withdraw-fee-tokens.ts:45

Withdraws all accrued balances of selected fee tokens. Owner- or feeAdmin-only.

Extends​

Constructors​

Constructor​

new WithdrawFeeTokens(): WithdrawFeeTokens

Returns​

WithdrawFeeTokens

Inherited from​

EVMOperation<WithdrawFeeTokensParams>.constructor

Properties​

name​

readonly name: "withdrawFeeTokens" = 'withdrawFeeTokens'

Defined in: cct/evm/token-pool/operations/withdraw-fee-tokens.ts:46

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

Overrides​

EVMOperation.name

Methods​

buildUnsigned()​

protected buildUnsigned(chain: EVMChain, params: WithdrawFeeTokensParams): Promise<UnsignedEVMTx>

Defined in: cct/evm/token-pool/operations/withdraw-fee-tokens.ts:76

Resolves the v2.0.0 interface and, when known, verifies the owner-or-feeAdmin sender. The encoder is resolved before role reads, so older pools fail without unnecessary RPCs.

Parameters​

ParameterType
chainEVMChain
paramsWithdrawFeeTokensParams

Returns​

Promise<UnsignedEVMTx>

Throws​

CCTContractTypeInvalidError if the pool's reported type is not supported

Throws​

CCTContractVersionUnsupportedError if the pool reports an unknown version

Throws​

CCTOperationUnsupportedError on a pre-v2.0.0 pool

Throws​

CCTParamsInvalidError if sender is supplied and is neither the pool owner nor its configured feeAdmin

Overrides​

EVMOperation.buildUnsigned


execute()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsEVMExecuteParams<WithdrawFeeTokensParams>

Returns​

Promise<TransactionResult>

Inherited from​

EVMOperation.execute


generate()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsWithdrawFeeTokensParams

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


parse()​

protected parse(params: WithdrawFeeTokensParams): WithdrawFeeTokensParams

Defined in: cct/operation.ts:42

Normalize validated params for the builder — defaults, conversions, derived values. Identity by default, so an op that needs no normalization declares nothing.

Parameters​

ParameterType
paramsWithdrawFeeTokensParams

Returns​

WithdrawFeeTokensParams

Inherited from​

EVMOperation.parse


prepare()​

protected prepare(params: WithdrawFeeTokensParams): WithdrawFeeTokensParams

Defined in: cct/operation.ts:48

validate then parse — the single pre-RPC step, before any chain access.

Parameters​

ParameterType
paramsWithdrawFeeTokensParams

Returns​

WithdrawFeeTokensParams

Inherited from​

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


validate()​

protected validate(__namedParameters: WithdrawFeeTokensParams): void

Defined in: cct/evm/token-pool/operations/withdraw-fee-tokens.ts:53

Validates every ABI address before any RPC; an empty token list would mine as a no-op.

Parameters​

ParameterType
__namedParametersWithdrawFeeTokensParams

Returns​

void

Overrides​

EVMOperation.validate