TimelockController

Robinhood Chain 瀏覽鏈

0xcfa0388f5ddf905fdc08c45c716c15dc10a14c6f

Solidity v0.8.20+commit.a1b79de6

🤖
透過你的 AI 查詢此合約
參考: 0xcfa0388f5ddf905fdc08c45c716c15dc10a14c6f
範例提示詞: "Tell me the current state of robinhood/0xcfa0388f5ddf905fdc08c45c716c15dc10a14c6f"
還沒有接入 AI?→ mcp.smarts.md · 瀏覽鏈

管理與風險

誰能修改規則?

Detected role based controls from the verified ABI.

Role Based

概覽

讀取函式
16
寫入函式
12
事件
8

讀取函式

Block #25,989,133 · just now
CANCELLER_ROLE() view → 0xfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783

Returns the bytes32 role identifier for accounts allowed to cancel scheduled operations.✨ AI

回傳值

名稱 類型 描述
bytes32 The bytes32 identifier for the CANCELLER_ROLE used to grant cancellation privileges.✨ AI
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Returns the identifier (bytes32) for the DEFAULT_ADMIN_ROLE used by role-based access control.✨ AI

回傳值

名稱 類型 描述
bytes32 The bytes32 role identifier representing the default admin role for access control checks.✨ 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 privileges.✨ AI
PROPOSER_ROLE() view → 0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1

Returns the role identifier that grants permission to propose operations.✨ AI

回傳值

名稱 類型 描述
bytes32 The bytes32 identifier for PROPOSER_ROLE used to check or assign proposer permissions.✨ AI
getMinDelay() view → 86,400

Return the current minimum delay required before queued operations can be executed.✨ AI

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

回傳值

名稱 類型 描述
uint256 The minimum delay (in seconds) that must elapse before a queued operation can be executed.✨ AI
getOperationState(id: bytes32) view

Returns the current lifecycle state code of the timelock operation identified by id.✨ AI

開發者: Returns operation state.

參數

名稱 類型 描述
id bytes32 Identifier hash of the timelock operation to query.✨ AI

回傳值

名稱 類型 描述
uint8 Unsigned 8-bit integer encoding the operation status; consult the contract's OperationState enum for value meanings.✨ AI
getRoleAdmin(role: bytes32) view

Returns the admin role that controls the specified role.✨ AI

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

參數

名稱 類型 描述
role bytes32 Identifier of the role to query, provided as a bytes32 role hash.✨ AI

回傳值

名稱 類型 描述
bytes32 Admin role identifier (bytes32) that can grant or revoke the specified role.✨ AI
getTimestamp(id: bytes32) view

Returns the scheduled execution timestamp for the given operation identifier.✨ AI

開發者: Returns the timestamp at which an operation becomes ready (0 for unset operations, 1 for done operations).

參數

名稱 類型 描述
id bytes32 The operation id (bytes32) to query.✨ AI

回傳值

名稱 類型 描述
uint256 The Unix timestamp when the operation becomes executable, or 0 if not scheduled.✨ AI
hasRole(role: bytes32, account: address) view

Returns whether an account has a specific role in the TimelockController.✨ AI

開發者: Returns `true` if `account` has been granted `role`.

參數

名稱 類型 描述
role bytes32 Role identifier as a bytes32 value.✨ AI
account address Address whose membership for the role is being checked.✨ AI

回傳值

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

Computes the unique operation id for a scheduled transaction.✨ AI

開發者: Returns the identifier of an operation containing a single transaction.

參數

名稱 類型 描述
target address Address that will receive the call when the operation executes.✨ AI
value uint256 Amount of wei to send with the call.✨ AI
data bytes Calldata payload to execute on the target.✨ AI
predecessor bytes32 Operation id that must execute before this one; zero for none.✨ AI
salt bytes32 User-provided salt to make the operation id unique.✨ AI

回傳值

名稱 類型 描述
bytes32 bytes32 operation id derived from the inputs, used to identify the scheduled operation.✨ AI
hashOperationBatch(targets: address[], values: uint256[], payloads: bytes[], predecessor: bytes32, salt: bytes32) pure

