From efb47d8a84fcb13ceebd3ceb11b126b323bcc05d Mon Sep 17 00:00:00 2001 From: panda <87183122+pandadefi@users.noreply.github.com> Date: Wed, 12 Jan 2022 15:24:58 +0100 Subject: [PATCH] feat: add event to baseStrategy --- contracts/BaseStrategy.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contracts/BaseStrategy.sol b/contracts/BaseStrategy.sol index b22bf529..4d95312a 100644 --- a/contracts/BaseStrategy.sol +++ b/contracts/BaseStrategy.sol @@ -263,6 +263,9 @@ abstract contract BaseStrategy { event UpdatedMetadataURI(string metadataURI); + event SetHealthCheck(address); + event SetDoHealthCheck(bool); + // The minimum number of seconds between harvest calls. See // `setMinReportDelay()` for more details. uint256 public minReportDelay; @@ -364,10 +367,12 @@ abstract contract BaseStrategy { } function setHealthCheck(address _healthCheck) external onlyVaultManagers { + emit SetHealthCheck(_healthCheck); healthCheck = _healthCheck; } function setDoHealthCheck(bool _doHealthCheck) external onlyVaultManagers { + emit SetDoHealthCheck(_doHealthCheck); doHealthCheck = _doHealthCheck; } @@ -781,6 +786,7 @@ abstract contract BaseStrategy { if (doHealthCheck && healthCheck != address(0)) { require(HealthCheck(healthCheck).check(profit, loss, debtPayment, debtOutstanding, totalDebt), "!healthcheck"); } else { + emit SetDoHealthCheck(true); doHealthCheck = true; }