GitXplorerGitXplorer
t

solc-detect

public
1 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
47c7434b2bd4e59f4ffb06f3621dbb203e64783a

bump version to 0.0.9

ttaquangtrung committed 2 years ago
Unverified
4525b44ee0eb207d378567ffceee5279ed1046d4

normalize pragma version strings

ttaquangtrung committed 2 years ago
Unverified
4dd636b91a7802eaf32644a62163df801d111f5a

support finding all best versions

ttaquangtrung committed 2 years ago
Unverified
76212b7a23ccf8b81237663076741330c2ff2fbc

update strategy to find the best version based on minor version

ttaquangtrung committed 2 years ago
Unverified
c791b2ee5ca201bd870f5a07c53121a9981473c1

restructure modules

ttaquangtrung committed 2 years ago
Unverified
23e19b9bb39aa5db05221c3973a132129535f621

print version and bump to 0.0.6

ttaquangtrung committed 2 years ago

README

The README file for this repository.

Solc-detect

Tool to detect compatible version of the Solc compiler in Solidity smart contracts.

Installation

  • Install prerequisite libraries:

    pip install -r requirements.txt

Usage

python -m solc_detect <input-contract>

Example:

$ python -m solc_detect examples/test1.sol
Detected pragmas: ['^0.4.15']
Best version: 0.4.26

$ python -m solc_detect examples/test2.sol
Detected pragmas: ['0.4.0 - 0.4.19']
Best version: 0.4.19

$ python -m solc_detect examples/test3.sol
Detected pragmas: ['>0.6.0 <0.8.0']
Best version: 0.7.6

$ python -m solc_detect examples/test4.sol
Detected pragmas: ['>=0.4.21 < 0.6.0']
Best version: 0.5.17

$ python -m solc_detect examples/test5.sol
Detected pragmas: ['>= 0.8.7 < 0.9.0']
Best version: 0.8.19

$ python -m solc_detect examples/multiple_pragmas.sol
Detected pragmas: ['>0.6.0 <0.8.0', '^0.7.0', '^0.7.2']
Best version: 0.7.6

$ python -m solc_detect examples/no_pragma_1.sol
Detected pragmas: []
Best version: 0.8.19