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

Output L1 fields in API v2 for transaction and fix transaction fee calculation #7219

Merged
merged 2 commits into from Apr 11, 2023

Conversation

varasev
Copy link
Contributor

@varasev varasev commented Apr 5, 2023

This PR adds the following fields to transaction in API v2:

  • L1 fee
  • L1 fee scalar
  • L1 gas price
  • L1 gas used by Txn

These fields are contained in eth_getTransactionReceipt response. If some field doesn't exist, it won't be included into API v2 response.

Also, this PR adds L1 fee to the fee so that fee equals to l2_execution_fee + l1_data_fee as described in https://community.optimism.io/docs/developers/build/transaction-fees/. For L1 chains L1 fee will be zero and the fee will be calculated as usual, so this change is backward compatible.

Checklist for your Pull Request (PR)

@varasev varasev changed the title Output L1 fields in API v2 for transaction page and fix transaction fee calculation Output L1 fields in API v2 for transaction and fix transaction fee calculation Apr 5, 2023
@vbaranov vbaranov merged commit 33436a2 into va-bedrock-optimism Apr 11, 2023
2 of 3 checks passed
@vbaranov vbaranov deleted the va-bedrock-optimism-l1-fields branch April 11, 2023 15:28
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.

None yet

3 participants