Here is the rundown of what the test suite does.
- Deploy a mintable ERC20 token to govern the DAO.
- Deploy a Timelock contract to give a buffer between executing proposals (The timelock is the contract that will handle all the money, ownerships, etc)
- Deploy the Governence contract (The Governance contract is in charge of proposals and such, but the Timelock executes)
- Set up the token contract so as the minting will be done through governance process (MINTER will be assigned to Timelock contract address).
- Propose a new amount to be minted to a specific address.
- Vote on that proposal.
- Queue the proposal to be executed.
- Execute the proposal.
You can do it all manually on your own local network:
- Setup local blockchain
yarn hardhat node
- Open a new terminal, propose a new value to be minted to a specific address
yarn hardhat run scripts/propose.ts --network localhost
- Vote on that proposal
yarn hardhat run scripts/vote.ts --network localhost
- Queue & Execute proposal
yarn hardhat run scripts/queue-and-execute.ts --network localhost
Greatly appreciate the guidance from PatrickAlphaC