Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Nov 2, 2023
1 parent c3cd635 commit 2153a86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contracts/src/v0.8/automation/v2_1/KeeperRegistryBase2_1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
uint256 fastGas;
uint256 linkNative;
uint256 l1GasCost; // 0 for L1
uint256 executionL1GasCost;
}

event AdminPrivilegeConfigSet(address indexed admin, bytes privilegeConfig);
Expand Down Expand Up @@ -577,10 +578,12 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
gasWei = tx.gasprice;
}

uint256 l1CostWei = cfg.l1GasCost;
uint256 l1CostWei;
// if it's not performing upkeeps, use gas ceiling multiplier to estimate the upper bound
if (!isExecution) {
l1CostWei = hotVars.gasCeilingMultiplier * l1CostWei;
l1CostWei = hotVars.gasCeilingMultiplier * cfg.l1CostWei;
} else {
l1CostWei = cfg.executionL1GasCost;
}
// Divide l1CostWei among all batched upkeeps. Spare change from division is not charged
l1CostWei = l1CostWei / numBatchedUpkeeps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ func (r *EvmRegistry) simulatePerformUpkeeps(ctx context.Context, checkResults [
r.lggr.Warnf("upkeepId %s is not eligible after simulation of perform", checkResults[idx].UpkeepID.String())
checkResults[performToKeyIdx[i]].Eligible = false
checkResults[performToKeyIdx[i]].IneligibilityReason = uint8(encoding.UpkeepFailureReasonSimulationFailed)
} else {

Check failure on line 369 in core/services/ocr2/plugins/ocr2keeper/evm21/registry_check_pipeline.go

View workflow job for this annotation

GitHub Actions / lint

empty-block: this block is empty, you can remove it (revive)
// actualL1GasCost = GE.getL1GasCost(checkResults[performToKeyIdx[i]].PerformData + bytes padding);
// checkResults[performToKeyIdx[i]].executionL1GasCost = actualL1GasCost
}
}

Expand Down

0 comments on commit 2153a86

Please sign in to comment.