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

Recommend reading variable without additional STATICCALL #1484

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Conversation

0xalpharush
Copy link
Contributor

Closes https://github.com/trailofbits/slither-private/issues/319. Whenever the this.variable syntax is used, it results in an additional STATICCALL. We can recommend replacing this with an operation that is a direct SLOAD. Note, this isn't detect for old versions of solidity like 0.4.25 since they didn't use STATICALL (see is_static_call in HighLevelCall's API).

Replaces https://github.com/trailofbits/slither-private/pull/322

@lgtm-com
Copy link

lgtm-com bot commented Nov 28, 2022

This pull request introduces 1 alert when merging fd2fb33 into b96beea - view on LGTM.com

new alerts:

  • 1 for Unused import

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@lgtm-com
Copy link

lgtm-com bot commented Nov 28, 2022

This pull request introduces 1 alert when merging 83f74f1 into b96beea - view on LGTM.com

new alerts:

  • 1 for Unused import

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@0xalpharush
Copy link
Contributor Author

@montyly After benchmarking, I added another constraint in 3c7802f that eliminated the only FP I came across.

@montyly montyly merged commit dbc368f into dev Dec 20, 2022
@montyly montyly deleted the detect/self-call branch December 20, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants