Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Aug 8, 2024
1 parent 6ba4f99 commit d945765
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ contract ZKSyncAutomationRegistry2_3 is ZKSyncAutomationRegistryBase2_3, OCR2Abs
}
}

function updateOverhead(uint256 newOverhead) external {
ACCOUNTING_FIXED_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 @@ -59,7 +59,7 @@ abstract contract ZKSyncAutomationRegistryBase2_3 is ConfirmedOwner {
// tx itself, but since payment processing itself takes gas, and it needs the overhead as input, we use fixed constants
// 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 internal constant ACCOUNTING_FIXED_GAS_OVERHEAD = 51_200; // Fixed overhead per tx
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

LinkTokenInterface internal immutable i_link;
Expand Down

0 comments on commit d945765

Please sign in to comment.