smartbugs / smartbugs

SmartBugs: A Framework to Analyze Ethereum Smart Contracts

Home Page:https://smartbugs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smartbugs fails to detect version when it's defined in less than 3 parts

yudikubota opened this issue · comments

Describe the bug
Solidity allows for pragma version to be defined in less than 3 parts like ^0.5. Smartbugs fails to detect version when this pattern is used and raises a ValueError: Invalid simple block ''

Example:
https://etherscan.io/address/0x250aa88c8f54f5e70b94214380342f0d53e42f6c#code

Platform

  • SmartBugs version: 2.0.0
  • Python version: 3.10.6
  • OS : Ubuntu
  • CPU: AMD

@yudikubota Please try the most recent version of SmartBugs, either the v2.0.2 release or checkout the most recent commit. I think this bug has been fixed in commit #3c77e28. Thanks ...

I cannot reproduce this bug with the latest version (2.0.2).

My bad
I was using the master branch.
I see error handling is much better now, thanks.

image