Skip to content

Conversation

@Galoretka
Copy link
Contributor

This change corrects the documentation for the IPaymaster.postOp parameter actualUserOpFeePerGas in interfaces/draft-IERC4337.sol to describe it as the effective gas price (wei per gas) rather than “total gas used”. The updated description aligns with the canonical EntryPoint implementation in eth-infinitism, where postOp is invoked with actualGasCost and the computed gasPrice equal to min(maxFeePerGas, maxPriorityFeePerGas + basefee), and with the ERC-4337 specification’s function signature.

@Galoretka Galoretka requested a review from a team as a code owner November 12, 2025 13:58
@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

⚠️ No Changeset found

Latest commit: ff7941b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

The documentation for the IPaymaster.postOp parameter actualUserOpFeePerGas in the draft-IERC4337.sol interface was updated. The parameter description now defines actualUserOpFeePerGas as the effective gas price per gas paid by the UserOperation, calculated as the minimum of maxFeePerGas and maxPriorityFeePerGas plus basefee. The function signature remains unchanged, with only the parameter documentation modified.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: correcting documentation for an IPaymaster parameter in the ERC4337 interface.
Description check ✅ Passed The description clearly relates to the changeset by explaining the documentation correction, the previous mistake, and alignment with canonical implementations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6308fdc and ff7941b.

📒 Files selected for processing (1)
  • contracts/interfaces/draft-IERC4337.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: tests-foundry
  • GitHub Check: coverage
  • GitHub Check: slither
  • GitHub Check: tests
  • GitHub Check: tests-upgradeable
  • GitHub Check: halmos
  • GitHub Check: Redirect rules - solidity-contracts
  • GitHub Check: Header rules - solidity-contracts
  • GitHub Check: Pages changed - solidity-contracts
🔇 Additional comments (1)
contracts/interfaces/draft-IERC4337.sol (1)

245-246: Excellent documentation correction!

The updated description correctly identifies actualUserOpFeePerGas as the effective gas price (wei per gas), not a total gas amount. The formula min(maxFeePerGas, maxPriorityFeePerGas + basefee) accurately reflects EIP-1559 gas pricing mechanics and aligns with the parameter's semantic meaning.

This correction will prevent implementers from misinterpreting the parameter, ensuring they understand it represents the per-unit gas price used to calculate the total cost (i.e., actualGasCost = gasUsed × actualUserOpFeePerGas).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant