Skip to content

Commit

Permalink
Address merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed May 30, 2024
1 parent add9ea1 commit 5e7a9de
Showing 1 changed file with 0 additions and 66 deletions.
66 changes: 0 additions & 66 deletions test/OptimisticTokenVotingPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,7 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
}

function test_CreateProposalEndsAfterMinDurationOnlyL1Tokens() public {
<<<<<<< HEAD
vm.warp(50 days - 1);
=======
setTime(50 days - 1);
>>>>>>> cd6330a (New features tested)

// L2 Paused
(dao, optimisticPlugin,,, votingToken, taikoL1) = builder.withPausedTaikoL1().build();
Expand Down Expand Up @@ -1425,23 +1421,13 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
uint256 proposalId = optimisticPlugin.createProposal("ipfs://", actions, 0, 4 days);

optimisticPlugin.veto(proposalId); // 33%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 66% (below 70%)
// bridge supply counts but doesn't veto

vm.warp(block.timestamp + 4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 66% (below 70%)
// bridge supply counts but doesn't veto

timeForward(4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
assertEq(optimisticPlugin.canExecute(proposalId), true, "The proposal should be executable");

// L2 paused, less token supply
Expand All @@ -1452,21 +1438,12 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
proposalId = optimisticPlugin.createProposal("ipfs://", actions, 0, 4 days);

optimisticPlugin.veto(proposalId); // 50%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

vm.warp(block.timestamp + 4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

timeForward(4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");

// L2 out of sync, less token supply
Expand All @@ -1477,21 +1454,12 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
proposalId = optimisticPlugin.createProposal("ipfs://", actions, 0, 4 days);

optimisticPlugin.veto(proposalId); // 50%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

vm.warp(block.timestamp + 4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

timeForward(4 days); // end
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
assertEq(optimisticPlugin.canExecute(proposalId), false, "The proposal should not be executable");
}

Expand Down Expand Up @@ -1751,29 +1719,17 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
assertEq(parameters.skipL2, false, "Should not skip the L2 census");

optimisticPlugin.veto(proposalId); // 33%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 66% (below 70%)
// bridge supply counts but doesn't veto

vm.warp(block.timestamp + 4 days); // end
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 66% (below 70%)
// bridge supply counts but doesn't veto

timeForward(4 days); // end
>>>>>>> cd6330a (New features tested)
vm.expectRevert(
abi.encodeWithSelector(OptimisticTokenVotingPlugin.ProposalExecutionForbidden.selector, proposalId)
);
optimisticPlugin.execute(proposalId);
// ok
<<<<<<< HEAD
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
optimisticPlugin.execute(proposalId);

// L2 paused, less token supply
Expand All @@ -1787,27 +1743,16 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
assertEq(parameters.skipL2, true, "Should skip the L2 census");

optimisticPlugin.veto(proposalId); // 50%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

vm.warp(block.timestamp + 4 days); // end
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

timeForward(4 days); // end
>>>>>>> cd6330a (New features tested)
vm.expectRevert(
abi.encodeWithSelector(OptimisticTokenVotingPlugin.ProposalExecutionForbidden.selector, proposalId)
);
optimisticPlugin.execute(proposalId);

<<<<<<< HEAD
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
vm.expectRevert(
abi.encodeWithSelector(OptimisticTokenVotingPlugin.ProposalExecutionForbidden.selector, proposalId)
);
Expand All @@ -1824,27 +1769,16 @@ contract OptimisticTokenVotingPluginTest is AragonTest {
assertEq(parameters.skipL2, true, "Should skip the L2 census");

optimisticPlugin.veto(proposalId); // 50%
<<<<<<< HEAD
vm.startPrank(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

vm.warp(block.timestamp + 4 days); // end
=======
switchTo(bob);
optimisticPlugin.veto(proposalId); // 100% (above 70%)

timeForward(4 days); // end
>>>>>>> cd6330a (New features tested)
vm.expectRevert(
abi.encodeWithSelector(OptimisticTokenVotingPlugin.ProposalExecutionForbidden.selector, proposalId)
);
optimisticPlugin.execute(proposalId);

<<<<<<< HEAD
vm.warp(block.timestamp + builder.l2AggregationGracePeriod()); // grace period over
=======
timeForward(builder.l2AggregationGracePeriod()); // grace period over
>>>>>>> cd6330a (New features tested)
vm.expectRevert(
abi.encodeWithSelector(OptimisticTokenVotingPlugin.ProposalExecutionForbidden.selector, proposalId)
);
Expand Down

0 comments on commit 5e7a9de

Please sign in to comment.