-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
refactor(ERC165Checker) replaced assembly code with staticcall() #1829
refactor(ERC165Checker) replaced assembly code with staticcall() #1829
Conversation
@yopereir The problem is that with |
b36d7c6
to
f9066ad
Compare
…ts into refactor/replaceAssembly#1761
Thanks @yopereir! I'm holding off on merging this for a few more weeks, to give Solidity 0.5.10 a little bit of time to mature. |
ok |
Given that 0.5.11 has already come out, I think we can resume this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment that I had reviewing this again. Then it's ready to be merged.
result := mload(output) // Load the result | ||
} | ||
(bool success, bytes memory result) = account.staticcall.gas(30000)(encodedParams); | ||
if (result.length == 0) return (false, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case, I think we should change this to make sure we're replicating the exact same behavior as before. Otherwise abi.decode
could fail.
if (result.length == 0) return (false, false); | |
if (result.length < 32) return (false, false); |
Thanks @yopereir! |
Fixes #1761
Replaced assembly code in ERC165Checker with
staticcall
method