Timelock

Polygon PoS 瀏覽鏈

0x47ebfac3353314c788b96cdcbf41daadfe03629c

Solidity v0.8.34+commit.80d5c536

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

管理與風險

誰能修改規則?

Detected role based controls from the verified ABI.

Role Based

概覽

讀取函式
14
寫入函式
6
事件
5

讀取函式

Block #89,922,107 · just now
ADMIN_ROLE() view → 0

Return the uint256 identifier for the contract's ADMIN role.✨ AI

回傳值

名稱 類型 描述
uint256 uint256 identifier representing the ADMIN role used for access control checks.✨ AI
CANCELLER_ROLE() view → 3

Returns the uint256 identifier for the canceller role used to authorize cancellation actions.✨ AI

回傳值

名稱 類型 描述
uint256 The uint256 identifier representing the canceller role for access control checks and authorization.✨ AI
EXECUTOR_ROLE() view → 2

Return the numeric identifier for the executor role used to grant execution permissions.✨ AI

回傳值

名稱 類型 描述
uint256 Numeric role identifier (uint256) that represents the executor role used by the timelock for access control.✨ AI
MAX_ROLE() view → 3

Return the highest numeric role identifier supported by the contract.✨ AI

回傳值

名稱 類型 描述
uint256 The maximum role identifier (uint256) used as the upper bound for role values.✨ AI
OPEN_ROLE_HOLDER() view → 0x0303030303030303030303030303030303030303

Returns the address that holds the OPEN_ROLE.✨ AI

回傳值

名稱 類型 描述
address The address that currently holds the OPEN_ROLE and can execute OPEN_ROLE-restricted functions.✨ AI
PROPOSER_ROLE() view → 1

Return the numeric identifier used to represent the proposer role for access control.✨ AI

回傳值

名稱 類型 描述
uint256 Numeric identifier (uint256) representing the proposer role used to authorize proposals.✨ AI
hasRole(holder: address, role: uint256) view

Checks whether an address holds a specific role.✨ AI

開發者: Returns if `holder` has active `role`.

參數

名稱 類型 描述
holder address Address to check for the role.✨ AI
role uint256 Numeric identifier of the role (uint256).✨ AI

回傳值

名稱 類型 描述
result bool True if the holder has the specified role, false otherwise.✨ AI
minDelay() view → 43,200

Returns the current minimum delay, in seconds, required before executing queued transactions.✨ AI

開發者: Returns the minimum delay.

回傳值

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

Return the numeric state code of the timelock operation identified by id.✨ AI

開發者: Returns the current operation state of `id`.

參數

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

回傳值

名稱 類型 描述
result uint8 uint8 code for the operation state (numeric enum value); consult contract source for the code-to-state mapping.✨ AI
readyTimestamp(id: bytes32) view

Return the UNIX timestamp when a queued transaction becomes executable.✨ AI

開發者: Returns the ready timestamp for `id`.

參數

名稱 類型 描述
id bytes32 Identifier of the queued timelock transaction (bytes32).✨ AI

回傳值

名稱 類型 描述
result uint256 UNIX timestamp when the transaction is ready to execute, or zero if not queued.✨ AI
roleHolderAt(role: uint256, i: uint256) view

Return the address of the i-th holder for the specified role.✨ AI

開發者: Returns the holder of `role` at the index `i`.

參數

名稱 類型 描述
role uint256 Numeric identifier of the role.✨ AI
i uint256 Zero-based index of the holder in the role's holder list.✨ AI

回傳值

名稱 類型 描述
result address Address of the i-th account that holds the role.✨ AI
roleHolderCount(role: uint256) view

Return the number of accounts assigned to the specified role.✨ AI

開發者: Returns the total number of holders of `role`.

參數

名稱 類型 描述
role uint256 Numeric identifier of the role to query.✨ AI

回傳值

名稱 類型 描述
result uint256 Total count of accounts that currently hold the specified role.✨ AI
roleHolders(role: uint256) view

Return the addresses that currently hold the specified role.✨ AI

開發者: Returns an array of the holders of `role`.

參數

名稱 類型 描述
role uint256 Numeric role identifier used to look up holders.✨ AI

回傳值

名稱 類型 描述
result address[] List of addresses assigned to the role; returns an empty array if no holders.✨ AI
supportsExecutionMode(mode: bytes32) view

Checks whether the specified execution mode is supported by the timelock.✨ AI

開發者: Provided for execution mode support detection.

參數

名稱 類型 描述
mode bytes32 Execution mode identifier (bytes32) to check for support.✨ AI

回傳值

名稱 類型 描述
result bool True if the execution mode is supported; false otherwise.✨ AI

寫入函式

cancel(id: bytes32) nonpayable

