governance_utils_Votes.sol.patch 877 B

1234567891011121314151617181920212223242526
  1. --- governance/utils/Votes.sol 2023-08-21 16:07:18.144728664 +0200
  2. +++ governance/utils/Votes.sol 2023-08-25 10:52:12.904396821 +0200
  3. @@ -217,6 +217,10 @@
  4. return SafeCast.toUint32(_delegateCheckpoints[account].length());
  5. }
  6. + function _numCheckpointsTotalSupply() internal view virtual returns (uint32) {
  7. + return SafeCast.toUint32(_totalCheckpoints[account].length());
  8. + }
  9. +
  10. /**
  11. * @dev Get the `pos`-th checkpoint for `account`.
  12. */
  13. @@ -227,6 +231,12 @@
  14. return _delegateCheckpoints[account].at(pos);
  15. }
  16. + function _checkpointsTotalSupply(
  17. + uint32 pos
  18. + ) internal view virtual returns (Checkpoints.Checkpoint224 memory) {
  19. + return _totalCheckpoints.at(pos);
  20. + }
  21. +
  22. function _push(
  23. Checkpoints.Trace224 storage store,
  24. function(uint224, uint224) view returns (uint224) op,