Compute the unique id for a scheduled batch operation from its targets, values, payloads, predecessor, and salt.✨ AI

開發者: Returns the identifier of an operation containing a batch of transactions.

參數

名稱 類型 描述
targets address[] Array of contract addresses that the batch will call.✨ AI
values uint256[] Array of ETH values (in wei) to send with each corresponding call.✨ AI
payloads bytes[] Array of encoded calldata bytes for each corresponding target call.✨ AI
predecessor bytes32 Operation id (bytes32) that must be executed before this batch; zero for none.✨ AI
salt bytes32 Arbitrary bytes32 value used to make the operation id unique.✨ AI

回傳值

名稱 類型 描述
bytes32 A bytes32 hash that uniquely identifies the batch operation (the operation id).✨ AI
isOperation(id: bytes32) view

Check whether an operation with the given id is known by the timelock.✨ AI

開發者: Returns whether an id corresponds to a registered operation. This includes both Waiting, Ready, and Done operations.

參數

名稱 類型 描述
id bytes32 The operation identifier (bytes32) to query.✨ AI

回傳值

名稱 類型 描述
bool True if the operation exists (pending, ready, or done); false if unknown.✨ AI
isOperationDone(id: bytes32) view

Check whether a queued operation has been executed.✨ AI

開發者: Returns whether an operation is done or not.

參數

名稱 類型 描述
id bytes32 Identifier (bytes32 hash) of the operation to check.✨ AI

回傳值

名稱 類型 描述
bool True if the operation has been executed; false otherwise.✨ AI
isOperationPending(id: bytes32) view

Checks whether a scheduled operation with the given id is currently pending.✨ AI

開發者: Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready".

參數

名稱 類型 描述
id bytes32 Operation identifier (bytes32) to query.✨ AI

回傳值

名稱 類型 描述
bool True if the operation is pending (scheduled and not yet executed or canceled); otherwise false.✨ AI
isOperationReady(id: bytes32) view

Report whether the operation identified by id is ready for execution.✨ AI

開發者: Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending".

參數

名稱 類型 描述
id bytes32 Operation identifier (bytes32) used to look up its scheduled state.✨ AI

回傳值

名稱 類型 描述
bool True if the operation is ready to execute (scheduled time passed and still pending); false otherwise.✨ AI
supportsInterface(interfaceId: bytes4) view

Return whether the contract implements the given ERC-165 interface identifier.✨ AI

開發者: Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

參數

名稱 類型 描述
interfaceId bytes4 The ERC-165 interface identifier (four-byte) to query.✨ AI

回傳值

名稱 類型 描述
bool True if the contract implements the interface specified by interfaceId, otherwise false.✨ AI

寫入函式

cancel(id: bytes32) nonpayable

Cancel a previously scheduled/timed operation identified by id.✨ AI

開發者: Cancel an operation. Requirements: - the caller must have the 'canceller' role.

參數

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

Execute a scheduled operation by calling target with the provided value and payload.✨ AI

開發者: Operation must be queued and ready and not executed; predecessor (if any) must be completed; reverts if the call fails.✨ AI

參數

名稱 類型 描述
target address Destination contract or account to call.✨ AI
value uint256 Amount of wei to send with the call (forwarded as msg.value).✨ AI
payload bytes Encoded function call data or empty bytes for a plain ETH transfer.✨ AI
predecessor bytes32 Operation id that must be executed before this one (use zero for none).✨ AI
salt bytes32 Unique salt to disambiguate operations with identical params.✨ AI
executeBatch(targets: address[], values: uint256[], payloads: bytes[], predecessor: bytes32, salt: bytes32) payable

Execute a scheduled batch of transactions, performing each call in order after timelock checks.✨ AI

參數

名稱 類型 描述
targets address[] List of addresses to call for each transaction.✨ AI
values uint256[] Ether values (in wei) to send with each corresponding call.✨ AI
payloads bytes[] Encoded calldata for each call to the corresponding target.✨ AI
predecessor bytes32 Operation id that must be executed before this batch; zero if none.✨ AI
salt bytes32 Unique salt used to derive the operation id for this batch.✨ AI
grantRole(role: bytes32, account: address) nonpayable

