GovernorTimelock
On‑chain administrative gateway for governor‑privileged actions. Enforces time‑delayed execution via scheduled proposals and per‑function timelock parameters. Manages proposer/executor/canceller roles and supports role updates through the timelock itself.
Functions
CANCELLER_ROLE
CANCELLER_ROLEReturns the bytes32 representation of the canceller role.
function CANCELLER_ROLE()
view
returns (
bytes32 cancelerRole
);EXECUTOR_ROLE
EXECUTOR_ROLEReturns the bytes32 representation of the executor role.
function EXECUTOR_ROLE()
view
returns (
bytes32 executorRole
);PROPOSER_ROLE
PROPOSER_ROLEReturns the bytes32 representation of the proposer role.
ROLE_ADMIN
ROLE_ADMINReturns the bytes32 representation of the role admin.
MIN_DELAY
MIN_DELAYReturns the minimum allowed delay (seconds).
MIN_EXECUTION_WINDOW
MIN_EXECUTION_WINDOWReturns the minimum allowed execution window (seconds).
defaultTimelockParameters
defaultTimelockParametersReturns the default timelock parameters.
setDefaultTimelockParameters
setDefaultTimelockParametersSets the default timelock parameters (only via timelock itself).
Parameters:
0
delay
uint32
uint32
New default delay (seconds)
1
executionWindow
uint32
uint32
New default window (seconds)
setFunctionTimelockParameters
setFunctionTimelockParametersSets per‑function timelock parameters (only via timelock itself).
Parameters:
0
target
address
address
Target contract address
1
functionSelector
bytes4
bytes4
Function selector
2
delay
uint32
uint32
Delay for this function (seconds)
3
executionWindow
uint32
uint32
Execution window for this function
scheduleProposals
scheduleProposalsSchedules proposals for execution after the delay.
Parameters:
0
targets
address[]
address[]
Target contract addresses to call
1
data
bytes[]
bytes[]
Encoded calldata for each target
unscheduleProposals
unscheduleProposalsUnschedules proposals by id (non‑role updates only).
Parameters:
0
proposalIds
uint256[]
uint256[]
IDs of proposals to cancel
executeProposals
executeProposalsExecutes proposals within their execution window.
Parameters:
0
proposalIds
uint256[]
uint256[]
IDs of proposals to execute
1
targets
address[]
address[]
Target contract addresses
2
data
bytes[]
bytes[]
Encoded calldata for each target
proposeRoleUpdates
proposeRoleUpdatesProposes role grants/revocations (must be executed via timelock).
Parameters:
0
roles
bytes32[]
bytes32[]
Roles to update
1
accounts
address[]
address[]
Accounts to apply role changes to
2
shouldGrant
bool[]
bool[]
true to grant, false to revoke
updateRole
updateRoleUpdates a role (callable only by the timelock itself during execution).
Parameters:
0
role
bytes32
bytes32
Role identifier
1
account
address
address
Account to update
2
grantRole
bool
bool
true to grant, false revoke
isExecutable
isExecutableReturns true if a proposalId is executable now.
Parameters:
0
proposalId
uint256
uint256
Proposal to check timing
Events
DefaultTimelockSet
DefaultTimelockSetERC20TokenWithdrawn
ERC20TokenWithdrawnFunctionTimelockSet
FunctionTimelockSetPendingTokenWithdrawerSet
PendingTokenWithdrawerSetProposalExecuted
ProposalExecutedProposalScheduled
ProposalScheduledProposalUnscheduled
ProposalUnscheduledRoleUpdated
RoleUpdatedTokenWithdrawerAccepted
TokenWithdrawerAcceptedLast updated