Class: UpdateSiloDesignations
Defined in: cct/evm/token-pool/operations/update-silo-designations.ts:101
Designates and un-designates silos on a siloed pool (v1.6.0–v1.6.1). Owner-only.
Extends
EVMOperation<UpdateSiloDesignationsParams,ParsedUpdateSiloDesignationsParams>
Constructors
Constructor
new UpdateSiloDesignations():
UpdateSiloDesignations
Returns
UpdateSiloDesignations
Inherited from
EVMOperation< UpdateSiloDesignationsParams, ParsedUpdateSiloDesignationsParams >.constructor
Properties
name
readonlyname:"updateSiloDesignations"='updateSiloDesignations'
Defined in: cct/evm/token-pool/operations/update-silo-designations.ts:105
camelCase id; matches the token-manager facade method and error context.
Overrides
EVMOperation.name
Methods
buildUnsigned()
protectedbuildUnsigned(chain:EVMChain,params:ParsedUpdateSiloDesignationsParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/token-pool/operations/update-silo-designations.ts:204
Resolves the pool's type/version, confirms sender (when given) is the pool owner, then
pre-flights every lane against the pool in one parallel batch.
Three state preconditions, each of which reverts the whole batch:
- every
removeslane must be siloed: elseChainNotSiloed. - no
addslane may already be siloed: elseInvalidChainSelector. - every
addslane must be a supported chain: elseInvalidChainSelector.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | ParsedUpdateSiloDesignationsParams |
Returns
Promise<UnsignedEVMTx>
Remarks
The lane checks do not depend on the signer and always run; the owner check is
skipped without a sender. All of them live here, not in execute, so the offline /
multisig path gets them too.
Throws
CCTContractTypeInvalidError if the pool is not a SiloedLockReleaseTokenPool
Throws
CCTOperationUnsupportedError on a v2.0.0 pool
Throws
CCTParamsInvalidError if sender is given and is not the pool owner, or a
lane fails a precondition above
Throws
CCTContractVersionUnsupportedError if the pool reports an unknown version
Overrides
EVMOperation.buildUnsigned
execute()
execute(
chain:EVMChain,params:EVMExecuteParams<UpdateSiloDesignationsParams>):Promise<TransactionResult>
Defined in: cct/evm/token-pool/operations/update-silo-designations.ts:258
Signs and submits as the pool owner, defaulting sender to the signing wallet: the only
address that can satisfy buildUnsigned's owner check for a broadcast tx. See
EVMOperation.resolveWalletSender for why a divergent sender is rejected rather
than signed.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | EVMExecuteParams<UpdateSiloDesignationsParams> |
Returns
Promise<TransactionResult>
Throws
CCIPWalletInvalidError if wallet is not a valid signer
Throws
CCTParamsInvalidError if sender is given and is not the wallet's address,
the wallet is not the pool owner, or any other param is invalid
Throws
CCIPExecTxRevertedError if the tx reverts on-chain
Overrides
EVMOperation.execute
generate()
generate(
chain:EVMChain,params:UpdateSiloDesignationsParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/operation.ts:110
Run prepare and buildUnsigned, applying optional sender; no signing.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | UpdateSiloDesignationsParams |
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()
protectedparse(__namedParameters:UpdateSiloDesignationsParams):ParsedUpdateSiloDesignationsParams
Defined in: cct/evm/token-pool/operations/update-silo-designations.ts:136
Validates the pool address and every entry before any RPC, keeping the checksummed rebalancers so buildUnsigned and the encoder never re-derive them.
Three judgement calls, all rejections:
- both arrays empty: such a call mines while changing nothing.
- duplicates within an array: a second remove of the same lane reverts
ChainNotSiloed(the first deleted it), and a second add revertsInvalidChainSelector(the first siloed it); reported here against the second occurrence. - a lane in BOTH arrays: legal on-chain, where it "resets" the silo: its balance moves to
the unsiloed bucket and it restarts at 0 under the new rebalancer. Far likelier to be a
caller who meant to change the rebalancer, which
setSiloRebalancerdoes without moving any liquidity; a deliberate reset can still be done in two calls.
Lane 0 and a zero rebalancer in adds are rejected as the reverts they would be
(InvalidChainSelector, ZeroAddressNotAllowed).
Parameters
| Parameter | Type |
|---|---|
__namedParameters | UpdateSiloDesignationsParams |
Returns
ParsedUpdateSiloDesignationsParams
Throws
CCTParamsInvalidError if poolAddress is invalid, an array is not a dense
array, both are empty, an entry is malformed (reported as removes[i],
adds[i].remoteChainSelector or adds[i].rebalancer), or a lane is duplicated or in both
Overrides
EVMOperation.parse
prepare()
protectedprepare(params:UpdateSiloDesignationsParams):ParsedUpdateSiloDesignationsParams
Defined in: cct/operation.ts:48
validate then parse — the single pre-RPC step, before any chain access.
Parameters
| Parameter | Type |
|---|---|
params | UpdateSiloDesignationsParams |
Returns
ParsedUpdateSiloDesignationsParams
Inherited from
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
validate()
protectedvalidate(_params:UpdateSiloDesignationsParams):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
| Parameter | Type |
|---|---|
_params | UpdateSiloDesignationsParams |
Returns
void
Inherited from
EVMOperation.validate