|
@@ -61,7 +61,7 @@ abstract contract ERC20Votes is IVotes, ERC20Permit {
|
|
/**
|
|
/**
|
|
* @dev Gets the current votes balance for `account`
|
|
* @dev Gets the current votes balance for `account`
|
|
*/
|
|
*/
|
|
- function getVotes(address account) public view override returns (uint256) {
|
|
|
|
|
|
+ function getVotes(address account) public view virtual override returns (uint256) {
|
|
uint256 pos = _checkpoints[account].length;
|
|
uint256 pos = _checkpoints[account].length;
|
|
return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;
|
|
return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;
|
|
}
|
|
}
|
|
@@ -73,7 +73,7 @@ abstract contract ERC20Votes is IVotes, ERC20Permit {
|
|
*
|
|
*
|
|
* - `blockNumber` must have been already mined
|
|
* - `blockNumber` must have been already mined
|
|
*/
|
|
*/
|
|
- function getPastVotes(address account, uint256 blockNumber) public view override returns (uint256) {
|
|
|
|
|
|
+ function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
|
|
require(blockNumber < block.number, "ERC20Votes: block not yet mined");
|
|
require(blockNumber < block.number, "ERC20Votes: block not yet mined");
|
|
return _checkpointsLookup(_checkpoints[account], blockNumber);
|
|
return _checkpointsLookup(_checkpoints[account], blockNumber);
|
|
}
|
|
}
|
|
@@ -86,7 +86,7 @@ abstract contract ERC20Votes is IVotes, ERC20Permit {
|
|
*
|
|
*
|
|
* - `blockNumber` must have been already mined
|
|
* - `blockNumber` must have been already mined
|
|
*/
|
|
*/
|
|
- function getPastTotalSupply(uint256 blockNumber) public view override returns (uint256) {
|
|
|
|
|
|
+ function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {
|
|
require(blockNumber < block.number, "ERC20Votes: block not yet mined");
|
|
require(blockNumber < block.number, "ERC20Votes: block not yet mined");
|
|
return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);
|
|
return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);
|
|
}
|
|
}
|