Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(test): use market-lib #170

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions test/forge/Blue.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {OracleMock as Oracle} from "src/mocks/OracleMock.sol";
import {IrmMock as Irm} from "src/mocks/IrmMock.sol";

contract BlueTest is Test {
using MarketLib for Market;
using FixedPointMathLib for uint256;

address private constant BORROWER = address(1234);
Expand Down Expand Up @@ -37,15 +38,17 @@ contract BlueTest is Test {
collateralOracle = new Oracle();

irm = new Irm(blue);
market = Market(

Market memory _market = Market(
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
IERC20(address(borrowableAsset)),
IERC20(address(collateralAsset)),
borrowableOracle,
collateralOracle,
irm,
LLTV
);
id = Id.wrap(keccak256(abi.encode(market)));
market = _market;
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
id = _market.id();
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

vm.startPrank(OWNER);
blue.enableIrm(irm);
Expand Down