Comment on page
Timelock
contracts/governance/Timelock.sol
constructor(minDelay, proposers, executors)
Arguments
name | type | description |
minDelay | uint256 | |
proposers | address[] | |
executors | address[] | |
***Timelock.CallExecuted(id, index, target, value, data) ***
Arguments
name | type | description |
id | bytes32 | indexed |
index | uint256 | indexed |
target | address | not indexed |
value | uint256 | not indexed |
data | bytes | not indexed |
***Timelock.CallScheduled(id, index, target, value, data, predecessor, delay) ***
Arguments
name | type | description |
id | bytes32 | indexed |
index | uint256 | indexed |
target | address | not indexed |
value | uint256 | not indexed |
data | bytes | not indexed |
predecessor | bytes32 | not indexed |
delay | uint256 | not indexed |
***Timelock.Cancelled(id) ***
Arguments
name | type | description |
id | bytes32 | indexed |
***Timelock.MinDelayChange(oldDuration, newDuration) ***
Arguments
name | type | description |
oldDuration | uint256 | not indexed |
newDuration | uint256 | not indexed |
***Timelock.RoleAdminChanged(role, previousAdminRole, newAdminRole) ***
Arguments
name | type | description |
role | bytes32 | indexed |
previousAdminRole | bytes32 | indexed |
newAdminRole | bytes32 | indexed |
***Timelock.RoleGranted(role, account, sender) ***
Arguments
name | type | description |
role | bytes32 | indexed |
account | address | indexed |
sender | address | indexed |
***Timelock.RoleRevoked(role, account, sender) ***
Arguments
name | type | description |
role | bytes32 | indexed |
account | address | indexed |
sender | address | indexed |
Timelock.DEFAULT_ADMIN_ROLE() view
Outputs
name | type | description |
| bytes32 | |
Timelock.EXECUTOR_ROLE() view
Outputs
name | type | description |
| bytes32 | |
Timelock.PROPOSER_ROLE() view
Outputs
name | type | description |
| bytes32 | |
Timelock.TIMELOCK_ADMIN_ROLE() view
Outputs
name | type | description |
| bytes32 | |
***Timelock.cancel(id) ***
Details: Cancel an operation. Requirements: - the caller must have the 'proposer' role.
Arguments
name | type | description |
id | bytes32 | |
Timelock.execute(target, value, data, predecessor, salt) payable
Details: Execute an (ready) operation containing a single transaction. Emits a {CallExecuted} event. Requirements: - the caller must have the 'executor' role.
Arguments
name | type | description |
target | address | |
value | uint256 | |
data | bytes | |
predecessor | bytes32 | |
salt | bytes32 | |
Timelock.executeBatch(targets, values, datas, predecessor, salt) payable
Details: 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.
Arguments
name | type | description |
targets | address[] | |
values | uint256[] | |
datas | bytes[] | |
predecessor | bytes32 | |
salt | bytes32 | |
Timelock.getMinDelay() view
Details: Returns the minimum delay for an operation to become valid. This value can be changed by executing an operation that callsupdateDelay
.
Outputs
name | type | description |
duration | uint256 | |
Timelock.getRoleAdmin(role) view
Details: Returns the admin role that controlsrole
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Arguments
name | type | description |
role | bytes32 | |
Outputs
name | type | description |
| bytes32 | |
Timelock.getTimestamp(id) view
Details: Returns the timestamp at with an operation becomes ready (0 for unset operations, 1 for done operations).
Arguments
name | type | description |
id | bytes32 | |
Outputs
name | type | description |
timestamp | uint256 | |
***Timelock.grantRole(role, account) ***
Details: Grantsrole
toaccount
. Ifaccount
had not been already grantedrole
, emits a {RoleGranted} event. Requirements: - the caller must haverole
's admin role.
Arguments
name | type | description |
role | bytes32 | |
account | address | |
Timelock.hasRole(role, account) view
Details: Returnstrue
ifaccount
has been grantedrole
.
Arguments
name | type | description |
role | bytes32 | |
account | address | |
Outputs
name | type | description |
| bool | |
***Timelock.hashOperation(target, value, data, predecessor, salt) ***
Details: Returns the identifier of an operation containing a single transaction.
Arguments
name | type | description |
target | address | |
value | uint256 | |
data | bytes | |
predecessor | bytes32 | |
salt | bytes32 | |
Outputs
name | type | description |
hash | bytes32 | |
***Timelock.hashOperationBatch(targets, values, datas, predecessor, salt) ***
Details: Returns the identifier of an operation containing a batch of transactions.
Arguments
name | type | description |
targets | address[] | |
values | uint256[] | |
datas | bytes[] | |
predecessor | bytes32 | |
salt | bytes32 | |
Outputs
name | type | description |
hash | bytes32 | |
Timelock.isOperation(id) view
Details: Returns whether an id correspond to a registered operation. This includes both Pending, Ready and Done operations.
Arguments
name | type | description |
id | bytes32 | |
Outputs
name | type | description |
pending | bool | |
Timelock.isOperationDone(id) view
Details: Returns whether an operation is done or not.
Arguments
name | type | description |
id | bytes32 | |
Outputs
name | type | description |
done | bool | |
Timelock.isOperationPending(id) view
Details: Returns whether an operation is pending or not.
Arguments
name | type | description |
id | bytes32 | |
Outputs
name | type | description |
pending | bool | |
Timelock.isOperationReady(id) view
Details: Returns whether an operation is ready or not.
Arguments
name | type | description |
id | bytes32 | |
Outputs
name | type | description |
ready | bool | |
***Timelock.renounceRole(role, account) ***
Details: Revokesrole
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 grantedrole
, emits a {RoleRevoked} event. Requirements: - the caller must beaccount
.
Arguments
name | type | description |
role | bytes32 | |
account | address | |
***Timelock.revokeRole(role, account) ***
Details: Revokesrole
fromaccount
. Ifaccount
had been grantedrole
, emits a {RoleRevoked} event. Requirements: - the caller must haverole
's admin role.
Arguments
name | type | description |
role | bytes32 | |
account | address | |
***Timelock.schedule(target, value, data, predecessor, salt, delay) ***
Details: Schedule an operation containing a single transaction. Emits a {CallScheduled} event. Requirements: - the caller must have the 'proposer' role.
Arguments
name | type | description |
target | address | |
value | uint256 | |
data | bytes | |
predecessor | bytes32 | |
salt | bytes32 | |
delay | uint256 | |
***Timelock.scheduleBatch(targets, values, datas, predecessor, salt, delay) ***
Details: 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.
Arguments
name | type | description |
targets | address[] | |
values | uint256[] | |
datas | bytes[] | |
predecessor | bytes32 | |
salt | bytes32 | |
delay | uint256 | |
Timelock.supportsInterface(interfaceId) view
Details: See {IERC165-supportsInterface}.
Arguments
name | type | description |
interfaceId | bytes4 | |
Outputs
name | type | description |
| bool | |
***Timelock.updateDelay(newDelay) ***
Details: 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.
Arguments
name | type | description |
newDelay | uint256 | |
Last modified 2yr ago