Skip to content

Upgrade DAO to OZ Governor#187

Merged
Joeysantoro merged 15 commits intomasterfrom
feat/GovernorUpdate
Oct 3, 2021
Merged

Upgrade DAO to OZ Governor#187
Joeysantoro merged 15 commits intomasterfrom
feat/GovernorUpdate

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Sep 22, 2021

This PR upgrades the Fei governor to OZ Governor with the following changes:

  • delay is only 1 block (from 3333)
  • voting period is 13000 blocks (from 10000)
  • proposal threshold, delay, voting period, and quorum all now configurable

TODO:

@Joeysantoro Joeysantoro marked this pull request as ready for review September 27, 2021 05:40
Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful unit tests. Left some comments; only thing that really needs changing imo is the this thing.

@xklob
Copy link
Contributor

xklob commented Sep 30, 2021

Didn't mean to actually approve the PR since integration tests haven't been written yet, oops.

@Joeysantoro
Copy link
Contributor Author

Pretty sure the proposals plugin is compatible with OZ Gov the way we use it:

https://github.com/Idle-Finance/hardhat-proposals-plugin/blob/main/src/proposals/compound-alpha.ts#L98

it uses a static call to get the pid, which would work for OZ gov.

override(IGovernor, Governor, GovernorCompatibilityBravo)
returns (uint256)
{
return super.propose(targets, values, calldatas, description);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this function need to be permissioned or does the function we call here enforce that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the supercall checks proposal threshold

xklob
xklob previously requested changes Oct 2, 2021

// Deploy timelock with vanilla user admin
const timelockDeployer = await ethers.getContractFactory(Timelock.abi, Timelock.bytecode);
this.timelock = await timelockDeployer.deploy(userAddress, 1, 1); // delay and min delay 1s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you already wrote this I hate to ask, but can you remove all references to this given the importance of the upgrade?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I didn't type Core because it had some upstream stuff I didn't want to mess with

@Joeysantoro Joeysantoro merged commit 17e7a54 into master Oct 3, 2021
@Joeysantoro Joeysantoro deleted the feat/GovernorUpdate branch October 3, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments