Skip to main content
Version: 1.16.0

Class: SetRateLimitAdmin

Defined in: cct/evm/token-pool/operations/set-rate-limit-admin.ts:69

Assigns a TokenPool's rate-limit admin role (v1.5.0–v1.6.1). Owner-only; removed in v2.0.0 in favour of SetDynamicConfig.

Extends​

Constructors​

Constructor​

new SetRateLimitAdmin(): SetRateLimitAdmin

Returns​

SetRateLimitAdmin

Inherited from​

EVMOperation<SetRateLimitAdminParams>.constructor

Properties​

name​

readonly name: "setRateLimitAdmin" = 'setRateLimitAdmin'

Defined in: cct/evm/token-pool/operations/set-rate-limit-admin.ts:70

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

Overrides​

EVMOperation.name

Methods​

buildUnsigned()​

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

Defined in: cct/evm/token-pool/operations/set-rate-limit-admin.ts:104

Resolves the pool's type/version, confirms sender (when given) is the pool owner, then floor-matches the encoder against that version.

Parameters​

ParameterType
chainEVMChain
paramsSetRateLimitAdminParams

Returns​

Promise<UnsignedEVMTx>

Remarks​

The owner check lives here, not only in execute, so the offline / multisig path gets it too: generateUnsignedSetRateLimitAdmin with an unauthorized sender would otherwise hand back a fully-formed transaction that reverts Unauthorized only after being reviewed and signed. Every sibling owner-gated pool write gates in buildUnsigned for the same reason.

Throws​

CCTOperationUnsupportedError on a v2.0.0 pool — the selector was removed; use SetDynamicConfig

Throws​

CCTParamsInvalidError if sender is given and is not the pool owner

Overrides​

EVMOperation.buildUnsigned


execute()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsEVMExecuteParams<SetRateLimitAdminParams>

Returns​

Promise<TransactionResult>

Inherited from​

EVMOperation.execute


generate()​

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

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

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

Parameters​

ParameterType
chainEVMChain
paramsSetRateLimitAdminParams

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

Defined in: cct/evm/token-pool/operations/set-rate-limit-admin.ts:83

Validates both addresses before any RPC; a zero newRateLimitAdmin clears the role.

Parameters​

ParameterType
paramsSetRateLimitAdminParams

Returns​

SetRateLimitAdminParams

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