Skip to content
Lattice

TimelockControllerStandalone

Git Source

Inherits: TimelockController, AccessControl, Initializable

Title: TimelockControllerStandalone

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/TimelockController.sol)

Non-Diamond deployable variant. Inherits all logic from TimelockController and AccessControl; the constructor is guarded by the Initializable initializer modifier.

Consumers who need a Diamond-proxy deployment should use TimelockController as a facet and call initializers separately.

Notes:

  • lattice-version: 0.1.0
  • lattice-source: OpenZeppelin v5.1.0

Functions

exportSelectors

ERC-8153 clash resolver: this composite inherits multiple facets that each declare exportSelectors(). It is never cut as a diamond facet, so it exports nothing.

function exportSelectors()
        external
        pure
        virtual
        override(TimelockController, AccessControl)
        returns (bytes memory);

Returns

NameTypeDescription
<none>bytes

constructor

constructor(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) initializer;

Parameters

NameTypeDescription
minDelayuint256The initial minimum delay for operations.
proposersaddress[]The addresses to grant PROPOSER_ROLE + CANCELLER_ROLE.
executorsaddress[]The addresses to grant EXECUTOR_ROLE.
Pass address(0) in the array to allow open execution. When this timelock serves a
separate Governor, give EXECUTOR_ROLE to the governor only: this contract cannot read
the Governor's 14-day grace period, so an open executor could still run an Expired
proposal's operation.
adminaddressThe address to grant DEFAULT_ADMIN_ROLE to.
Pass address(0) to leave administration to the timelock itself only.

receive

Accept ETH so the timelock can hold and forward value during executions.

receive() external payable;

onERC721Received

Allows the timelock to receive ERC-721 tokens via safeTransferFrom.

function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4);

Parameters

NameTypeDescription
_address
_address
_uint256
_bytes

Returns

NameTypeDescription
<none>bytes4

onERC1155Received

Allows the timelock to receive single ERC-1155 tokens via safeTransferFrom.

function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4);

Parameters

NameTypeDescription
_address
_address
_uint256
_uint256
_bytes

Returns

NameTypeDescription
<none>bytes4

onERC1155BatchReceived

Allows the timelock to receive batch ERC-1155 tokens via safeBatchTransferFrom.

function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata)
        external
        pure
        returns (bytes4);

Parameters

NameTypeDescription
_address
_address
_uint256[]
_uint256[]
_bytes

Returns

NameTypeDescription
<none>bytes4