Skip to content

Conversation

@pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Oct 28, 2025

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Adds OP Stack operator fee to layer1GasFee by querying the oracle (getOperatorFee) and summing with getL1Fee, plus BN utilities and tests.

  • Layer 1 Gas Fee (oracle flow):
    • Sum oracle getL1Fee with operator fee from getOperatorFee(gasUsed); default operator fee to zero on failure/undefined; output normalized hex via add0x + padHexToEvenLength.
    • Refactor to BN-based math and value coercion via new toBN; extract #getGasPriceOracleContract; keep default OP Stack oracle address and optional signing.
    • Extend ABI with getOperatorFee.
  • Utils:
    • Add bnFromHex and toBN helpers for parsing/converting to BN.
  • Tests:
    • Update OracleLayer1GasFeeFlow.test.ts to mock BN returns and cover operator fee present/failure/undefined paths.
    • Add tests for bnFromHex and toBN.
  • Docs:
    • Update CHANGELOG.md to note inclusion of operator fee in layer1GasFee.

Written by Cursor Bugbot for commit 6e8d304. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/expannd-op-stack-l1-gas-fees branch 2 times, most recently from 1c59fbe to cc31d4b Compare October 28, 2025 14:47
Base automatically changed from pnf/expannd-op-stack-l1-gas-fees to main October 28, 2025 15:02
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/operator-fee branch 3 times, most recently from 69fd896 to d8a13b8 Compare October 30, 2025 12:11
cursor[bot]

This comment was marked as outdated.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/operator-fee branch 2 times, most recently from ba72ab9 to 130f8b4 Compare October 30, 2025 14:28
@pedronfigueiredo pedronfigueiredo merged commit e343f73 into main Oct 30, 2025
261 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/operator-fee branch October 30, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants