File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
contracts/token/ERC20/extensions Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ abstract contract ERC20Votes is ERC20, Votes {
28
28
29
29
/**
30
30
* @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1).
31
+ *
32
+ * This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwize a uint256, so
33
+ * that checkpoints can be stored in Trace208 structure used by {{Votes}}. Increasing this value will not remove
34
+ * the underlying limitation, and will the {_update} to fail because of a math overflow in {_transferVotingUnits}.
35
+ * An override could be used to further restrict the total supply (to a lower value) if additional logic requires
36
+ * it. When resolving override conflicts on this function, the minimum should be returned.
31
37
*/
32
38
function _maxSupply () internal view virtual returns (uint256 ) {
33
39
return type (uint208 ).max;
You can’t perform that action at this time.
0 commit comments