Skip to content

Commit

Permalink
Merge pull request #35 from loreum-org/feat/refactor
Browse files Browse the repository at this point in the history
Feat/refactor
  • Loading branch information
xhad authored Sep 9, 2023
2 parents 60e65bd + f422c0a commit 49daa95
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions test/Chamber.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract ChamberTest is Test, TestUtilities {
chamber.stake(250_000 ether, 4);
chamber.stake(70_000 ether, 5);

(uint8[5] memory ranksTop, uint256[5] memory stakesTop) = chamber.viewRankings();
(uint8[5] memory ranksTop, uint256[5] memory stakesTop) = chamber.getLeaderboard();
(ranksTop, stakesTop);

}
Expand Down Expand Up @@ -81,7 +81,7 @@ contract ChamberTest is Test, TestUtilities {
// Execute Proposal

chamber.approveProposal(1, 1);
chamber.viewRankings();
chamber.getLeaderboard();
}

function test_Chamber_stake (uint256 amount) public {
Expand All @@ -97,7 +97,7 @@ contract ChamberTest is Test, TestUtilities {
assertEq(totalStakeForNft, amount);

vm.stopPrank();
chamber.viewRankings();
chamber.getLeaderboard();

}

Expand All @@ -106,7 +106,7 @@ contract ChamberTest is Test, TestUtilities {
mERC20.approve(address(chamber), 1_000 ether);
chamber.stake(1_000 ether, 1);
chamber.unstake(1_000 ether, 1);
chamber.viewRankings();
chamber.getLeaderboard();
}

function test_Chamber_stakeUnchanged() public {
Expand All @@ -133,7 +133,7 @@ contract ChamberTest is Test, TestUtilities {

chamber.stake(1 ether, 2);
chamber.stake(1 ether, 7);
chamber.viewRankings();
chamber.getLeaderboard();
}

function test_Chamber_unstake (uint256 amount) public {
Expand All @@ -155,7 +155,7 @@ contract ChamberTest is Test, TestUtilities {
uint newTotalStakeForNft = chamber.totalStake(6);
assertEq(newTotalStakeForNft, 0);
vm.stopPrank();
chamber.viewRankings();
chamber.getLeaderboard();
}

function test_Chamber_ethTransfer (uint256 amount) public {
Expand Down
4 changes: 2 additions & 2 deletions test/lifecycle/ProposalCycle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ contract ProposalCycleTest is Test {

function helperLogger() public {
// for logging out the leaderboard
(uint8[5] memory ranksTop, uint256[5] memory stakesTop) = chamber.viewRankings();
(uint8[5] memory ranksTop, uint256[5] memory stakesTop) = chamber.getLeaderboard();
emit Log(ranksTop, stakesTop);
}

Expand Down Expand Up @@ -171,7 +171,7 @@ contract ProposalCycleTest is Test {
assertTrue(state == IChamber.State.Initialized);

// 4. nft holder should not be able to approve if not a leader
chamber.viewRankings();
chamber.getLeaderboard();
vm.startPrank(blackbeard);
vm.expectRevert();
chamber.approveProposal(1, 7);
Expand Down
2 changes: 1 addition & 1 deletion test/performance/ChamberPerf.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract ChamberPerfTest is Test {
address jack = address(4);
address danny = address(5);
address shifty = address(6);
address blackbeard = address(7);
address blackbeard = address(7);

address[7] lorians = [bones,coconut,hurricane,jack,danny,shifty,blackbeard];

Expand Down

0 comments on commit 49daa95

Please sign in to comment.