relevant tag icon
TimelockController
copy icon
OpenZeppelin
• version 0.0.2r
Utility
DAO
Governance
Deployable
Audited

TimelockController

Audited

Delays the execution of a separate contract function. Primarily used as part of a DAO Contract module which acts as a timelocked controller. When set as the owner of an `Ownable` smart contract, it enforces a timelock on all `onlyOwner` maintenance operations. This gives time for users of the controlled contract to exit before a potentially dangerous maintenance operation is applied. By default, this contract is self administered, meaning administration tasks have to go through the timelock process. The proposer (resp executor) role is in charge of proposing (resp executing) operations. A common use case is to position this {TimelockController} as the owner of a smart contract, with a multisig or a DAO as the sole proposer.

*Visit desktop site to download or deploy

Version

0.0.2r

Recent Use

🍞 0x5DF1 saved
🥐 0x35a9 deployed
🥖 0xf9e4 downloaded
🥨 0xf594 downloaded
🥯 0x77eA downloaded
🥞 0x7015 saved
🧀 0x46dc downloaded

Last Publish

9/6/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
cancel(bytes32) :
Cancel an operation. Requirements: - the caller must have the 'canceller' role.
execute(address,uint256,bytes,bytes32,bytes32) :
Execute an (ready) operation containing a single transaction. Emits a {CallExecuted} event. Requirements: - the caller must have the 'executor' role.
executeBatch(address[],uint256[],bytes[],bytes32,bytes32) :
Execute an (ready) operation containing a batch of transactions. Emits one {CallExecuted} event per transaction in the batch. Requirements: - the caller must have the 'executor' role.
getMinDelay() :
Returns the minimum delay for an operation to become valid. This value can be changed by executing an operation that calls `updateDelay`.
getRoleAdmin(bytes32) :
Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
getTimestamp(bytes32) :
Returns the timestamp at with an operation becomes ready (0 for unset operations, 1 for done operations).
grantRole(bytes32,address) :
Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.
hasRole(bytes32,address) :
Returns `true` if `account` has been granted `role`.
hashOperation(address,uint256,bytes,bytes32,bytes32) :
Returns the identifier of an operation containing a single transaction.
hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32) :
Returns the identifier of an operation containing a batch of transactions.
isOperation(bytes32) :
Returns whether an id correspond to a registered operation. This includes both Pending, Ready and Done operations.
isOperationDone(bytes32) :
Returns whether an operation is done or not.
isOperationPending(bytes32) :
Returns whether an operation is pending or not.
isOperationReady(bytes32) :
Returns whether an operation is ready or not.
onERC1155BatchReceived(address,address,uint256[],uint256[],bytes) :
See {IERC1155Receiver-onERC1155BatchReceived}.
onERC1155Received(address,address,uint256,uint256,bytes) :
See {IERC1155Receiver-onERC1155Received}.
onERC721Received(address,address,uint256,bytes) :
See {IERC721Receiver-onERC721Received}.
renounceRole(bytes32,address) :
Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.
revokeRole(bytes32,address) :
Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.
schedule(address,uint256,bytes,bytes32,bytes32,uint256) :
Schedule an operation containing a single transaction. Emits a {CallScheduled} event. Requirements: - the caller must have the 'proposer' role.
scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256) :
Schedule an operation containing a batch of transactions. Emits one {CallScheduled} event per transaction in the batch. Requirements: - the caller must have the 'proposer' role.
supportsInterface(bytes4) :
See {IERC165-supportsInterface}.
updateDelay(uint256) :
Changes the minimum timelock duration for future operations. Emits a {MinDelayChange} event. Requirements: - the caller must be the timelock itself. This can only be achieved by scheduling and later executing an operation where the timelock is the target and the data is the ABI-encoded call to this function.

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i timelockcontroller
copy icon

Bytecode

Download

Verification

Download

Recent Use

🍞 0x5DF1 saved
🥐 0x35a9 deployed
🥖 0xf9e4 downloaded
🥨 0xf594 downloaded
🥯 0x77eA downloaded
🥞 0x7015 saved
🧀 0x46dc downloaded

Last Publish

9/6/2022

Solidity Compiler

0.8.12+commit.f00d7308

Version

0.0.2r

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.