Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Governor OZ proposal #5

Merged
merged 9 commits into from
Jun 27, 2024
Merged

Conversation

prat-gpt
Copy link
Collaborator

No description provided.

@prat-gpt prat-gpt marked this pull request as ready for review May 24, 2024 08:22
anajuliabit
anajuliabit previously approved these changes May 24, 2024
Copy link
Member

@anajuliabit anajuliabit left a comment

Choose a reason for hiding this comment

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

LGTM

super.run();
}

function validate() public override {
Copy link
Contributor

@ElliotFriedman ElliotFriedman Jun 26, 2024

Choose a reason for hiding this comment

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

looks like we can make this function view

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Earlier I was unable to make this function view, it caused compilation error. It got fixed after I updated the forge-std submodule.

super.run();
}

function validate() public override {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this function view?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Earlier I was unable to make this function view, it caused compilation error. It got fixed after I updated the forge-std submodule.

address governor = addresses.getAddress("PROTOCOL_GOVERNOR");

address payable timelock = payable(
addresses.getAddress("PROTOCOL_TIMELOCK_BRAVO")
);

vm.startBroadcast();

// Deploy mock GovernorAlpha
address govAlpha = address(new MockGovernorAlpha());
Copy link
Contributor

Choose a reason for hiding this comment

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

let's do an isAddressSet check here before we create this new contract

Comment on lines 4 to 8
import "@openzeppelin/governance/Governor.sol";
import "@openzeppelin/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/governance/extensions/GovernorTimelockControl.sol";
Copy link
Contributor

Choose a reason for hiding this comment

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

style: import {ContractName} from ..

Copy link

Proposal output for src/proposals/simple-vault-bravo/BravoProposal_02.sol:

------------------ Proposal Actions ------------------
  1). calling 0x8eF4DbBaE34B02330491795f76d6544b5e8fE5e1 with 0 eth and 0xd9caed12000000000000000000000000ffc112cd15708a68eed64a2ac6ef558a05441c0b000000000000000000000000f75c465c091bdcb9d28a767aac44d4aafa4b7af1000000000000000000000000000000000000000000084595161401484a000000 data.
  target: 0x8eF4DbBaE34B02330491795f76d6544b5e8fE5e1
payload
  0xd9caed12000000000000000000000000ffc112cd15708a68eed64a2ac6ef558a05441c0b000000000000000000000000f75c465c091bdcb9d28a767aac44d4aafa4b7af1000000000000000000000000000000000000000000084595161401484a000000
  

  

------------------ Proposal Calldata ------------------
  0xda95691a00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008ef4dbbae34b02330491795f76d6544b5e8fe5e100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000064d9caed12000000000000000000000000ffc112cd15708a68eed64a2ac6ef558a05441c0b000000000000000000000000f75c465c091bdcb9d28a767aac44d4aafa4b7af1000000000000000000000000000000000000000000084595161401484a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015427261766f2070726f706f73616c206d6f636b20320000000000000000000000

@prat-gpt prat-gpt requested a review from ElliotFriedman June 26, 2024 15:14
Copy link
Contributor

@ElliotFriedman ElliotFriedman left a comment

Choose a reason for hiding this comment

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

LGTM!

@ElliotFriedman ElliotFriedman merged commit 7f88837 into main Jun 27, 2024
4 checks passed
@ElliotFriedman ElliotFriedman deleted the feat/simple-governor-oz-example branch June 27, 2024 06:24
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