governor:propose
Create a Governor proposal from a block of commands: each action in the block becomes one of the proposal calls. Optionally binds the proposal id to a variable.
Syntax
Section titled “Syntax”governor:propose [variable] <governor> <description> <actions>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
[variable] |
variable |
Variable to bind the proposal id to |
governor |
address |
Governor address |
description |
string |
Proposal description (markdown) |
actions |
block |
Block of commands making up the proposal |
Examples
Section titled “Examples”load governorload access-control
set $governor 0x323A76393544d5ecca80cd6ef2A560C6a395b7E3set $token 0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72
# Bind the proposal id for voting later in the same scriptgovernor:propose $proposalId $governor "Fund the grants program" ( exec $token transfer(address,uint256) 0x4F2083f5fBede34C2714aFfb3105539775f7FE64 100e18 access-control:grant $token MINTER_ROLE 0x4F2083f5fBede34C2714aFfb3105539775f7FE64)- Every transaction action produced by the block becomes one
(target, value, calldata)entry of the proposal, in order. - The sender needs voting power above the Governor’s
proposalThresholdat the previous block. - The optional leading variable is bound to the proposal id (via
getProposalId/hashProposal, with a local fallback), ready for governor:vote or @governor.proposalState. - Keep the description:
governor:queue,governor:executeandgovernor:cancelneed the exact same description and action block to derive the proposal id.
See Also
Section titled “See Also”- governor:vote — vote on the proposal
- governor:queue / governor:execute — run a passed proposal
- @governor.proposalState — track its lifecycle