Skip to main content
Version: 1.15.0

Class: UpdateAdvancedPoolHooks

Defined in: cct/evm/token-pool/operations/update-advanced-pool-hooks.ts:61

Binds (or detaches) a v2.0.0 TokenPool's AdvancedPoolHooks contract. Owner-only.

Extends​

Constructors​

Constructor​

new UpdateAdvancedPoolHooks(): UpdateAdvancedPoolHooks

Returns​

UpdateAdvancedPoolHooks

Inherited from​

EVMOperation<UpdateAdvancedPoolHooksParams>.constructor

Properties​

name​

readonly name: "updateAdvancedPoolHooks" = 'updateAdvancedPoolHooks'

Defined in: cct/evm/token-pool/operations/update-advanced-pool-hooks.ts:62

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

Overrides​

EVMOperation.name

Methods​

buildUnsigned()​

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

Defined in: cct/evm/token-pool/operations/update-advanced-pool-hooks.ts:93

Resolves the pool, rejects a no-op re-point, confirms the target is an AdvancedPoolHooks, and — when sender is supplied — confirms it is the owner. The encoder resolves first so pre-v2.0.0 pools fail without further reads.

Parameters​

ParameterType
chainEVMChain
paramsUpdateAdvancedPoolHooksParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

The no-op guard is the SDK's: the contract rewrites the slot and emits AdvancedPoolHooksUpdated(hook, hook), indistinguishable from a real re-point in an audit trail.

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 the pool is already bound to advancedPoolHooks

Throws​

CCTContractTypeInvalidError if a non-zero advancedPoolHooks is not an AdvancedPoolHooks contract

Throws​

CCTParamsInvalidError if sender is supplied and is not the pool owner

Overrides​

EVMOperation.buildUnsigned


execute()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsEVMExecuteParams<UpdateAdvancedPoolHooksParams>

Returns​

Promise<TransactionResult>

Inherited from​

EVMOperation.execute


generate()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsUpdateAdvancedPoolHooksParams

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: UpdateAdvancedPoolHooksParams): UpdateAdvancedPoolHooksParams

Defined in: cct/evm/token-pool/operations/update-advanced-pool-hooks.ts:70

Validates, and checksums advancedPoolHooks so buildUnsigned can compare it.

Parameters​

ParameterType
paramsUpdateAdvancedPoolHooksParams

Returns​

UpdateAdvancedPoolHooksParams

Overrides​

EVMOperation.parse


prepare()​

protected prepare(params: UpdateAdvancedPoolHooksParams): UpdateAdvancedPoolHooksParams

Defined in: cct/operation.ts:48

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

Parameters​

ParameterType
paramsUpdateAdvancedPoolHooksParams

Returns​

UpdateAdvancedPoolHooksParams

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(_params: UpdateAdvancedPoolHooksParams): void

Defined in: cct/operation.ts:36

Reject invalid params before any chain RPC. No-op by default: an op that normalizes as it checks does that work in parse instead, and needs no empty stub here.

Parameters​

ParameterType
_paramsUpdateAdvancedPoolHooksParams

Returns​

void

Inherited from​

EVMOperation.validate