Skip to content

Commit

Permalink
clean test
Browse files Browse the repository at this point in the history
  • Loading branch information
SegueII committed Nov 14, 2024
1 parent d302171 commit 62fa351
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions contracts/contracts/test/Gov.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ contract GovTest is L2StakingBaseTest {
uint256 proposalID = gov.createProposal(proposal);
hevm.stopPrank();

// console.logString("......................");
// console.logUint(proposalID);
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

uint256 voteCnt = 0;
for (uint256 i = 0; i < SEQUENCER_SIZE; i++) {
user = address(uint160(beginSeq + i));
Expand All @@ -122,11 +117,6 @@ contract GovTest is L2StakingBaseTest {
assertTrue(executed);
assertEq(block.timestamp + VOTING_DURATION, expirationTime);

// console.logString("......................");
// console.logUint(proposalID);
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

(finished, passed, executed) = gov.proposalStatus(proposalID);
assertTrue(finished);
assertTrue(passed);
Expand Down Expand Up @@ -489,13 +479,6 @@ contract GovTest is L2StakingBaseTest {
assertEq(gov.rollupEpoch(), ROLLUP_EPOCH);
assertEq(gov.undeletedProposalStart(), 0);

console.logString("......................");
console.logString("first proposal executed");
console.logUint(gov.currentProposalID());
console.logUint(gov.undeletedProposalStart());
console.logUint(gov.latestExecutedProposalID());
console.logString("......................");

hevm.prank(address(user));
uint256 latestExecutedProposalID = gov.latestExecutedProposalID();
hevm.expectRevert("only allow to delete the proposal befor latest passed proposal");
Expand Down Expand Up @@ -546,24 +529,10 @@ contract GovTest is L2StakingBaseTest {
assertEq(gov.rollupEpoch(), ROLLUP_EPOCH);
assertEq(gov.undeletedProposalStart(), 0);

// console.logString("......................");
// console.logString("first proposal executed");
// console.logUint(gov.currentProposalID());
// console.logUint(gov.undeletedProposalStart());
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

hevm.prank(address(user));
gov.cleanUpExpiredProposals(gov.latestExecutedProposalID() - 1);
hevm.stopPrank();

// console.logString("......................");
// console.logString("cleared");
// console.logUint(gov.currentProposalID());
// console.logUint(gov.undeletedProposalStart());
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

assertEq(gov.undeletedProposalStart(), 1);

IGov.ProposalData memory proposal1 = IGov.ProposalData(
Expand Down Expand Up @@ -595,24 +564,10 @@ contract GovTest is L2StakingBaseTest {
assertTrue(passed);
assertTrue(executed);

// console.logString("......................");
// console.logString("second proposal executed");
// console.logUint(gov.currentProposalID());
// console.logUint(gov.undeletedProposalStart());
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

hevm.prank(address(user));
gov.cleanUpExpiredProposals(gov.latestExecutedProposalID() - 1);
hevm.stopPrank();

// console.logString("......................");
// console.logString("cleared");
// console.logUint(gov.currentProposalID());
// console.logUint(gov.undeletedProposalStart());
// console.logUint(gov.latestExecutedProposalID());
// console.logString("......................");

assertEq(gov.undeletedProposalStart(), gov.currentProposalID());
assertEq(gov.undeletedProposalStart(), 2);

Expand Down

0 comments on commit 62fa351

Please sign in to comment.