Skip to content

Commit

Permalink
Add flexible voting using latest OZ contracts (#21)
Browse files Browse the repository at this point in the history
* Removed previous OZ contracts library of 5.0.2

* forge install: openzeppelin-contracts-upgradeable

v5.1.0-rc.0

* Update governor to use GovernorCountingFractional from OZ 5.1 (which requires EVM version 'cancun')
  • Loading branch information
jferas authored and wildmolasses committed Nov 1, 2024
1 parent 7b12187 commit 62799b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions contracts/CompoundGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Ini
import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";
import {GovernorVotesUpgradeable} from
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";
import {GovernorCountingSimpleUpgradeable} from
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";
import {GovernorSettableFixedQuorumUpgradeable} from "contracts/extensions/GovernorSettableFixedQuorumUpgradeable.sol";
import {GovernorCountingFractionalUpgradeable} from
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingFractionalUpgradeable.sol";
import {GovernorTimelockCompoundUpgradeable} from
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockCompoundUpgradeable.sol";
import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";
Expand All @@ -28,7 +28,7 @@ contract CompoundGovernor is
GovernorVotesUpgradeable,
GovernorTimelockCompoundUpgradeable,
GovernorSettingsUpgradeable,
GovernorCountingSimpleUpgradeable,
GovernorCountingFractionalUpgradeable,
GovernorPreventLateQuorumUpgradeable,
GovernorSettableFixedQuorumUpgradeable,
OwnableUpgradeable
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
evm_version = "shanghai"
evm_version = "cancun"
optimizer = true
optimizer_runs = 200
solc_version = "0.8.26"
Expand Down
3 changes: 3 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const config: HardhatUserConfig = {
enabled: true,
runs: 200,
},
evmVersion: "cancun",
},
},
{
Expand All @@ -24,6 +25,7 @@ const config: HardhatUserConfig = {
enabled: true,
runs: 200,
},
evmVersion: "cancun",
},
},
{
Expand All @@ -33,6 +35,7 @@ const config: HardhatUserConfig = {
enabled: true,
runs: 200,
},
evmVersion: "cancun",
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts-upgradeable

0 comments on commit 62799b8

Please sign in to comment.