Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve(GasPriceOracle): Standardize gas price oracle usage #807

Merged
merged 5 commits into from
Dec 25, 2024

Conversation

nicholaspai
Copy link
Member

  • Removes special case in src/utils/common.ts#estimateTotalGasRequiredByUnsignedTransaction that handles Linea gas price estimates by avoiding the gasPriceOracle call
  • Implements eip1559() function in linea-viem.ts gas price oracle adapter file so that gas price oracle users now get access to Linea EIP1559 gas price estimates via viem. This requires callers to pass in an optional unsignedTx object
  • Refactors gas price oracle getGasPriceEstimate() function and consolidates all optional parameters into a single GasPriceEstimateOptions object which will be easier to maintain

- Removes special case in `src/utils/common.ts#estimateTotalGasRequiredByUnsignedTransaction` that handles Linea gas price estimates by avoiding the gasPriceOracle call
- Implements `eip1559()` function in `linea-viem.ts` gas price oracle adapter file so that gas price oracle users now get access to Linea EIP1559 gas price estimates via viem. This requires callers to pass in an optional `unsignedTx` object
- Refactors gas price oracle `getGasPriceEstimate()` function and consolidates all optional parameters into a single `GasPriceEstimateOptions` object which will be easier to maintain
@nicholaspai nicholaspai requested a review from pxrl December 24, 2024 22:53
src/gasPriceOracle/adapters/arbitrum-viem.ts Outdated Show resolved Hide resolved
src/gasPriceOracle/adapters/ethereum-viem.ts Outdated Show resolved Hide resolved
src/gasPriceOracle/oracle.ts Show resolved Hide resolved
@nicholaspai nicholaspai marked this pull request as ready for review December 25, 2024 21:02
@nicholaspai nicholaspai merged commit e16f9fe into base-fee-multiplier Dec 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants