From b79578b4f0b02d6fcfb99beede7c18b761086c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 30 Dec 2024 14:16:49 +0100 Subject: [PATCH] feat: prevent supporting address 0. --- contracts/contracts/harvest/OETHHarvesterSimple.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/contracts/harvest/OETHHarvesterSimple.sol b/contracts/contracts/harvest/OETHHarvesterSimple.sol index a74adb5b7c..07715d7de7 100644 --- a/contracts/contracts/harvest/OETHHarvesterSimple.sol +++ b/contracts/contracts/harvest/OETHHarvesterSimple.sol @@ -77,6 +77,8 @@ contract OETHHarvesterSimple is Governable { external onlyStrategist { + require(_strategy != address(0), "Invalid strategy"); + supportedStrategies[_strategy] = _isSupported; emit SupportedStrategyUpdate(_strategy, _isSupported); }