diff --git a/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol b/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol index ea01678fe76..dfbfb78d3d6 100644 --- a/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol +++ b/contracts/src/v0.8/automation/upkeeps/LinkAvailableBalanceMonitor.sol @@ -266,6 +266,7 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter for (uint256 idx = 0; idx < targetAddresses.length; idx++) { address targetAddress = targetAddresses[idx]; contractToFund = s_targets[targetAddress]; + s_targets[targetAddress].lastTopUpTimestamp = uint56(block.timestamp); if ( localBalance >= contractToFund.topUpAmount && _needsFunding( @@ -278,12 +279,12 @@ contract LinkAvailableBalanceMonitor is AccessControl, AutomationCompatibleInter bool success = i_linkToken.transfer(targetAddress, contractToFund.topUpAmount); if (success) { localBalance -= contractToFund.topUpAmount; - s_targets[targetAddress].lastTopUpTimestamp = uint56(block.timestamp); emit TopUpSucceeded(targetAddress); } else { emit TopUpFailed(targetAddress); } } else { + s_targets[targetAddress].lastTopUpTimestamp = contractToFund.lastTopUpTimestamp; emit TopUpBlocked(targetAddress); } }