Skip to content

Commit

Permalink
fix: compilers warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Jul 23, 2024
1 parent 4730bec commit be3ca53
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
4 changes: 0 additions & 4 deletions test/fuzz/Redeem.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ contract RedeemFuzzTest is ERC4626StrategyTest {

for (uint256 i = 0; i < 5; i++) {
uint256 previousBalance = strategy.balanceOf(alice);

uint256 totalAssets = strategy.totalAssets();
uint256 lastTotalAssets = strategy.lastTotalAssets();

uint256 previousAssetBalance = IERC20(asset).balanceOf(alice);

vm.startPrank(alice);
Expand Down
2 changes: 1 addition & 1 deletion test/fuzz/Swap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ contract SwapFuzzTest is ERC4626StrategyTest {
.zeroFloorSub(strategy.lockedProfit())
);

uint256 lastLockedProfit = strategy.lockedProfit();
lastLockedProfit = strategy.lockedProfit();

vm.warp(block.timestamp + timeOffsets[i]);
}
Expand Down
2 changes: 0 additions & 2 deletions test/unit/Accumulate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ contract AccumulateTest is ERC4626StrategyTest {
IERC20(asset).approve(address(strategy), 100e18);
strategy.deposit(100e18, alice);
vm.stopPrank();
uint256 balance = ERC4626(strategyAsset).balanceOf(address(strategy));
uint256 lastTotalAssets = strategy.lastTotalAssets();
vm.warp(block.timestamp + 1 weeks);

vm.mockCall(strategyAsset, abi.encodeWithSelector(IERC20.balanceOf.selector), abi.encode(9e18));
Expand Down
4 changes: 2 additions & 2 deletions test/unit/Constructor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.26;
import "../ERC4626StrategyTest.t.sol";

contract ConstructorTest is ERC4626StrategyTest {
function test_constructor_Normal() public {
function test_constructor_Normal() public view {
assertEq(strategy.vestingPeriod(), 1 weeks);
assertEq(strategy.performanceFee(), 10_000);
assertEq(strategy.developerFee(), 20_000);
Expand All @@ -19,7 +19,7 @@ contract ConstructorTest is ERC4626StrategyTest {
assertEq(strategy.lockedProfit(), 0);
}

function test_constructor_CorrectRoles() public {
function test_constructor_CorrectRoles() public view {
assertTrue(strategy.hasRole(strategy.DEVELOPER_ROLE(), developer));
assertTrue(strategy.hasRole(strategy.INTEGRATOR_ROLE(), integrator));
assertTrue(strategy.hasRole(strategy.KEEPER_ROLE(), keeper));
Expand Down
1 change: 0 additions & 1 deletion test/unit/Deposit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ contract DepositTest is ERC4626StrategyTest {

vm.mockCall(strategyAsset, abi.encodeWithSelector(IERC20.balanceOf.selector), abi.encode(9e18));
uint256 previewedDeposit = strategy.previewDeposit(100e18);
uint256 previousBalance = ERC4626(strategyAsset).balanceOf(address(strategy));

vm.prank(alice);
vm.mockCall(strategyAsset, abi.encodeWithSelector(IERC20.balanceOf.selector), abi.encode(9e18));
Expand Down
2 changes: 1 addition & 1 deletion test/unit/MaxMint.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.26;
import "../ERC4626StrategyTest.t.sol";

contract MaxMintTest is ERC4626StrategyTest {
function test_MaxMint_Normal() public {
function test_MaxMint_Normal() public view {
assertEq(strategy.maxMint(alice), ERC4626(strategyAsset).maxMint(address(strategy)));
}

Expand Down

0 comments on commit be3ca53

Please sign in to comment.