The PWN Token governance is based on the Aragon's token voting plugin. The main changes we've made to the plugin are to use our Epoch Clock instead of block numbers, remove VotingMode functionality and use only Standard by default, and we added the assignment of voting rewards on proposal creation.
Aragon OSx VotingMode allows for EarlyExecution and VoteReplacement features. In Standard mode, early execution and vote replacement are disabled.
2. Important links
3. Contract details
PWNTokenGovernancePlugin.sol is written in Solidity version 0.8.17
Features
Create and Execute Token governance proposals
Vote for a proposal
Inherited contracts, implemented Interfaces and ERCs
bytes calldata_metadata - Metadata of the proposal
IDAO.Action[] calldata_actions - Actions to be executed after the proposal passes. (Learn more about IDAO.Action struct)
uint256_allowFailureMap - Allows proposal to succeed even if an action reverts. Uses bitmap representation. If the bit at index x is 1, the tx succeeds even if the action at x failed. Passing 0 will be treated as atomic execution.
uint64_startDate - The start date of the proposal vote. If 0, the current timestamp is used and the vote starts immediately.
uint64_endDate - The end date of the proposal vote. If 0, _startDate + minDuration is used.
VoteOption_voteOption - Chosen vote option (VoteOption Enum) to be casted on proposal creation.