Grants a role to an account on the timelock controller.✨ 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. May emit a {RoleGranted} event.

參數

名稱 類型 描述
role bytes32 The bytes32 identifier of the role to grant.✨ AI
account address The address that will receive the role.✨ AI
onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) nonpayable

Handles an incoming ERC-1155 batch transfer and signals acceptance or rejection.✨ AI

開發者: Handles the receipt of a multiple ERC-1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector).

參數

名稱 類型 描述
address
address
uint256[]
uint256[]
bytes

回傳值

名稱 類型 描述
bytes4 `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
onERC1155Received(address, address, uint256, uint256, bytes) nonpayable

Handles a single ERC1155 token transfer and returns the acceptance selector.✨ AI

開發者: Handles the receipt of a single ERC-1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector).

參數

名稱 類型 描述
address
address
uint256
uint256
bytes

回傳值

名稱 類型 描述
bytes4 `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
onERC721Received(address, address, uint256, bytes) nonpayable

Handle an incoming ERC721 token transfer and signal acceptance to the caller.✨ AI

開發者: Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.

參數

名稱 類型 描述
address
address
uint256
bytes

回傳值

名稱 類型 描述
bytes4 The ERC721 receiver selector 0x150b7a02 indicating the contract accepts the token transfer.✨ AI
renounceRole(role: bytes32, callerConfirmation: address) nonpayable

Allows the caller to renounce a role for the specified account when the caller confirms the action.✨ 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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.

參數

名稱 類型 描述
role bytes32 Role identifier to renounce, as a bytes32 hash.✨ AI
callerConfirmation address Address that must match msg.sender to confirm renunciation.✨ AI
revokeRole(role: bytes32, account: address) nonpayable

Revoke a role from an account, removing its granted permissions.✨ AI

開發者: 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.

參數

名稱 類型 描述
role bytes32 Role identifier as a bytes32 value.✨ AI
account address Address of the account to revoke the role from.✨ AI
schedule(target: address, value: uint256, data: bytes, predecessor: bytes32, salt: bytes32, delay: uint256) nonpayable

Schedules an operation to be executed after a specified delay.✨ AI

開發者: Schedule an operation containing a single transaction. Emits {CallSalt} if salt is nonzero, and {CallScheduled}. 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 to the target when executing the operation.✨ AI
data bytes Encoded function call data to execute on the target.✨ AI
predecessor bytes32 Identifier of a predecessor operation that must execute first, or zero for none.✨ AI
salt bytes32 Arbitrary salt used to make the operation id unique.✨ AI
delay uint256 Minimum delay in seconds before the scheduled operation becomes executable.✨ AI
scheduleBatch(targets: address[], values: uint256[], payloads: bytes[], predecessor: bytes32, salt: bytes32, delay: uint256) nonpayable

Schedules a batch of operations to become executable after a timelock delay.✨ AI

開發者: Schedule an operation containing a batch of transactions. Emits {CallSalt} if salt is nonzero, and one {CallScheduled} event per transaction in the batch. Requirements: - the caller must have the 'proposer' role.

參數

名稱 類型 描述
targets address[] Array of target contract addresses for each operation in the batch.✨ AI
values uint256[] Array of ETH values in wei to send with each call.✨ AI
payloads bytes[] Array of encoded call data (function selector + args) for each target.✨ AI
predecessor bytes32 Operation id that must be executed before this batch (bytes32 zero for none).✨ AI
salt bytes32 User-provided salt to make the operation identifier unique.✨ AI
delay uint256 Delay in seconds that must pass before the batch is executable.✨ AI
updateDelay(newDelay: uint256) nonpayable

Set the minimum delay for timelocked operations to newDelay.✨ 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 The new minimum delay (in seconds) that must pass before execution.✨ AI

事件

CallExecuted(id: bytes32, index: uint256, target: address, value: uint256, data: bytes)
名稱 類型 已索引 描述
id bytes32
index uint256
target address
value uint256
data bytes
CallSalt(id: bytes32, salt: bytes32)
名稱 類型 已索引 描述
id bytes32
salt bytes32
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