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

feat(gasPriceOracle): Allow caller to pass in base fee multiplier #801

Merged
merged 64 commits into from
Jan 3, 2025

Conversation

nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Dec 19, 2024

Motivation:

We should have quoting API apply its GAS_MARKUP to the base fee rather than the estimated gas units.

Features

  • Apply a base fee multiplier to base fees rather than the gas cost estimate. This will provide more accurate gas price estimation to downstream users like the quoting API and the relayer
  • Add Linea viem gas price oracle adapter
  • Remove any gas price estimation that doesn't go through gasPriceOracle, such as the Linea logic in estimateTotalGasRequiredByUnsignedTransaction
  • Add unit tests to CI
  • Remove Arbitrum, Ethereum and Polygon viem gas price oracle adapters as the ethers adapter should work just as well
  • Refactors gas price oracle getGasPriceEstimate() function and consolidates all optional parameters into a single GasPriceEstimateOptions object which will be easier to maintain

Downstream PR's

  • Relayer can submit transactions with more accurate gas prices: PR
  • Frontend API quotes gas costs using gas prices: PR

@nicholaspai nicholaspai requested review from pxrl and dohaki December 19, 2024 15:06
nicholaspai added a commit to across-protocol/relayer that referenced this pull request Dec 19, 2024
@nicholaspai nicholaspai marked this pull request as ready for review December 19, 2024 16:26
src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
@nicholaspai nicholaspai requested a review from mrice32 December 19, 2024 19:42
src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
src/utils/common.ts Outdated Show resolved Hide resolved
@nicholaspai nicholaspai requested a review from dohaki December 27, 2024 16:55
@pxrl pxrl requested a review from gsteenkamp89 January 2, 2025 11:36
@pxrl
Copy link
Contributor

pxrl commented Jan 2, 2025

@gsteenkamp89 Since Dong-Ha is out this week, are you interested to take a look at updating the api to handle this change?

@gsteenkamp89
Copy link
Contributor

@gsteenkamp89 Since Dong-Ha is out this week, are you interested to take a look at updating the api to handle this change?

Yeah I can tackle this 👍

@nicholaspai
Copy link
Member Author

@gsteenkamp89 Since Dong-Ha is out this week, are you interested to take a look at updating the api to handle this change?

Yeah I can tackle this 👍

G this might be relevant: across-protocol/frontend#1339

src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
src/gasPriceOracle/oracle.ts Outdated Show resolved Hide resolved
@nicholaspai nicholaspai requested a review from pxrl January 2, 2025 21:52
src/relayFeeCalculator/chain-queries/baseQuery.ts Outdated Show resolved Hide resolved
src/relayFeeCalculator/chain-queries/baseQuery.ts Outdated Show resolved Hide resolved
test/relayFeeCalculator.test.ts Outdated Show resolved Hide resolved
test/relayFeeCalculator.test.ts Outdated Show resolved Hide resolved
test/relayFeeCalculator.test.ts Outdated Show resolved Hide resolved
@nicholaspai nicholaspai merged commit c183a52 into master Jan 3, 2025
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.

4 participants