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

Add getL1FeeUpperBound to GasPriceOracle #5

Merged
merged 2 commits into from
Mar 20, 2024
Merged

Conversation

xiaoxiaff
Copy link

Added getL1FeeUpperBound based on the spec: https://github.com/ethereum-optimism/specs/pull/25/files

Open question: @mdehoog my understanding is this function will only be live when we have Fjord upgraded so this should be Fjord exclusive.

/// @param _unsignedTxSize Unsigned fully RLP-encoded transaction size to get the L1 fee for.
/// @return L1 estimated upper-bound fee that should be paid for the tx
function getL1FeeUpperBound(uint256 _unsignedTxSize) external view returns (uint256) {
require(isFjord, "GasPriceOracle: getL1FeeUpperBound only supports Fjord");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we probably don't need this given it won't be available before fjord, but don't feel strongly

@xiaoxiaff
Copy link
Author

@mdehoog 💇

  • extracted the cost function.

@xiaoxiaff xiaoxiaff merged commit 77e2f3e into flz-l1-cost-func Mar 20, 2024
2 checks passed
@danyalprout danyalprout deleted the ytu/upper branch April 16, 2024 17:45
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.

3 participants