ILZBridgeAndDelegateConfig
Inherits: ITimelockBatchQueue
Title: ILZBridgeAndDelegateConfig
Timelock policy that owns LayerZero bridge configuration on behalf of the LZBridgeGateway, LZEndpointDelegate, and periphery LZCrossChainBridge contracts.
The policy is intended to hold the bridge_configurator role on the
gateway/delegate and to be pinned as configurator on the periphery bridge. In
that deployment shape every bridge_configurator-gated mutator on the gateway
and the delegate, and every configurator-gated setter on the periphery, is
reached only through the queue exposed here; the contracts themselves only
enforce the role / configurator gate. Gateway, delegate, and facilitator
mutators are submitted as sub-actions of queue; the policy's own configuration
(target slots, timelock delay) is managed through the typed queueSetTarget* and
queueSetTimelockDelay helpers. Proposer roles map back to the existing
bridge_admin, bridge_rate_limiter, and admin roles; emergency cancels
malicious or stale queued actions.
Implementations are expected to inherit TimelockBatchQueue and extend its event
and error surface; the inherited interface is exposed by also implementing
ITimelockBatchQueue.
Functions
gateway
The LZBridgeGateway this policy manages.
function gateway() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
delegate
The LZEndpointDelegate this policy manages.
function delegate() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
facilitator
The periphery LZCrossChainBridge this policy manages.
function facilitator() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
MIN_TIMELOCK_DELAY
Minimum accepted timelock delay.
function MIN_TIMELOCK_DELAY() external view returns (uint48);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint48 |
MAX_TIMELOCK_DELAY
Maximum accepted timelock delay.
function MAX_TIMELOCK_DELAY() external view returns (uint48);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint48 |
EXECUTION_WINDOW
Length of the window after executableAt during which a queued action may be
executed before it expires.
function EXECUTION_WINDOW() external view returns (uint48);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint48 |
queueSetTargetGateway
Queues a self-call updating the policy's gateway target slot.
Proposer access: admin only.
function queueSetTargetGateway(address newGateway_) external returns (uint64 actionId);
Parameters
| Name | Type | Description |
|---|---|---|
| newGateway_ | address | The new gateway address. |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
queueSetTargetDelegate
Queues a self-call updating the policy's delegate target slot.
Proposer access: admin only.
function queueSetTargetDelegate(address newDelegate_) external returns (uint64 actionId);
Parameters
| Name | Type | Description |
|---|---|---|
| newDelegate_ | address | The new delegate address. |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
queueSetTargetFacilitator
Queues a self-call updating the policy's facilitator target slot.
Proposer access: admin only.
function queueSetTargetFacilitator(address newFacilitator_) external returns (uint64 actionId);
Parameters
| Name | Type | Description |
|---|---|---|
| newFacilitator_ | address | The new facilitator address. |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
queueSetTimelockDelay
Queues a self-call updating the configured timelock delay.
Proposer access: admin only.
function queueSetTimelockDelay(uint48 delay_) external returns (uint64 actionId);
Parameters
| Name | Type | Description |
|---|---|---|
| delay_ | uint48 | The new timelock delay in seconds. |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
queue
Queues a batch of one or more gateway, delegate, or facilitator sub-actions for atomic timelocked execution.
Each sub-action is validated as if it had been submitted individually; the
caller must hold the proposer role required by every sub-action in the batch.
Self-targeted sub-actions are rejected: the policy's own configuration is
managed only through the typed queueSetTarget* / queueSetTimelockDelay
helpers.
function queue(
ITimelockBatchQueue.BatchAction[] memory actions_
) external returns (uint64 actionId);
Parameters
| Name | Type | Description |
|---|---|---|
| actions_ | ITimelockBatchQueue.BatchAction[] | The sub-actions to queue. |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
Events
TargetGatewaySet
Emitted when the gateway target slot is updated through the timelock queue.
event TargetGatewaySet(address indexed gateway);
Parameters
| Name | Type | Description |
|---|---|---|
| gateway | address | The new gateway address. |
TargetDelegateSet
Emitted when the delegate target slot is updated through the timelock queue.
event TargetDelegateSet(address indexed delegate);
Parameters
| Name | Type | Description |
|---|---|---|
| delegate | address | The new delegate address. |
TargetFacilitatorSet
Emitted when the facilitator target slot is updated through the timelock queue.
event TargetFacilitatorSet(address indexed facilitator);
Parameters
| Name | Type | Description |
|---|---|---|
| facilitator | address | The new facilitator address. |
Errors
LZBridgeAndDelegateConfig_InvalidAddress
Thrown when a constructor argument or proposed target slot is the zero address.
error LZBridgeAndDelegateConfig_InvalidAddress(string parameter);
Parameters
| Name | Type | Description |
|---|---|---|
| parameter | string | The name of the invalid parameter. |
LZBridgeAndDelegateConfig_SubActionTargetStale
Thrown at execution when the target slot for a sub-action's queue-time
TargetKind no longer holds the address the action was queued against (the
slot was rotated between queue and execution). The action can be cleared via
emergency cancellation and re-queued against the new target.
error LZBridgeAndDelegateConfig_SubActionTargetStale(
uint64 actionId,
uint256 index,
address queuedTarget,
address currentTarget
);
Parameters
| Name | Type | Description |
|---|---|---|
| actionId | uint64 | The queued action ID. |
| index | uint256 | The sub-action position within the batch. |
| queuedTarget | address | The address the sub-action was validated against at queue time. |
| currentTarget | address | The address the slot currently holds. |
Enums
TargetKind
Which target slot a queued sub-action was validated against at queue time.
NONE is the zero value, meaning "no sub-action recorded".
enum TargetKind {
NONE,
GATEWAY,
DELEGATE,
FACILITATOR,
SELF
}
Variants
| Name | Description |
|---|---|
| NONE | |
| GATEWAY | |
| DELEGATE | |
| FACILITATOR | |
| SELF |