Skip to content

Commit

Permalink
remove GovernorVotesComp and GovernorVotesComp
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed May 25, 2023
1 parent d1bd445 commit baaf484
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 813 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
The following contracts were removed:

- `ERC20Snapshot`
- `ERC20VotesComp`
- `GovernorVotesComp`
- `PaymentSplitter`
- `TokenTimelock` (removed in favor of `VestinWallet`)

Expand Down
4 changes: 0 additions & 4 deletions contracts/governance/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Votes modules determine the source of voting power, and sometimes quorum number.

* {GovernorVotes}: Extracts voting weight from an {ERC20Votes}, or since v4.5 an {ERC721Votes} token.

* {GovernorVotesComp}: Extracts voting weight from a COMP-like or {ERC20VotesComp} token.

* {GovernorVotesQuorumFraction}: Combines with `GovernorVotes` to set the quorum as a fraction of the total token supply.

Counting modules determine valid voting options.
Expand Down Expand Up @@ -66,8 +64,6 @@ NOTE: Functions of the `Governor` contract do not include access control. If you

{{GovernorVotesQuorumFraction}}

{{GovernorVotesComp}}

=== Extensions

{{GovernorTimelockControl}}
Expand Down
55 changes: 0 additions & 55 deletions contracts/governance/extensions/GovernorVotesComp.sol

This file was deleted.

20 changes: 0 additions & 20 deletions contracts/mocks/governance/GovernorCompMock.sol

This file was deleted.

4 changes: 2 additions & 2 deletions contracts/mocks/governance/GovernorCompatibilityBravoMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ pragma solidity ^0.8.0;
import "../../governance/compatibility/GovernorCompatibilityBravo.sol";
import "../../governance/extensions/GovernorTimelockCompound.sol";
import "../../governance/extensions/GovernorSettings.sol";
import "../../governance/extensions/GovernorVotesComp.sol";
import "../../governance/extensions/GovernorVotes.sol";

abstract contract GovernorCompatibilityBravoMock is
GovernorCompatibilityBravo,
GovernorSettings,
GovernorTimelockCompound,
GovernorVotesComp
GovernorVotes
{
function quorum(uint256) public pure override returns (uint256) {
return 0;
Expand Down
12 changes: 0 additions & 12 deletions contracts/mocks/token/VotesTimestamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pragma solidity ^0.8.0;

import "../../token/ERC20/extensions/ERC20Votes.sol";
import "../../token/ERC20/extensions/ERC20VotesComp.sol";
import "../../token/ERC721/extensions/ERC721Votes.sol";

abstract contract ERC20VotesTimestampMock is ERC20Votes {
Expand All @@ -17,17 +16,6 @@ abstract contract ERC20VotesTimestampMock is ERC20Votes {
}
}

abstract contract ERC20VotesCompTimestampMock is ERC20VotesComp {
function clock() public view virtual override returns (uint48) {
return SafeCast.toUint48(block.timestamp);
}

// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() public view virtual override returns (string memory) {
return "mode=timestamp";
}
}

abstract contract ERC721VotesTimestampMock is ERC721Votes {
function clock() public view virtual override returns (uint48) {
return SafeCast.toUint48(block.timestamp);
Expand Down
3 changes: 0 additions & 3 deletions contracts/token/ERC20/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Additionally there are multiple custom extensions, including:
* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).
* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).
* {ERC20Votes}: support for voting and vote delegation.
* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).
* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.
* {ERC4626}: tokenized vault that manages shares (represented as ERC20) that are backed by assets (another ERC20).
Expand Down Expand Up @@ -55,8 +54,6 @@ NOTE: This core set of contracts is designed to be unopinionated, allowing devel

{{ERC20Votes}}

{{ERC20VotesComp}}

{{ERC20Wrapper}}

{{ERC20FlashMint}}
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/ERC20/extensions/ERC20Votes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "../../../utils/math/SafeCast.sol";
* @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,
* and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.
*
* NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.
* NOTE: This contract does not provide interface compatibility with Compound's COMP token.
*
* This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
* by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting
Expand Down
46 changes: 0 additions & 46 deletions contracts/token/ERC20/extensions/ERC20VotesComp.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function makeContractAddress(creator, nonce) {
}

const TOKENS = [
{ Token: artifacts.require('$ERC20VotesComp'), mode: 'blocknumber' },
{ Token: artifacts.require('$ERC20VotesCompTimestampMock'), mode: 'timestamp' },
{ Token: artifacts.require('$ERC20Votes'), mode: 'blocknumber' },
{ Token: artifacts.require('$ERC20VotesTimestampMock'), mode: 'timestamp' },
];

contract('GovernorCompatibilityBravo', function (accounts) {
Expand Down
89 changes: 0 additions & 89 deletions test/governance/extensions/GovernorComp.test.js

This file was deleted.

0 comments on commit baaf484

Please sign in to comment.