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/sponsorship paymaster gas accounting #61

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

livingrockrises
Copy link
Collaborator

Summary

Related Issue: # (issue number)

Change Type

  • Bug Fix
  • Refactor
  • New Feature
  • Breaking Change
  • Documentation Update
  • Performance Improvement
  • Other

Checklist

  • My code follows this project's style guidelines
  • I've reviewed my own code
  • I've added comments for any hard-to-understand areas
  • I've updated the documentation if necessary
  • My changes generate no new warnings
  • I've added tests that prove my fix is effective or my feature works
  • All unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Information

Branch Naming

@@ -280,6 +280,7 @@ contract SponsorshipPaymaster is
paymasterIdBalances[feeCollector] += actualPremium;

emit GasBalanceDeducted(paymasterId, costIncludingPremium, userOpHash);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we include premium information in the same event instead of emiting two events? Coz in second event only extra information is actualPremium which can be combined with GasBalanceDeducted event.

That way we won't need to emit balToDeduct coz that can be calculated using costIncludingPremium-actualPremium

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can add actualPremium in the GasBalanceDeducted event as 4th argument.

That way we won't need to emit balToDeduct coz that can be calculated using costIncludingPremium-actualPremium

This balToDeduct we are not emitting currently also. but yes can be calculated.

I will make changes in the event in different PR. because any change in contract I need to show to auditors later as diffs. This is meant for accounting test cases so can you please approve and merge it

@tomarsachin2271 tomarsachin2271 merged commit 2f6eb32 into develop Dec 19, 2023
3 checks passed
@tomarsachin2271 tomarsachin2271 deleted the feat/sponsorship-paymaster-gas-accounting branch December 19, 2023 12:08
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