-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Replace abi.encodeWithSelector
by abi.encodeCall
#3693
Comments
We should definitely do this, but it requires bumping the Solidity pragma and this is a breaking change, so it should be done in our next major. |
abi.encodeWithSelector
by abi.encodeCall
abi.encodeWithSelector
by abi.encodeCall
Hey guys! If this is gonna be the part of v5.0 milestone , I would love to draft a PR for this :) |
To implement this change, the pragma upgrade at min must be >= 0.8.13, since the original implementation was bugged |
@balajipachai Do you want to help with this issue? |
@frangio Sure |
@frangio It is done, could you please direct me to some other open issues with deadlines, I will get those done well within the deadline. |
🧐 Motivation
Since 0.8.11,
abi.encodeCall
provide type-safe encode utility comparing withabi.encodeWithSelector
.📝 Details
Example below and detail are from DevTools Summit | Topics in Solidity - Harikrishnan Mulackal.
abi.encodeWithSelector
can use withinterface.<function>.selector
to prevent typo error, but it doesn't provide type checking.abi.encodeCall
provide type checking during compile time.result
The text was updated successfully, but these errors were encountered: