TimelockController

Ethereum 浏览链

0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7

Solidity v0.8.7+commit.e28d00a7

🤖
通过你的 AI 查询此合约
引用: 0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7
示例提示词: "Tell me the current state of eth/0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7"
还没有接入 AI?→ mcp.smarts.md · 浏览链

管理与风险

谁能修改规则?

Detected role based controls from the verified ABI.

Role Based

概览

读取函数
15
写入函数
9
事件
7

读取函数

Block #25,494,084 · just now
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Return the bytes32 identifier for the contract's default admin role.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 identifier for the default admin role used to manage timelock permissions.✨ AI
EXECUTOR_ROLE() view → 0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63

Returns the role identifier used to grant executor permissions.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 identifier for the EXECUTOR_ROLE used to check or grant executor permissions.✨ AI
PROPOSER_ROLE() view → 0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1

Return the role identifier for accounts allowed to propose operations.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 identifier for the PROPOSER_ROLE; used to check or grant proposal permissions.✨ AI
TIMELOCK_ADMIN_ROLE() view → 0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5

Returns the bytes32 identifier for the Timelock admin role.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier used to check or grant the timelock admin role.✨ AI
getMinDelay() view → 172,800

Returns the current minimum delay the timelock requires before executing queued operations.✨ AI

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

返回值

名称 类型 描述
duration uint256 duration: The minimum delay, in seconds, required before queued operations can be executed.✨ AI
getRoleAdmin(role: bytes32) view

Get the admin role that controls a specified role.✨ AI

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

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) to query.✨ AI

返回值

名称 类型 描述
bytes32 Admin role identifier (bytes32) that controls the given role.✨ AI
getTimestamp(id: bytes32) view

Returns the timestamp when the specified operation becomes executable.✨ AI

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

参数

名称 类型 描述
id bytes32 Operation identifier (bytes32) used to look up the scheduled timestamp.✨ AI

返回值

名称 类型 描述
timestamp uint256 The scheduled timestamp in Unix seconds when the operation is executable, or 0 if not scheduled.✨ AI
hasRole(role: bytes32, account: address) view

Checks whether the given account has the specified role and returns true if it does.✨ AI

开发者: Returns `true` if `account` has been granted `role`.

参数

名称 类型 描述
role bytes32 Role identifier to check, provided as a bytes32 value.✨ AI
account address Address of the account to check for the role.✨ AI

返回值

名称 类型 描述
bool True if the account holds the specified role, otherwise false.✨ AI
hashOperation(target: address, value: uint256, data: bytes, predecessor: bytes32, salt: bytes32) pure

Computes the operation identifier hash from the target, value, data, predecessor, and salt.✨ AI

开发者: Returns the identifier of an operation containing a single transaction.

参数

名称 类型 描述
target address Target contract address for the scheduled call.✨ AI
value uint256 Amount of wei to send with the call.✨ AI
data bytes Calldata bytes for the call to the target.✨ AI
predecessor bytes32 Operation id that must be executed before this one (bytes32), or zero.✨ AI
salt bytes32 User-supplied salt to make the operation id unique (bytes32).✨ AI

返回值

名称 类型 描述
hash bytes32 hash: keccak256(abi.encode(target, value, data, predecessor, salt)) that uniquely identifies the operation (bytes32).✨ AI
hashOperationBatch(targets: address[], values: uint256[], datas: bytes[], predecessor: bytes32, salt: bytes32) pure

Computes the keccak256 hash that uniquely identifies a batch operation.✨ AI

开发者: Returns the identifier of an operation containing a batch of transactions.

参数

名称 类型 描述
targets address[] Array of target addresses called by the batch.✨ AI
values uint256[] Array of ETH values (in wei) forwarded to each target.✨ AI
datas bytes[] Array of call data payloads for each target call.✨ AI
predecessor bytes32 Operation id that must execute before this batch (bytes32 zero for none).✨ AI
salt bytes32 User-supplied salt (bytes32) to distinguish otherwise identical batches.✨ AI

返回值

名称 类型 描述
hash bytes32 Bytes32 hash identifying the batch, computed from targets, values, datas, predecessor, and salt.✨ AI
isOperation(id: bytes32) view

Checks whether the given operation id is currently pending in the timelock.✨ AI

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

参数

名称 类型 描述
id bytes32 Operation identifier to query.✨ AI

返回值

名称 类型 描述
pending bool pending: true if the operation is pending, false otherwise.✨ AI
isOperationDone(id: bytes32) view

Reports whether a scheduled operation has been executed.✨ AI

开发者: Returns whether an operation is done or not.

参数

名称 类型 描述
id bytes32 Identifier of the operation to query.✨ AI

返回值

名称 类型 描述
done bool done: true if the operation has been executed, false otherwise.✨ AI
isOperationPending(id: bytes32) view

Return true if the operation with the given id is pending.✨ AI

开发者: Returns whether an operation is pending or not.

参数

名称 类型 描述
id bytes32 Operation identifier to check (bytes32).✨ AI

返回值

名称 类型 描述
pending bool pending: true if the operation is pending (scheduled and not yet executed or canceled).✨ AI
isOperationReady(id: bytes32) view

Return true if the specified operation is ready for execution.✨ AI

开发者: Returns whether an operation is ready or not.

参数

名称 类型 描述
id bytes32 Operation identifier as a bytes32 hash, returned when the operation was scheduled.✨ AI

返回值

