-
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 pull request #700 from morpho-org/colin@verif/add-morpho-harnes…
…s-getters [Certora] Improve utility functions access
- Loading branch information
Showing
22 changed files
with
162 additions
and
109 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
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
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
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,39 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity 0.8.19; | ||
|
||
import {Id, MarketParams, MarketParamsLib} from "../../src/libraries/MarketParamsLib.sol"; | ||
import "../../src/libraries/MathLib.sol"; | ||
import "../../src/libraries/ConstantsLib.sol"; | ||
import "../../src/libraries/UtilsLib.sol"; | ||
|
||
contract Util { | ||
using MarketParamsLib for MarketParams; | ||
|
||
function wad() external pure returns (uint256) { | ||
return WAD; | ||
} | ||
|
||
function maxFee() external pure returns (uint256) { | ||
return MAX_FEE; | ||
} | ||
|
||
function libId(MarketParams memory marketParams) external pure returns (Id) { | ||
return marketParams.id(); | ||
} | ||
|
||
function refId(MarketParams memory marketParams) external pure returns (Id marketParamsId) { | ||
marketParamsId = Id.wrap(keccak256(abi.encode(marketParams))); | ||
} | ||
|
||
function libMulDivUp(uint256 x, uint256 y, uint256 d) external pure returns (uint256) { | ||
return MathLib.mulDivUp(x, y, d); | ||
} | ||
|
||
function libMulDivDown(uint256 x, uint256 y, uint256 d) external pure returns (uint256) { | ||
return MathLib.mulDivDown(x, y, d); | ||
} | ||
|
||
function libMin(uint256 x, uint256 y) external pure returns (uint256) { | ||
return UtilsLib.min(x, y); | ||
} | ||
} |
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
Oops, something went wrong.