Cancel a scheduled operation with the given id, removing it from the timelock queue.✨ AI

開發者: Cancels the operation with `id`. Emits a {Cancelled} event.

參數

名稱 類型 描述
id bytes32 Hash identifier of the queued operation to cancel.✨ AI
execute(mode: bytes32, executionData: bytes) payable

Execute a queued or immediate operation using the given mode and execution data.✨ AI

開發者: Executes the calls in `executionData`. Reverts and bubbles up error if any call fails. `executionData` encoding (single batch): - If `opData` is empty, `executionData` is simply `abi.encode(calls)`. - Else, `executionData` is `abi.encode(calls, opData)`. See: https://eips.ethereum.org/EIPS/eip-7579 `executionData` encoding (batch of batches): - `executionData` is `abi.encode(bytes[])`, where each element in `bytes[]` is an `executionData` for a single batch. Supported modes: - `0x01000000000000000000...`: Single batch. Does not support optional `opData`. - `0x01000000000078210001...`: Single batch. Supports optional `opData`. - `0x01000000000078210002...`: Batch of batches. For the "batch of batches" mode, each batch will be recursively passed into `execute` internally with mode `0x01000000000078210001...`. Useful for passing in batches signed by different signers. Authorization checks: - If `opData` is empty, the implementation SHOULD require that `msg.sender == address(this)`. - If `opData` is not empty, the implementation SHOULD use the signature encoded in `opData` to determine if the caller can perform the execution. - If `msg.sender` is an authorized entry point, then `execute` MAY accept calls from the entry point, and MAY use `opData` for specialized logic. `opData` may be used to store additional data for authentication, paymaster data, gas limits, etc.

參數

名稱 類型 描述
mode bytes32 Execution mode selector (e.g., call, delegatecall, create).✨ AI
executionData bytes ABI-encoded calldata or contract creation bytecode for the operation.✨ AI
initialize(initialMinDelay: uint256, initialAdmin: address, proposers: address[], executors: address[], cancellers: address[]) nonpayable

Initialize the timelock with a minimum delay, initial admin, and sets of proposers, executors, and cancellers.✨ AI

開發者: Initializes the timelock contract.

參數

名稱 類型 描述
initialMinDelay uint256 Minimum delay in seconds before queued operations become executable.✨ AI
initialAdmin address Address granted initial administrative privileges for the timelock.✨ AI
proposers address[] Array of addresses allowed to propose or schedule operations.✨ AI
executors address[] Array of addresses authorized to execute queued operations; address(0) can indicate public execution.✨ AI
cancellers address[] Array of addresses permitted to cancel queued operations.✨ AI
propose(mode: bytes32, executionData: bytes, delay: uint256) nonpayable

Proposes a new timelock action using the provided mode, execution data, and delay and returns its id.✨ AI

開發者: Proposes an execute payload (`mode`, `executionData`) with `delay`. Emits a {Proposed} event.

參數

名稱 類型 描述
mode bytes32 Execution mode selector that determines how the proposal is handled.✨ AI
executionData bytes ABI-encoded calldata or payload to run when the timelock executes.✨ AI
delay uint256 Minimum delay in seconds before the proposal can be executed.✨ AI

回傳值

名稱 類型 描述
id bytes32 A bytes32 unique identifier for the proposal, typically derived deterministically from the inputs.✨ AI
setMinDelay(newMinDelay: uint256) nonpayable

Set the minimum delay required before queued operations become executable.✨ AI

開發者: Allows the timelock itself to set the minimum delay. Emits a {MinDelaySet} event.

參數

名稱 類型 描述
newMinDelay uint256 New minimum delay, in seconds, for timelocked operations.✨ AI
setRole(holder: address, role: uint256, active: bool) payable

Assign or revoke the specified role for the given holder address.✨ AI

開發者: Sets the status of `role` of `holder` to `active`.

參數

名稱 類型 描述
holder address Address to grant or revoke the role.✨ AI
role uint256 Numeric identifier of the role to set.✨ AI
active bool True to grant the role, false to revoke it.✨ AI

事件

Cancelled(id: bytes32)
名稱 類型 已索引 描述
id bytes32
Executed(id: bytes32, mode: bytes32, executionData: bytes)
名稱 類型 已索引 描述
id bytes32
mode bytes32
executionData bytes
MinDelaySet(newMinDelay: uint256)
名稱 類型 已索引 描述
newMinDelay uint256
Proposed(id: bytes32, mode: bytes32, executionData: bytes, readyTimestamp: uint256)
名稱 類型 已索引 描述
id bytes32
mode bytes32
executionData bytes
readyTimestamp uint256
RoleSet(holder: address, role: uint256, active: bool)
名稱 類型 已索引 描述
holder address
role uint256
active bool