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

function init(address timelock_) external

This function is called to set up the Governor contract with the matching timelock contract.

propose

function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public

Function 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

function queue(uint proposalId) public

This function is used to queue a proposal after it was successful.

_queueOrRevert

Internal function that either queues a proposal or cancels it.

execute

The actual execute function for a proposal. This then calls the execue function on the timelock contract.

cancel

Cancels a defeated proposal.

getActions

Returns the targets, signatures, values, and call data from a specific proposal.

getReceipt

Gets a receipt for voting on a proposal.

state

Returns the current state of a proposal.

castVote

Lets a user vote on a proposal.

castVoteBySig

Lets a user vote on a proposal by signature.

_castVote

Internal function to cast a vote.

GovernorMint

Factory function to mint a new governor alpha contract instance.

Last updated

Was this helpful?