A tool for building and testing proposals based on compound-like governance protocols.
The hard hat proposal plugin is an initiative developed by the Idle Dev League to help build test and deploy compound-like governance proposals. This will reduce the development overhead for proposals, specifically reducing the time required for prototyping and evaluating proposals.
The repo for the plugin is located here: GitHub - Idle-Finance/hardhat-proposals-plugin: hardhat plugin for governance proposals
Currently, one of the major issues with proposals is the scripting overheads required i.e. simulating proposals which involve contract imitations and transferring the required amounts of ETH and IDLE to addresses in order to accurately simulate proposals. Furthermore, migrating a proposal from testing to the on-chain governance was previously a non-trivial task.
With the hardhat proposal plugin, proposals can be rapidly developed by using existing
ethers contracts to build up each action for a proposal into a
Proposal object. In combination with other ethereum testing libraries (e.g. Waffle, or smock), it is possible to achieve a higher level of testing coverage for proposals.
The proposal object includes helpful features, such as proposal simulation which is optimised for quickly executing proposals, avoiding the delay of mining a certain number of blocks in order to place the proposal in the correct state. Additionally, simulating the proposal through the plugin allows for detailed revert messages to be retrieved, which will help in debugging proposals.
The Dev League has used this proposal to develop, test, and deploy IIP-11, which proved to make a once tedious task extremely efficient now with the use of this plugin. The code which was used for this development is located here GitHub - Idle-Finance/idle-proposals: Idle Finance IIP repo. Future IIP’s will also be developed out of this repo.
The plugin was built to be open source and accessible by other projects using compound-like governance. However, the plugin could also be improved upon in the future to support other governance systems.
etherscontracts to build proposals
- Simulate proposals quickly
- Receive detailed revert messages for each action of a proposal
- Receive detailed information about each proposal
- Deploy proposals on-chain
- Inspect proposals on-chain and print detailed information for each action.
A tutorial for using the plugin was written, and can be accessed here: proposal-plugin-tutorial/Instructions.md at main · Idle-Finance/proposal-plugin-tutorial · GitHub