Skip to content

Commit

Permalink
remove underfunded upkeep check
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 committed Feb 14, 2024
1 parent dab784a commit 25669ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,7 @@ contract AutomationRegistry2_2 is AutomationRegistryBase2_2, OCR2Abstract, Chain
for (uint256 i = 0; i < report.upkeepIds.length; i++) {
upkeepTransmitInfo[i].upkeep = s_upkeep[report.upkeepIds[i]];
upkeepTransmitInfo[i].triggerType = _getTriggerType(report.upkeepIds[i]);
upkeepTransmitInfo[i].maxLinkPayment = _getMaxLinkPayment(
hotVars,
upkeepTransmitInfo[i].triggerType,
uint32(report.gasLimits[i]),
report.fastGasWei,
report.linkNative,
l1Fee,
true
);

(upkeepTransmitInfo[i].earlyChecksPassed, upkeepTransmitInfo[i].dedupID) = _prePerformChecks(
report.upkeepIds[i],
blocknumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner {
struct UpkeepTransmitInfo {
Upkeep upkeep;
bool earlyChecksPassed;
uint96 maxLinkPayment;
bool performSuccess;
Trigger triggerType;
uint256 gasUsed;
Expand Down Expand Up @@ -636,7 +635,7 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner {
uint256 l1CostWei,
bool isExecution // Whether this is an actual perform execution or just a simulation
) internal view returns (uint96) {

uint256 gasOverhead;
if (triggerType == Trigger.CONDITION) {
gasOverhead = REGISTRY_CONDITIONAL_OVERHEAD;
Expand Down Expand Up @@ -766,11 +765,6 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner {
emit CancelledUpkeepReport(upkeepId, rawTrigger);
return (false, dedupID);
}
if (transmitInfo.upkeep.balance < transmitInfo.maxLinkPayment) {
// Can happen due to fluctuations in gas / link prices
emit InsufficientFundsUpkeepReport(upkeepId, rawTrigger);
return (false, dedupID);
}
return (true, dedupID);
}

Expand Down

0 comments on commit 25669ec

Please sign in to comment.