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

Dev too many digits #216

Merged
merged 2 commits into from
May 6, 2019
Merged

Dev too many digits #216

merged 2 commits into from
May 6, 2019

Conversation

GillesdeB
Copy link
Contributor

The goal is to add a new Detector that finds patterns of literal values in numbers that are too big for humans to safely manage, issue a warning, and advise to use the proper denominations of Ether. For example:
uint x = 0x0000000000001;
uint y = 1000000000000000000;
balance += x + y + 1000000;
would be detected as too big but 100 wei or 1000 szabo would not. My limit so far is anything with more than “00000” (5 zeros) should use another denomination of Ether.

I received help from Josselin Feist and heavily use his code example.

@CLAassistant
Copy link

CLAassistant commented Apr 28, 2019

CLA assistant check
All committers have signed the CLA.

@montyly
Copy link
Member

montyly commented Apr 30, 2019

Thank you @GillesdeB for your contribution!

The PR looks good, we are going to run it on a large scale benchmark to see what kind of results give the heuristic

@montyly montyly changed the base branch from master to dev May 6, 2019 15:23
@montyly montyly merged commit 7e56501 into crytic:dev May 6, 2019
@montyly
Copy link
Member

montyly commented May 6, 2019

Hi @GillesdeB, the detector is merged in dev and will be available on the upcoming release.

Thanks for your work!

@GillesdeB
Copy link
Contributor Author

Thank you very much @montyly for your help making this happen.
I look forward to downloading and testing the new version.

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.

3 participants