From 046d840aa5726549a34a64f4dc8836c4bc649f28 Mon Sep 17 00:00:00 2001 From: weiqiushi Date: Tue, 17 Dec 2024 15:02:40 +0800 Subject: [PATCH] Require sender not in blacklist when withdraw --- contracts/dividend.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/dividend.sol b/contracts/dividend.sol index 978c223..ed607de 100644 --- a/contracts/dividend.sol +++ b/contracts/dividend.sol @@ -625,6 +625,10 @@ contract DividendContract is Initializable, UUPSUpgradeable, ReentrancyGuardUpgr function withdrawDividends(uint256[] calldata cycleIndexs, address[] calldata tokens) external nonReentrant { require(cycleIndexs.length > 0, "No cycle index"); require(tokens.length > 0, "No token"); + + // blacklisted address cannot estimate + require(!isBlackListed(msg.sender), "Blacklisted address"); + // require(UserStakeRecords[msg.sender].length > 0, "No stake record"); // Display the params