Skip to content

Commit 76eee35

Browse files
mw2000Amxx
andauthoredMar 25, 2022
Improve revert message in Governor (#3275)
* Fixed typo * fix testing and adding changelog Co-authored-by: Hadrien Croubois <[email protected]>
1 parent bfff03c commit 76eee35

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed
 

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
* `ERC1155`: Add a `_afterTokenTransfer` hook for improved extensibility. ([#3166](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3166))
99
* `DoubleEndedQueue`: a new data structure that supports efficient push and pop to both front and back, useful for FIFO and LIFO queues. ([#3153](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3153))
1010
* `Governor`: improved security of `onlyGovernance` modifier when using an external executor contract (e.g. a timelock) that can operate without necessarily going through the governance protocol. ([#3147](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3147))
11-
* `ERC20FlashMint`: support infinite allowance when paying back a flash loan. ([#3226](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3226))
1211
* `Governor`: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. The `params` argument added to `_countVote` method, and included in the newly added `_getVotes` method, can be used by counting and voting modules respectively for such purposes. ([#3043](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3043))
12+
* `Governor`: rewording of revert reason for consistency. ([#3275](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3275))
13+
* `ERC20FlashMint`: support infinite allowance when paying back a flash loan. ([#3226](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3226))
1314
* `TimelockController`: Add a separate canceller role for the ability to cancel. ([#3165](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3165))
1415
* `draft-ERC20Permit`: replace `immutable` with `constant` for `_PERMIT_TYPEHASH` since the `keccak256` of string literals is treated specially and the hash is evaluated at compile time. ([#3196](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3196))
1516
* `ERC20Wrapper`: the `decimals()` function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. ([#3259](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3259))

‎contracts/governance/Governor.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
250250
) public virtual override returns (uint256) {
251251
require(
252252
getVotes(_msgSender(), block.number - 1) >= proposalThreshold(),
253-
"GovernorCompatibilityBravo: proposer votes below proposal threshold"
253+
"Governor: proposer votes below proposal threshold"
254254
);
255255

256256
uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));

‎test/governance/compatibility/GovernorCompatibilityBravo.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ contract('GovernorCompatibilityBravo', function (accounts) {
218218
it('if proposal does not meet proposalThreshold', async function () {
219219
await expectRevert(
220220
this.helper.propose({ from: other }),
221-
'GovernorCompatibilityBravo: proposer votes below proposal threshold',
221+
'Governor: proposer votes below proposal threshold',
222222
);
223223
});
224224
});

0 commit comments

Comments
 (0)
Please sign in to comment.