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

fix: sponsored call v2 memory copy #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennoprice
Copy link
Collaborator

This fixes an issue with sponsoredCallV2 which caused the forwarded call data to be unnecessarily copied to memory which increased the amount of gas used with an increase in call data size. For one, this wasted a lot of gas, but also lead to bundler gas estimation issues as the gas used was assumed to be constant whereas in reality it varied with call data size.

Instead of calling revertingContractCall which copies the _data argument to memory, we use a low level call directly which forwards _data as calldata avoiding the redundant copy.

Note: unlike, revertingContractCall, this doesn't revert if the _target is not a smart contract.

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