Skip to content

Commit

Permalink
document
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Aug 30, 2023
1 parent b2cd627 commit bd9595d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/token/ERC20/extensions/ERC20Votes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ abstract contract ERC20Votes is ERC20, Votes {

/**
* @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1).
*
* This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwize a uint256, so
* that checkpoints can be stored in Trace208 structure used by {{Votes}}. Increasing this value will not remove
* the underlying limitation, and will the {_update} to fail because of a math overflow in {_transferVotingUnits}.
* An override could be used to further restrict the total supply (to a lower value) if additional logic requires
* it. When resolving override conflicts on this function, the minimum should be returned.
*/
function _maxSupply() internal view virtual returns (uint256) {
return type(uint208).max;
Expand Down

0 comments on commit bd9595d

Please sign in to comment.