Skip to main content

Timelock.sol

Methods

DEFAULT_ADMIN_ROLE()

Solidity

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

EXECUTOR_ROLE()

Solidity

function EXECUTOR_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

PROPOSER_ROLE()

Solidity

function PROPOSER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

TIMELOCK_ADMIN_ROLE()

Solidity

function TIMELOCK_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

cancel(bytes32)

Solidity

function cancel(bytes32 id) external nonpayable
Details

Cancel an operation. Requirements: - the caller must have the 'proposer' role.

Parameters

NameTypeDescription
idbytes32undefined

execute(address,uint256,bytes,bytes32,bytes32)

Solidity

function execute(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt) external payable
Details

Execute an (ready) operation containing a single transaction. Emits a {CallExecuted} event. Requirements: - the caller must have the 'executor' role.

Parameters

NameTypeDescription
targetaddressundefined
valueuint256undefined
databytesundefined
predecessorbytes32undefined
saltbytes32undefined

executeBatch(address[],uint256[],bytes[],bytes32,bytes32)

Solidity

function executeBatch(address[] targets, uint256[] values, bytes[] datas, bytes32 predecessor, bytes32 salt) external 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.

Parameters

NameTypeDescription
targetsaddress[]undefined
valuesuint256[]undefined
datasbytes[]undefined
predecessorbytes32undefined
saltbytes32undefined

getMinDelay()

Solidity

function getMinDelay() external view returns (uint256 duration)
Details

Returns the minimum delay for an operation to become valid. This value can be changed by executing an operation that calls updateDelay.

Returns

NameTypeDescription
durationuint256undefined

getRoleAdmin(bytes32)

Solidity

function getRoleAdmin(bytes32 role) external view returns (bytes32)
Details

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0bytes32undefined

getTimestamp(bytes32)

Solidity

function getTimestamp(bytes32 id) external view returns (uint256 timestamp)
Details

Returns the timestamp at with an operation becomes ready (0 for unset operations, 1 for done operations).

Parameters

NameTypeDescription
idbytes32undefined

Returns

NameTypeDescription
timestampuint256undefined

grantRole(bytes32,address)

Solidity

function grantRole(bytes32 role, address account) external nonpayable
Details

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.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

hasRole(bytes32,address)

Solidity

function hasRole(bytes32 role, address account) external view returns (bool)
Details

Returns true if account has been granted role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

Returns

NameTypeDescription
_0boolundefined

hashOperation(address,uint256,bytes,bytes32,bytes32)

Solidity

function hashOperation(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt) external pure returns (bytes32 hash)
Details

Returns the identifier of an operation containing a single transaction.

Parameters

NameTypeDescription
targetaddressundefined
valueuint256undefined
databytesundefined
predecessorbytes32undefined
saltbytes32undefined

Returns

NameTypeDescription
hashbytes32undefined

hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)

Solidity

function hashOperationBatch(address[] targets, uint256[] values, bytes[] datas, bytes32 predecessor, bytes32 salt) external pure returns (bytes32 hash)
Details

Returns the identifier of an operation containing a batch of transactions.

Parameters

NameTypeDescription
targetsaddress[]undefined
valuesuint256[]undefined
datasbytes[]undefined
predecessorbytes32undefined
saltbytes32undefined

Returns

NameTypeDescription
hashbytes32undefined

initialize(uint256,address[],address[])

Solidity

function initialize(uint256 minDelay, address[] proposers, address[] executors) external nonpayable

Parameters

NameTypeDescription
minDelayuint256undefined
proposersaddress[]undefined
executorsaddress[]undefined

isOperation(bytes32)

Solidity

function isOperation(bytes32 id) external view returns (bool pending)
Details

Returns whether an id correspond to a registered operation. This includes both Pending, Ready and Done operations.

Parameters

NameTypeDescription
idbytes32undefined

Returns

NameTypeDescription
pendingboolundefined

isOperationDone(bytes32)

Solidity

