Skip to content

Commit

Permalink
fix: asset is erc20
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Oct 12, 2023
1 parent 4c2c2e2 commit 2226996
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/mocks/MockHealthCheck.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ contract MockHealthCheck is BaseHealthCheck {
{
require(_healthy(), "unhealthy");

_totalAssets = ERC20(asset).balanceOf(address(this));
_totalAssets = asset.balanceOf(address(this));

_executeHealthCheck(_totalAssets);
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockSolidlySwapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract MockSolidlySwapper is BaseStrategy, SolidlySwapper {
override
returns (uint256 _totalAssets)
{
_totalAssets = ERC20(asset).balanceOf(address(this));
_totalAssets = asset.balanceOf(address(this));
}

function setMinAmountToSell(uint256 _minAmountToSell) external {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract MockStrategy is BaseStrategy {
override
returns (uint256 _totalAssets)
{
_totalAssets = ERC20(asset).balanceOf(address(this));
_totalAssets = asset.balanceOf(address(this));
}

function _tendTrigger() internal view override returns (bool) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockUniswapV2Swapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract MockUniswapV2Swapper is BaseStrategy, UniswapV2Swapper {
override
returns (uint256 _totalAssets)
{
_totalAssets = ERC20(asset).balanceOf(address(this));
_totalAssets = asset.balanceOf(address(this));
}

function setMinAmountToSell(uint256 _minAmountToSell) external {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockUniswapV3Swapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract MockUniswapV3Swapper is BaseStrategy, UniswapV3Swapper {
override
returns (uint256 _totalAssets)
{
_totalAssets = ERC20(asset).balanceOf(address(this));
_totalAssets = asset.balanceOf(address(this));
}

function setMinAmountToSell(uint256 _minAmountToSell) external {
Expand Down
5 changes: 2 additions & 3 deletions src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,10 @@ contract Setup is ExtendedTest {

vm.prank(management);
// Give the vault manager all the roles
vault.add_role(vaultManagement, 16383);
_vault.set_role(vaultManagement, 16383);

vm.prank(vaultManagement);
vault.set_deposit_limit(type(uint256).max);

_vault.set_deposit_limit(type(uint256).max);

return _vault;
}
Expand Down

0 comments on commit 2226996

Please sign in to comment.