GovernorAlphaFactory
This contract lets the Alchemy Contract set up its own GovernorAlpha instance to manage proposals.
There is a fixed amount needed to propose which is set at 1% of the total supply of the generated Alchemy ERC20 token and a quorum for votes set to 4% of the total supply.
init
initfunction init(address timelock_) externalThis function is called to set up the Governor contract with the matching timelock contract.
propose
proposefunction propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) publicFunction that lets users create a proposal.
Takes the targets, values, function signatures, and the calldatas for the contract calls as well as a description.
queue
queuefunction queue(uint proposalId) publicThis function is used to queue a proposal after it was successful.
_queueOrRevert
_queueOrRevertInternal function that either queues a proposal or cancels it.
execute
executeThe actual execute function for a proposal. This then calls the execue function on the timelock contract.
cancel
cancelCancels a defeated proposal.
getActions
getActionsReturns the targets, signatures, values, and call data from a specific proposal.
getReceipt
getReceiptGets a receipt for voting on a proposal.
state
stateReturns the current state of a proposal.
castVote
castVoteLets a user vote on a proposal.
castVoteBySig
castVoteBySigLets a user vote on a proposal by signature.
_castVote
_castVoteInternal function to cast a vote.
GovernorMint
GovernorMintFactory function to mint a new governor alpha contract instance.
Last updated
Was this helpful?