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

UserOpEvent.gasActualUsed is more than tx.gasUsed #495

Closed
GDdark opened this issue Aug 4, 2024 · 1 comment
Closed

UserOpEvent.gasActualUsed is more than tx.gasUsed #495

GDdark opened this issue Aug 4, 2024 · 1 comment

Comments

@GDdark
Copy link

GDdark commented Aug 4, 2024

https://sepolia.etherscan.io/tx/0xf491000da69c715a72ae243f6d558f63252f34b419f619bd6e7775978fa5935b

image
image

Typically, tx.gasUsed should be greater than UserOpEvent.gasActualGas.

What causes this situation?

@drortirosh
Copy link
Contributor

actualGasUsed is the amount of the account paid - what was calculated during its execution, and also the "self-declared" preVerificationGas (which can't be calculated on-chain)
In this case, the sender of this transaction put 100000 for preVerificationGas, and it was added to the actualGasUsed calculations. Obviously, this is more than that actual cost (which includes 21000 + calldata cost, which is usually few 1000s)

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

No branches or pull requests

2 participants