Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dd0sxx committed Dec 29, 2023
1 parent 812c8be commit 0a36031
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1163,23 +1163,19 @@ contract CastData is LlamaTokenGovernorCasting {
contract GetQuorums is LlamaTokenGovernorCasting {
function test_GetPastQuorum(uint8 iterations) public {
vm.assume(iterations > 0);
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setQuorumPct(0, 0);
vm.warp(block.timestamp + 1);
for (uint256 i = 1; i < iterations; i++) {
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setQuorumPct(uint16(i), uint16(i));
vm.warp(block.timestamp + 1);
uint16 voteQuorum;
uint16 vetoQuorum;
(voteQuorum, vetoQuorum) = llamaERC20TokenGovernor.getPastQuorum(block.timestamp - 1);
assertEq(voteQuorum, uint16(i - 1));
assertEq(vetoQuorum, uint16(i - 1));
assertEq(voteQuorum, uint16(i));
assertEq(vetoQuorum, uint16(i));
}
}

function test_GetQuorumCheckpoints(uint8 iterations) public {
vm.warp(block.timestamp + 1);
for (uint256 i = 0; i < iterations; i++) {
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setQuorumPct(uint16(i + 1), uint16(i + 1));
Expand All @@ -1204,7 +1200,6 @@ contract GetQuorums is LlamaTokenGovernorCasting {
function test_getQuorumCheckpointsWithIndexes(uint8 iterations, uint256 start, uint256 end) public {
vm.assume(start < end);
vm.assume(end <= uint256(iterations) + 1);
vm.warp(block.timestamp + 1);
for (uint256 i = 0; i < iterations; i++) {
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setQuorumPct(uint16(i + 1), uint16(i + 1));
Expand Down Expand Up @@ -1234,7 +1229,6 @@ contract GetPeriodPcts is LlamaTokenGovernorCasting {
}

function test_GetPeriodPctCheckpoints(uint8 iterations) public {
vm.warp(block.timestamp + 1);
for (uint256 i = 0; i < iterations; i++) {
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setPeriodPct(uint16(i + 1), uint16(i + 1));
Expand All @@ -1259,7 +1253,6 @@ contract GetPeriodPcts is LlamaTokenGovernorCasting {
function test_getPeriodPctCheckpointsWithIndexes(uint8 iterations, uint256 start, uint256 end) public {
vm.assume(start < end);
vm.assume(end <= uint256(iterations));
vm.warp(block.timestamp + 1);
for (uint256 i = 0; i < iterations; i++) {
vm.prank(address(EXECUTOR));
llamaERC20TokenGovernor.setPeriodPct(uint16(i + 1), uint16(i + 1));
Expand Down

0 comments on commit 0a36031

Please sign in to comment.