Skip to content

Commit

Permalink
chore: fix slither
Browse files Browse the repository at this point in the history
  • Loading branch information
HrikB authored and junkim012 committed May 7, 2024
1 parent f1d3628 commit fd8c6a7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion slither.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"@uniswap/v3-core/=lib/v3-core/"
"@uniswap/v3-core/=lib/v3-core/",
"pendle-core-v2-public/=lib/pendle-core-v2-public/contracts/"
]
}
2 changes: 1 addition & 1 deletion slither.db.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/YieldOraclePendle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ contract YieldOraclePendle is IYieldOracle {
* @param _yieldCeiling The maximum APY
*/
constructor(IPMarketV3 _market, uint32 _twapDuration, uint256 _yieldCeiling) {
//slither-disable-next-line unused-return
(,,,,, uint16 observationCardinalityNext) = _market._storage();

uint256 minimumOracleSlots = _twapDuration / 12;
Expand Down
2 changes: 1 addition & 1 deletion test/fork/concrete/lrt/SpotOracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract contract SpotOracle_ForkTest is ReserveOracleSharedSetup {
ReserveOracle reserveOracle;
SpotOracle spotOracle;

function testFork_ViewPrice() public {
function testFork_ViewPrice() public virtual {
uint256 price = spotOracle.getPrice();
assertGt(price, 0, "price greater than zero");
}
Expand Down
9 changes: 9 additions & 0 deletions test/fork/concrete/pendle/PtSpotOracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ uint32 constant TWAP_DURATION = 1800;
abstract contract PtSpotOracle_ForkTest is SpotOracle_ForkTest {
function testFork_MaxTimeFromLastUpdateExceeded() public override { }

function testFork_ViewPrice() public override {
uint256 price = spotOracle.getPrice();
if (PtSpotOracle(address(spotOracle)).MARKET().expiry() < block.timestamp) {
assertEq(price, 0);
} else {
assertGt(price, 0, "price greater than zero");
}
}

function testFork_PriceIsZeroBeyondExpiry() public {
vm.warp(type(uint256).max);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract contract UniswapFlashswapDirectMintHandlerWithDust_FuzzTest is LrtHandl
if (currentRate % RAY != 0) roundingError++;

// TODO: Can this dust amount be bounded at run-time?
uint256 maxDust = 400_000;
uint256 maxDust = 1e9;

assertLt(
ionPool.collateral(_getIlkIndex(), address(this)),
Expand Down

0 comments on commit fd8c6a7

Please sign in to comment.