Governor
This contract acts as an administrator to manage the voting registration, voting counting, and execution of the meshswap. It also performs important parameters of meshswap, proposal registration, and voting execution.
Github Link: (Will be updated after official launch)
Events
State-Changing Functions
ProposalCreated
event ProposalCreated(uint id, address proposer, address target, string signature, bytes callData, uint startBlock, uint endBlock, string description);
- Events log of proposals are created
- Parameters
id
: proposal IDproposer
: proposer's addresstarget
: Address of the contract to be executedsignature
: signature of the function to be executedcallData
: function data to be executedstartBlock
: start block numberendBlock
: end block numberdescription
: proposal details
VoteCast
event VoteCast(address voter, uint proposalId, bool support, uint votes, uint againstVotes, uint forVotes, uint quorumVotes, string reason);
- Events log of vote
- Parameters
voter
: voter's addressproposalId
: proposal IDsupport
: supportvotes
: Number of vote vMESHagainstVotes
: Number of total against voteforVotes
: Number of total favor votequorumVotes
: Number of proposal quorumreason
: reason
ProposalCanceled
event ProposalCanceled(uint id);
- Events log of proposal canceled
ProposalQueued
event ProposalQueued(uint id, uint eta, uint tid);
- Events log of proposal queued
ProposalExecuted
event ProposalExecuted(uint id, bool succeeded);
- Events log of proposal executed
ProposalFeeSet
event ProposalFeeSet(uint oldProposalFee, uint proposalFee);
- Events log of proposal fee(MESH) changed
function propose(address target, string memory signature, bytes memory callData, string memory description) public returns (uint)
- Function used to propose a new proposal
- Sender must have delegates above the proposal threshold
target
: Target address for proposal callssignature
: Function signature for proposal callscallData
: Calldata for proposal calldescription
: String description of the proposal
function castVote(uint proposalId, bool support) external
- Function used to cast a vote for a proposal
proposalId
: The id of the proposal to vote onsupport
: The support value for the vote. false=against, true=for
Last modified 4mo ago