Skip to content

Commit

Permalink
Update _utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jan 11, 2025
1 parent be317b7 commit bbfe3f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1977,8 +1977,9 @@ export function getCachedNativeGasCost(
}>
) {
// We can use a long TTL since we are fetching only the native gas cost which should rarely change.
// Set this longer than the secondsPerUpdate value in the cron cache gas prices job.
const ttlPerChain = {
default: 60,
default: 120,
};
const cacheKey = buildInternalCacheKey(
"nativeGasCost",
Expand Down Expand Up @@ -2022,13 +2023,13 @@ export function getCachedOpStackL1DataFee(
relayerAddress: string;
}>
) {
// This should roughly be longer than the length of 1 block on Ethereum mainnet which is how often the L1 data fee should
// This should be longer than the length of 1 block on Ethereum mainnet which is how often the L1 data fee should
// change since its based on the L1 base fee. However, this L1 data fee is mostly affected by the L1 base fee which
// should only change by 12.5% at most per block.
// We set this higher than the secondsPerUpdate value in the cron cache gas prices job which will update this
// more frequently.
const ttlPerChain = {
default: 24,
default: 30,
};

const cacheKey = buildInternalCacheKey(
Expand Down Expand Up @@ -2082,8 +2083,7 @@ export function latestGasPriceCache(
// We set this higher than the secondsPerUpdate value in the cron cache gas prices job which will update this
// more frequently.
const ttlPerChain = {
default: 10,
[CHAIN_IDs.MAINNET]: 24,
default: 30,
};
return makeCacheGetterAndSetter(
// If deposit is defined, then the gas price will be dependent on the fill transaction derived from the deposit.
Expand Down

0 comments on commit bbfe3f7

Please sign in to comment.