Skip to content

Commit 7ef98d6

Browse files
committed
draft: update MultiVotes
1 parent 3c7fa1e commit 7ef98d6

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

contracts/governance/utils/Votes.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: MIT
22
// OpenZeppelin Contracts (last updated v5.5.0) (governance/utils/Votes.sol)
3-
pragma solidity ^0.8.26;
3+
pragma solidity ^0.8.24;
44

55
import {IERC5805} from "../../interfaces/IERC5805.sol";
66
import {Context} from "../../utils/Context.sol";

contracts/mocks/VotesMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract contract VotesMock is Votes {
2626

2727
function _burn(address account, uint256 votes) internal {
2828
_transferVotingUnits(account, address(0), votes);
29-
_votingUnits[account] -= votes;
29+
_votingUnits[account] += votes;
3030
}
3131
}
3232

test/governance/utils/Votes.behavior.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -275,21 +275,6 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true }
275275
});
276276
});
277277

278-
describe('burning', async function () {
279-
beforeEach(async function () {
280-
await this.votes.$_mint(this.delegator, 100);
281-
});
282-
283-
it('burns', async function () {
284-
await this.votes.$_burn(this.delegator, 50);
285-
expect(await this.votes.$_getVotingUnits(this.delegator)).to.equal(50);
286-
});
287-
288-
it('rejects more than available burn', async function () {
289-
await expect(this.votes.$_burn(this.delegator, 101)).to.be.reverted;
290-
});
291-
});
292-
293278
// The following tests are an adaptation of
294279
// https://github.com/compound-finance/compound-protocol/blob/master/tests/Governance/CompTest.js.
295280
describe('Compound test suite', function () {

0 commit comments

Comments
 (0)