Class: ConfigureSiloedLockboxes
Defined in: cct/evm/token-pool/operations/configure-siloed-lockboxes.ts:76
Binds lanes of a v2.0.0 siloed pool to their lockboxes. Owner-only.
Extends
EVMOperation<ConfigureSiloedLockboxesParams>
Constructors
Constructor
new ConfigureSiloedLockboxes():
ConfigureSiloedLockboxes
Returns
ConfigureSiloedLockboxes
Inherited from
EVMOperation<ConfigureSiloedLockboxesParams>.constructor
Properties
name
readonlyname:"configureSiloedLockboxes"='configureSiloedLockboxes'
Defined in: cct/evm/token-pool/operations/configure-siloed-lockboxes.ts:77
camelCase id; matches the token-manager facade method and error context.
Overrides
EVMOperation.name
Methods
buildUnsigned()
protectedbuildUnsigned(chain:EVMChain,params:ConfigureSiloedLockboxesParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/token-pool/operations/configure-siloed-lockboxes.ts:144
Resolves the pool's type/version, confirms sender (when given) is the pool owner, then
pre-flights every binding against the pool and its lockboxes.
Two state preconditions:
- no binding may already be in place:
EnumerableMap.setstores the same value again silently, so such an entry is a no-op; mirrorsapplyAllowlistUpdates. - every lockbox must be an
ERC20LockBoxfor the pool's token: checked once per distinct lockbox (assertLockbox, then itsgetToken()), since lanes may share one. The pool itself revertsInvalidTokenon a mismatch.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | ConfigureSiloedLockboxesParams |
Returns
Promise<UnsignedEVMTx>
Remarks
Deliberately not checked: that the lane is a supported chain (the documented sequence binds lockboxes before configuring lanes), and that the pool is an authorized caller of each lockbox (see the module remarks).
Throws
CCTContractTypeInvalidError if the pool is not a SiloedLockReleaseTokenPool,
or a lockbox address is some other contract
Throws
CCTOperationUnsupportedError below v2.0.0, where a siloed pool holds its silos
itself (see updateSiloDesignations)
Throws
CCTParamsInvalidError if sender is given and is not the pool owner, a
binding is already in place, nothing at a lockbox address answers typeAndVersion(), or a
lockbox escrows another token (both reported as the first lockboxConfigs[i].lockbox naming
it)
Throws
CCTContractVersionUnsupportedError if the pool or a lockbox reports an unknown version
Overrides
EVMOperation.buildUnsigned
execute()
execute(
chain:EVMChain,params:EVMExecuteParams<ConfigureSiloedLockboxesParams>):Promise<TransactionResult>
Defined in: cct/evm/token-pool/operations/configure-siloed-lockboxes.ts:200
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<ConfigureSiloedLockboxesParams> |
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:ConfigureSiloedLockboxesParams):Promise<UnsignedEVMTx>
Defined in: cct/evm/operation.ts:110
Run prepare and buildUnsigned, applying optional sender; no signing.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | ConfigureSiloedLockboxesParams |
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:ConfigureSiloedLockboxesParams):ConfigureSiloedLockboxesParams
Defined in: cct/evm/token-pool/operations/configure-siloed-lockboxes.ts:93
Validates the pool and every binding before any RPC.
Parameters
| Parameter | Type |
|---|---|
params | ConfigureSiloedLockboxesParams |
Returns
ConfigureSiloedLockboxesParams
Remarks
Lane 0 is rejected although the pool would store it: no chain has selector 0, so
the binding could never be used. A lane listed twice is rejected because the last entry would
silently win. A zero lockbox reverts ZeroAddressInvalid.
Throws
CCTParamsInvalidError if poolAddress is invalid, lockboxConfigs is not a
non-empty dense array, or an entry is malformed or repeats a lane (reported as
lockboxConfigs[i], lockboxConfigs[i].remoteChainSelector or lockboxConfigs[i].lockbox)
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