名称 类型 描述
ready bool ready: true if the operation's delay has elapsed and it can be executed, otherwise false.✨ AI
supportsInterface(interfaceId: bytes4) view

Check if the contract implements the interface identified by interfaceId.✨ AI

开发者: See {IERC165-supportsInterface}.

参数

名称 类型 描述
interfaceId bytes4 The ERC165 interface identifier to query.✨ AI

返回值

名称 类型 描述
bool true if the contract supports the specified interfaceId, otherwise false.✨ AI

写入函数

cancel(id: bytes32) nonpayable

Cancel a scheduled operation so it can no longer be executed.✨ AI

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

参数

名称 类型 描述
id bytes32 Identifier of the scheduled operation to cancel.✨ AI
execute(target: address, value: uint256, data: bytes, predecessor: bytes32, salt: bytes32) payable

Executes a scheduled transaction by calling target with value and data once prerequisites are satisfied.✨ AI

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

参数

名称 类型 描述
target address Destination contract or account address to call.✨ AI
value uint256 Amount of wei to send with the call.✨ AI
data bytes Encoded call data (function selector and arguments).✨ AI
predecessor bytes32 Operation id that must be executed before this one, or zero if none.✨ AI
salt bytes32 Unique salt identifying the scheduled operation.✨ AI
executeBatch(targets: address[], values: uint256[], datas: bytes[], predecessor: bytes32, salt: bytes32) payable

Execute a scheduled batch of transactions after its timelock has expired.✨ AI

开发者: 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.

参数

名称 类型 描述
targets address[] Array of addresses to call.✨ AI
values uint256[] Array of wei amounts to send to each target.✨ AI
datas bytes[] Array of calldata bytes for each respective call.✨ AI
predecessor bytes32 Operation id that must be executed before this batch; use zero hash if none.✨ AI
salt bytes32 Salt used when scheduling the operation to uniquely identify the batch.✨ AI
grantRole(role: bytes32, account: address) nonpayable

Grants a role to an account, enabling that account to perform role-restricted actions.✨ AI

开发者: 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.

参数

名称 类型 描述
role bytes32 Role identifier to grant, as a bytes32 hash.✨ AI
account address Address that will receive the role.✨ AI
renounceRole(role: bytes32, account: address) nonpayable

Allows an account to renounce a role it holds; the call must be made by that account.✨ AI

开发者: 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 granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) to renounce.✨ AI
account address Address renouncing the role; must equal msg.sender.✨ AI
revokeRole(role: bytes32, account: address) nonpayable

Revoke a role from an account, removing that account's permissions managed by the timelock.✨ AI

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

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) to revoke.✨ AI
account address Address of the account whose role will be revoked.✨ AI
schedule(target: address, value: uint256, data: bytes, predecessor: bytes32, salt: bytes32, delay: uint256) nonpayable

Schedules a transaction for future execution by recording its target, value, calldata, and execution delay.✨ AI

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

参数

名称 类型 描述
target address Address of the contract or account to call when the operation executes.✨ AI
value uint256 Amount of wei to send with the call.✨ AI
data bytes Calldata payload to send to the target on execution.✨ AI
predecessor bytes32 Optional operation id that must be executed before this one (bytes32).✨ AI
salt bytes32 Unique salt to create the operation id and avoid collisions (bytes32).✨ AI
delay uint256 Time in seconds to wait before the operation becomes executable.✨ AI
scheduleBatch(targets: address[], values: uint256[], datas: bytes[], predecessor: bytes32, salt: bytes32, delay: uint256) nonpayable

Schedules a batch of transactions that the timelock will execute after the specified delay.✨ AI

开发者: 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.

参数

名称 类型 描述
targets address[] Addresses of contracts or accounts to call.✨ AI
values uint256[] Ether amounts (in wei) to send with each call.✨ AI
datas bytes[] Encoded calldata payloads for each corresponding target.✨ AI
predecessor bytes32 Operation id that must be executed before this batch; use zero for no predecessor.✨ AI
salt bytes32 Unique salt value used to produce the operation id.✨ AI
delay uint256 Delay in seconds before the scheduled batch becomes executable.✨ AI
updateDelay(newDelay: uint256) nonpayable

Updates the minimum delay for timelocked operations.✨ AI

开发者: 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.

参数

名称 类型 描述
newDelay uint256 New minimum delay in seconds to apply to scheduled operations.✨ AI

事件

CallExecuted(id: bytes32, index: uint256, target: address, value: uint256, data: bytes)
名称 类型 已索引 描述
id bytes32
index uint256
target address
value uint256
data bytes
CallScheduled(id: bytes32, index: uint256, target: address, value: uint256, data: bytes, predecessor: bytes32, delay: uint256)
名称 类型 已索引 描述
id bytes32
index uint256
target address
value uint256
data bytes
predecessor bytes32
delay uint256
Cancelled(id: bytes32)
名称 类型 已索引 描述
id bytes32
MinDelayChange(oldDuration: uint256, newDuration: uint256)
名称 类型 已索引 描述
oldDuration uint256
newDuration uint256
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
名称 类型 已索引 描述
role bytes32
previousAdminRole bytes32
newAdminRole bytes32
RoleGranted(role: bytes32, account: address, sender: address)
名称 类型 已索引 描述
role bytes32
account address
sender address
RoleRevoked(role: bytes32, account: address, sender: address)
名称 类型 已索引 描述
role bytes32
account address
sender address