Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions test/mocks/MockLowLevelVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ pragma solidity ^0.8.28;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ILowLevelVault} from "src/interfaces/ILowLevelVault.sol";
import {IstEth} from "src/interfaces/tokens/IstEth.sol";
import {IWhitelistRegistry} from "src/interfaces/IWhitelistRegistry.sol";

contract MockWhitelistRegistry is IWhitelistRegistry {
function isAddressWhitelisted(address) external pure returns (bool) {
return true;
}
}

// forge-lint: disable-start
contract MockLowLevelVault is ILowLevelVault {
Expand All @@ -23,9 +30,12 @@ contract MockLowLevelVault is ILowLevelVault {
uint256 constant TARGET_LTV_DIVIDEND = 3;
uint256 constant TARGET_LTV_DIVIDER = 4;

IWhitelistRegistry public immutable _whitelistRegistry;

constructor(address _collateralToken, address _borrowToken) {
collateralToken = IERC20(_collateralToken);
borrowToken = IERC20(_borrowToken);
_whitelistRegistry = new MockWhitelistRegistry();
}

function previewLowLevelRebalanceShares(int256 deltaShares)
Expand Down Expand Up @@ -96,8 +106,8 @@ contract MockLowLevelVault is ILowLevelVault {
return true;
}

function whitelistRegistry() external pure returns (address) {
return address(0);
function whitelistRegistry() external view returns (address) {
return address(_whitelistRegistry);
}
}

Expand Down