From 66bee61f9f0a3ba564f051c47657c1b334318aaa Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Thu, 27 Aug 2020 12:35:41 +0530 Subject: [PATCH] checking is there is token pool or not --- contracts/flusher.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/flusher.sol b/contracts/flusher.sol index 875ed82..9da72af 100644 --- a/contracts/flusher.sol +++ b/contracts/flusher.sol @@ -45,6 +45,8 @@ contract Flusher { require(address(token) != address(0), "invalid-token"); address poolToken = registry.poolToken(token); + require(poolToken != address(0), "invalid-pool"); + IERC20 tokenContract = IERC20(token); YieldPool poolContract = YieldPool(poolToken);