CrosschainTimelockHandlerLib
Title: CrosschainTimelockHandlerLib
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
STATELESS handler: schedules an operation on the co-mounted TimelockController from an authenticated inbound ERC-7786 message. Holds no ERC-7201 storage of its own.
Trust model: CrosschainLink has already authenticated the gateway + source counterpart before
dispatching here, so the linked counterpart is effectively a timelock proposer. schedule checks
PROPOSER_ROLE against msg.sender, which is the Diamond itself under the self-dispatch — so the
Diamond must hold PROPOSER_ROLE (granted at timelock init or by an admin). The timelock delay +
CANCELLER_ROLE provide the safety window over inbound proposals.
Functions
processMessage
Schedules the encoded operation on the co-mounted TimelockController. Callable only via
the Diamond's own authenticated receiveMessage dispatch (msg.sender == address(this)).
function processMessage(bytes32 receiveId, bytes calldata payload) internal;Parameters
| Name | Type | Description |
|---|---|---|
| receiveId | bytes32 | The de-duplicated inbound message id (replay already checked by CrosschainLink). |
| payload | bytes | abi.encode(address target, uint256 value, bytes data, bytes32 predecessor,<br/>bytes32 salt, uint256 delay). The timelock enforces delay >= minDelay. |