GovernorBravo
The GovernorBravo contract is the core of on-chain governance for the Rheofi Protocol. It allows token holders to propose, vote on, and queue protocol changes that will ultimately be executed by the Timelock.
Overview
GovernorBravo implements a proposal lifecycle with support for:
- Proposal creation by accounts holding a minimum voting power.
- Voting periods during which token holders can vote for, against, or abstain from proposals.
- Proposal state transitions: Pending → Active → Succeeded/Defeated → Queued → Executed/Expired.
- Delegation of voting power to other addresses.
All successful proposals are queued in a Timelock contract for a configurable delay before they may be executed.
Key Functions
propose
Create a new governance proposal.
function propose(
address[] memory targets,
uint256[] memory values,
string[] memory signatures,
bytes[] memory calldatas,
string memory description
) public returns (uint256);
castVote
Cast a vote on an active proposal.
function castVote(uint256 proposalId, uint8 support) public;
queue
Queue a succeeded proposal in the Timelock.
function queue(uint256 proposalId) public;
execute
Execute a queued proposal once the Timelock delay has elapsed.
function execute(uint256 proposalId) public;