function isOperationDone(bytes32 id) external view returns (bool done)
Details

Returns whether an operation is done or not.

Parameters

NameTypeDescription
idbytes32undefined

Returns

NameTypeDescription
doneboolundefined

isOperationPending(bytes32)

Solidity

function isOperationPending(bytes32 id) external view returns (bool pending)
Details

Returns whether an operation is pending or not.

Parameters

NameTypeDescription
idbytes32undefined

Returns

NameTypeDescription
pendingboolundefined

isOperationReady(bytes32)

Solidity

function isOperationReady(bytes32 id) external view returns (bool ready)
Details

Returns whether an operation is ready or not.

Parameters

NameTypeDescription
idbytes32undefined

Returns

NameTypeDescription
readyboolundefined

owner()

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

renounceOwnership()

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

renounceRole(bytes32,address)

Solidity

function renounceRole(bytes32 role, address account) external nonpayable
Details

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.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

revokeRole(bytes32,address)

Solidity

function revokeRole(bytes32 role, address account) external nonpayable
Details

Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

schedule(address,uint256,bytes,bytes32,bytes32,uint256)

Solidity

function schedule(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt, uint256 delay) external nonpayable
Details

Schedule an operation containing a single transaction. Emits a {CallScheduled} event. Requirements: - the caller must have the 'proposer' role.

Parameters

NameTypeDescription
targetaddressundefined
valueuint256undefined
databytesundefined
predecessorbytes32undefined
saltbytes32undefined
delayuint256undefined

scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)

Solidity

function scheduleBatch(address[] targets, uint256[] values, bytes[] datas, bytes32 predecessor, bytes32 salt, uint256 delay) external nonpayable
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.

Parameters

NameTypeDescription
targetsaddress[]undefined
valuesuint256[]undefined
datasbytes[]undefined
predecessorbytes32undefined
saltbytes32undefined
delayuint256undefined

supportsInterface(bytes4)

Solidity

function supportsInterface(bytes4 interfaceId) external view returns (bool)
Details

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

transferOwnership(address)

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

updateDelay(uint256)

Solidity

function updateDelay(uint256 newDelay) external nonpayable
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.

Parameters

NameTypeDescription
newDelayuint256undefined

upgradeTo(address)

Solidity

function upgradeTo(address newImplementation) external nonpayable
Details

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall(address,bytes)

Solidity

function upgradeToAndCall(address newImplementation, bytes data) external payable
Details

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined
databytesundefined

Events

AdminChanged

Solidity

event AdminChanged(address previousAdmin, address newAdmin)

Parameters

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

BeaconUpgraded

Solidity

event BeaconUpgraded(address indexed beacon)

Parameters

NameTypeDescription
beacon indexedaddressundefined

CallExecuted

Solidity

event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data)

Parameters

NameTypeDescription
id indexedbytes32undefined
index indexeduint256undefined
targetaddressundefined
valueuint256undefined
databytesundefined

CallScheduled

Solidity

event CallScheduled(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay)

Parameters

NameTypeDescription
id indexedbytes32undefined
index indexeduint256undefined
targetaddressundefined
valueuint256undefined
databytesundefined
predecessorbytes32undefined
delayuint256undefined

Cancelled

Solidity

event Cancelled(bytes32 indexed id)

Parameters

NameTypeDescription
id indexedbytes32undefined

MinDelayChange

Solidity

event MinDelayChange(uint256 oldDuration, uint256 newDuration)

Parameters

NameTypeDescription
oldDurationuint256undefined
newDurationuint256undefined

OwnershipTransferred

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

RoleAdminChanged

Solidity

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription
role indexedbytes32undefined
previousAdminRole indexedbytes32undefined
newAdminRole indexedbytes32undefined

RoleGranted

Solidity

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

RoleRevoked

Solidity

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

Upgraded

Solidity

event Upgraded(address indexed implementation)

Parameters

NameTypeDescription
implementation indexedaddressundefined