Timelock

Polygon PoS Browse chains

0x47ebfac3353314c788b96cdcbf41daadfe03629c

Solidity v0.8.34+commit.80d5c536

🤖
Query this contract from your AI
Reference: 0x47ebfac3353314c788b96cdcbf41daadfe03629c
Sample prompt: "Tell me the current state of polygon/0x47ebfac3353314c788b96cdcbf41daadfe03629c"
No AI wired up yet? → mcp.smarts.md · Browse chains

Admin & Risk

Who can change the rules?

Detected role based controls from the verified ABI.

Role Based

Overview

Read Functions
14
Write Functions
6
Events
5

Read Functions

Block #89,919,616 · just now
ADMIN_ROLE() view → 0

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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
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

dev: Returns if `holder` has active `role`.

Parameters

Name Type Description
holder address Address to check for the role.✨ AI
role uint256 Numeric identifier of the role (uint256).✨ AI

Returns

Name Type Description
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

dev: Returns the minimum delay.

Returns

Name Type Description
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

dev: Returns the current operation state of `id`.

Parameters

Name Type Description
id bytes32 Operation identifier (bytes32) to query.✨ AI

Returns

Name Type Description
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

dev: Returns the ready timestamp for `id`.

Parameters

Name Type Description
id bytes32 Identifier of the queued timelock transaction (bytes32).✨ AI

Returns

Name Type Description
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

dev: Returns the holder of `role` at the index `i`.

Parameters

Name Type Description
role uint256 Numeric identifier of the role.✨ AI
i uint256 Zero-based index of the holder in the role's holder list.✨ AI

Returns

Name Type Description
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

dev: Returns the total number of holders of `role`.

Parameters

Name Type Description
role uint256 Numeric identifier of the role to query.✨ AI

Returns

Name Type Description
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

dev: Returns an array of the holders of `role`.

Parameters

Name Type Description
role uint256 Numeric role identifier used to look up holders.✨ AI

Returns

Name Type Description
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

dev: Provided for execution mode support detection.

Parameters

Name Type Description
mode bytes32 Execution mode identifier (bytes32) to check for support.✨ AI

Returns

Name Type Description
result bool True if the execution mode is supported; false otherwise.✨ AI

Write Functions

cancel(id: bytes32) nonpayable

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

dev: Cancels the operation with `id`. Emits a {Cancelled} event.

Parameters

Name Type Description
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

dev: 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.

Parameters

Name Type Description
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

dev: Initializes the timelock contract.

Parameters

Name Type Description
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

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

Parameters

Name Type Description
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

Returns

Name Type Description
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

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

Parameters

Name Type Description
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

dev: Sets the status of `role` of `holder` to `active`.

Parameters

Name Type Description
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

Events

Cancelled(id: bytes32)
Name Type Indexed Description
id bytes32
Executed(id: bytes32, mode: bytes32, executionData: bytes)
Name Type Indexed Description
id bytes32
mode bytes32
executionData bytes
MinDelaySet(newMinDelay: uint256)
Name Type Indexed Description
newMinDelay uint256
Proposed(id: bytes32, mode: bytes32, executionData: bytes, readyTimestamp: uint256)
Name Type Indexed Description
id bytes32
mode bytes32
executionData bytes
readyTimestamp uint256
RoleSet(holder: address, role: uint256, active: bool)
Name Type Indexed Description
holder address
role uint256
active bool