applyHarness.patch 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. diff -ruN .gitignore .gitignore
  2. --- .gitignore 1969-12-31 19:00:00.000000000 -0500
  3. +++ .gitignore 2021-12-09 14:46:33.923637220 -0500
  4. @@ -0,0 +1,2 @@
  5. +*
  6. +!.gitignore
  7. diff -ruN governance/compatibility/GovernorCompatibilityBravo.sol governance/compatibility/GovernorCompatibilityBravo.sol
  8. --- governance/compatibility/GovernorCompatibilityBravo.sol 2021-12-03 15:24:56.523654357 -0500
  9. +++ governance/compatibility/GovernorCompatibilityBravo.sol 2021-12-09 14:46:33.923637220 -0500
  10. @@ -245,7 +245,7 @@
  11. /**
  12. * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.
  13. */
  14. - function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
  15. + function _quorumReached(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
  16. ProposalDetails storage details = _proposalDetails[proposalId];
  17. return quorum(proposalSnapshot(proposalId)) <= details.forVotes;
  18. }
  19. @@ -253,7 +253,7 @@
  20. /**
  21. * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.
  22. */
  23. - function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
  24. + function _voteSucceeded(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
  25. ProposalDetails storage details = _proposalDetails[proposalId];
  26. return details.forVotes > details.againstVotes;
  27. }
  28. diff -ruN governance/extensions/GovernorCountingSimple.sol governance/extensions/GovernorCountingSimple.sol
  29. --- governance/extensions/GovernorCountingSimple.sol 2021-12-03 15:24:56.523654357 -0500
  30. +++ governance/extensions/GovernorCountingSimple.sol 2021-12-09 14:46:33.923637220 -0500
  31. @@ -64,7 +64,7 @@
  32. /**
  33. * @dev See {Governor-_quorumReached}.
  34. */
  35. - function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
  36. + function _quorumReached(uint256 proposalId) public view virtual override returns (bool) {
  37. ProposalVote storage proposalvote = _proposalVotes[proposalId];
  38. return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes;
  39. @@ -73,7 +73,7 @@
  40. /**
  41. * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes.
  42. */
  43. - function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
  44. + function _voteSucceeded(uint256 proposalId) public view virtual override returns (bool) {
  45. ProposalVote storage proposalvote = _proposalVotes[proposalId];
  46. return proposalvote.forVotes > proposalvote.againstVotes;
  47. diff -ruN governance/extensions/GovernorTimelockControl.sol governance/extensions/GovernorTimelockControl.sol
  48. --- governance/extensions/GovernorTimelockControl.sol 2021-12-03 15:24:56.523654357 -0500
  49. +++ governance/extensions/GovernorTimelockControl.sol 2021-12-09 14:46:33.923637220 -0500
  50. @@ -111,7 +111,7 @@
  51. bytes[] memory calldatas,
  52. bytes32 descriptionHash
  53. ) internal virtual override {
  54. - _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);
  55. + _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);
  56. }
  57. /**
  58. diff -ruN governance/Governor.sol governance/Governor.sol
  59. --- governance/Governor.sol 2021-12-03 15:24:56.523654357 -0500
  60. +++ governance/Governor.sol 2021-12-09 14:46:56.411503587 -0500
  61. @@ -38,8 +38,8 @@
  62. string private _name;
  63. - mapping(uint256 => ProposalCore) private _proposals;
  64. -
  65. + mapping(uint256 => ProposalCore) public _proposals;
  66. +
  67. /**
  68. * @dev Restrict access to governor executing address. Some module might override the _executor function to make
  69. * sure this modifier is consistant with the execution model.
  70. @@ -167,12 +167,12 @@
  71. /**
  72. * @dev Amount of votes already cast passes the threshold limit.
  73. */
  74. - function _quorumReached(uint256 proposalId) internal view virtual returns (bool);
  75. + function _quorumReached(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public from internal
  76. /**
  77. * @dev Is the proposal successful or not.
  78. */
  79. - function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);
  80. + function _voteSucceeded(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public from internal
  81. /**
  82. * @dev Register a vote with a given support and voting weight.
  83. diff -ruN token/ERC20/extensions/ERC20Votes.sol token/ERC20/extensions/ERC20Votes.sol
  84. --- token/ERC20/extensions/ERC20Votes.sol 2021-12-03 15:24:56.527654330 -0500
  85. +++ token/ERC20/extensions/ERC20Votes.sol 2021-12-09 14:46:33.927637196 -0500
  86. @@ -84,7 +84,7 @@
  87. *
  88. * - `blockNumber` must have been already mined
  89. */
  90. - function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {
  91. + function getPastVotes(address account, uint256 blockNumber) public view virtual returns (uint256) {
  92. require(blockNumber < block.number, "ERC20Votes: block not yet mined");
  93. return _checkpointsLookup(_checkpoints[account], blockNumber);
  94. }