-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:morpho-labs/blue into refactor/accr…
…ue-interests
- Loading branch information
Showing
6 changed files
with
198 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.0; | ||
|
||
import {IIrm} from "src/interfaces/IIrm.sol"; | ||
import {IERC20} from "src/interfaces/IERC20.sol"; | ||
import {IOracle} from "src/interfaces/IOracle.sol"; | ||
|
||
type Id is bytes32; | ||
|
||
struct Market { | ||
IERC20 borrowableAsset; | ||
IERC20 collateralAsset; | ||
IOracle borrowableOracle; | ||
IOracle collateralOracle; | ||
IIrm irm; | ||
uint256 lltv; | ||
} | ||
|
||
library MarketLib { | ||
function id(Market calldata market) internal pure returns (Id) { | ||
return Id.wrap(keccak256(abi.encode(market))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.