Skip to content

Commit

Permalink
Increase ttl of native gas cost, add gasFeeDetails to response
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jan 12, 2025
1 parent 7449e8c commit 5441dc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ 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
8 changes: 8 additions & 0 deletions api/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,14 @@ const handler = async (
capitalFeeTotal: relayerFeeDetails.capitalFeeTotal,
capitalFeePercent: relayerFeeDetails.capitalFeePercent,
},
gasFeeDetails: tokenGasCost
? {
nativeGasCost: nativeGasCost!.toString(), // Should exist if tokenGasCost exists
opStackL1GasCost: opStackL1GasCost?.toString(),
gasPrice: gasPrice.toString(),
tokenGasCost: tokenGasCost.toString(),
}
: undefined,
};
logger.debug({
at: "Limits",
Expand Down

0 comments on commit 5441dc6

Please sign in to comment.