From ff07ea74bbea648fea1eae765bafcc196e3ce632 Mon Sep 17 00:00:00 2001 From: Schlagonia Date: Wed, 18 Oct 2023 23:23:54 -0600 Subject: [PATCH] chore: update to interface --- .gitmodules | 2 ++ src/AprOracle/AprOracle.sol | 3 +++ src/ReportTrigger/CommonReportTrigger.sol | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 5a58462..c495f89 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,6 +9,8 @@ [submodule "lib/tokenized-strategy"] path = lib/tokenized-strategy url = https://github.com/yearn/tokenized-strategy + branch = 3.0.1 [submodule "lib/yearn-vaults-v3"] path = lib/yearn-vaults-v3 url = https://github.com/yearn/yearn-vaults-v3 + branch = 3.0.1 \ No newline at end of file diff --git a/src/AprOracle/AprOracle.sol b/src/AprOracle/AprOracle.sol index ba5e929..5713488 100644 --- a/src/AprOracle/AprOracle.sol +++ b/src/AprOracle/AprOracle.sol @@ -125,6 +125,9 @@ contract AprOracle { ) public view returns (uint256 apr) { IVault vault = IVault(_vault); + // Check if the full profit has already been unlocked. + if(vault.fullProfitUnlockDate() <= block.timestamp) return 0; + // Need the total assets in the vault post delta. uint256 assets = uint256(int256(vault.totalAssets()) + _delta); diff --git a/src/ReportTrigger/CommonReportTrigger.sol b/src/ReportTrigger/CommonReportTrigger.sol index 7619534..c3cbf76 100644 --- a/src/ReportTrigger/CommonReportTrigger.sol +++ b/src/ReportTrigger/CommonReportTrigger.sol @@ -356,7 +356,7 @@ contract CommonReportTrigger is Governance { IVault vault = IVault(_vault); // Don't report if the vault is shutdown. - if (vault.shutdown()) return (false, bytes("Shutdown")); + if (vault.isShutdown()) return (false, bytes("Shutdown")); // Cache the strategy parameters. IVault.StrategyParams memory params = vault.strategies(_strategy);