Skip to content

Commit

Permalink
add overhead funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Aug 12, 2024
1 parent 04376d3 commit 9828176
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ contract ZKSyncAutomationRegistry2_3 is ZKSyncAutomationRegistryBase2_3, OCR2Abs
}
}

function updateOverhead(uint256 newOverhead) external {
function updateAccountingOverhead(uint256 newOverhead) external {
ACCOUNTING_FIXED_GAS_OVERHEAD = newOverhead;
}

function updatePerUpkeepOverhead(uint256 newOverhead) external {
ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = newOverhead;
}

/**
* @notice handles the report by performing the upkeeps and updating the state
* @param hotVars the hot variables of the registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ abstract contract ZKSyncAutomationRegistryBase2_3 is ConfirmedOwner {
// to account for gas used in payment processing. These values are calibrated using hardhat tests which simulates various cases and verifies that
// the variables result in accurate estimation
uint256 public ACCOUNTING_FIXED_GAS_OVERHEAD = 51_200; // Fixed overhead per tx
uint256 internal constant ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = 14_200; // Overhead per upkeep performed in batch
uint256 public ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = 14_200; // Overhead per upkeep performed in batch

LinkTokenInterface internal immutable i_link;
AggregatorV3Interface internal immutable i_linkUSDFeed;
Expand Down

0 comments on commit 9828176

Please sign in to comment.