diff --git a/foundry.toml b/foundry.toml index f93a49cb..f3e432f9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -2,6 +2,7 @@ src = 'src' out = 'out' libs = ['lib'] +solc = "0.8.18" remappings = [ "@openzeppelin/=lib/openzeppelin-contracts/", diff --git a/src/test/Operation.t.sol b/src/test/Operation.t.sol index 1d14e2f9..dbfd8183 100644 --- a/src/test/Operation.t.sol +++ b/src/test/Operation.t.sol @@ -26,7 +26,9 @@ contract OperationTest is Setup { mintAndDepositIntoStrategy(strategy, user, _amount); // TODO: Implement logic so totalDebt is _amount and totalIdle = 0. - checkStrategyTotals(strategy, _amount, 0, _amount); + assertEq(strategy.totalAssets(), _amount, "!totalAssets"); + assertEq(strategy.totalDebt(), 0, "!totalDebt"); + assertEq(strategy.totalIdle(), _amount, "!totalIdle"); // Earn Interest skip(1 days); @@ -65,7 +67,9 @@ contract OperationTest is Setup { mintAndDepositIntoStrategy(strategy, user, _amount); // TODO: Implement logic so totalDebt is _amount and totalIdle = 0. - checkStrategyTotals(strategy, _amount, 0, _amount); + assertEq(strategy.totalAssets(), _amount, "!totalAssets"); + assertEq(strategy.totalDebt(), 0, "!totalDebt"); + assertEq(strategy.totalIdle(), _amount, "!totalIdle"); // Earn Interest skip(1 days); @@ -111,7 +115,9 @@ contract OperationTest is Setup { mintAndDepositIntoStrategy(strategy, user, _amount); // TODO: Implement logic so totalDebt is _amount and totalIdle = 0. - checkStrategyTotals(strategy, _amount, 0, _amount); + assertEq(strategy.totalAssets(), _amount, "!totalAssets"); + assertEq(strategy.totalDebt(), 0, "!totalDebt"); + assertEq(strategy.totalIdle(), _amount, "!totalIdle"); // Earn Interest skip(1 days); diff --git a/src/test/Shutdown.t.sol b/src/test/Shutdown.t.sol index 9029f9b7..d30b1f76 100644 --- a/src/test/Shutdown.t.sol +++ b/src/test/Shutdown.t.sol @@ -15,7 +15,9 @@ contract ShutdownTest is Setup { mintAndDepositIntoStrategy(strategy, user, _amount); // TODO: Implement logic so totalDebt is _amount and totalIdle = 0. - checkStrategyTotals(strategy, _amount, 0, _amount); + assertEq(strategy.totalAssets(), _amount, "!totalAssets"); + assertEq(strategy.totalDebt(), 0, "!totalDebt"); + assertEq(strategy.totalIdle(), _amount, "!totalIdle"); // Earn Interest skip(1 days); @@ -25,7 +27,9 @@ contract ShutdownTest is Setup { strategy.shutdownStrategy(); // TODO: Implement logic so totalDebt is _amount and totalIdle = 0. - checkStrategyTotals(strategy, _amount, 0, _amount); + assertEq(strategy.totalAssets(), _amount, "!totalAssets"); + assertEq(strategy.totalDebt(), 0, "!totalDebt"); + assertEq(strategy.totalIdle(), _amount, "!totalIdle"); // Make sure we can still withdraw the full amount uint256 balanceBefore = asset.balanceOf(user);