Implement suggestions from audit of 4.9 (#4176)
Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
@ -50,7 +50,7 @@ abstract contract ERC20Votes is ERC20Permit, IERC5805 {
|
||||
// solhint-disable-next-line func-name-mixedcase
|
||||
function CLOCK_MODE() public view virtual override returns (string memory) {
|
||||
// Check that the clock was not modified
|
||||
require(clock() == block.number);
|
||||
require(clock() == block.number, "ERC20Votes: broken clock mode");
|
||||
return "mode=blocknumber&from=default";
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,8 @@ abstract contract ERC721Votes is ERC721, Votes {
|
||||
|
||||
/**
|
||||
* @dev Returns the balance of `account`.
|
||||
*
|
||||
* WARNING: Overriding this function will likely result in incorrect vote tracking.
|
||||
*/
|
||||
function _getVotingUnits(address account) internal view virtual override returns (uint256) {
|
||||
return balanceOf(account);
|
||||
|
||||
Reference in New Issue
Block a user