File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 6
6
from queue import Empty as EmptyQueue
7
7
from subprocess import check_output , Popen , PIPE
8
8
from typing import Dict , Optional , Union
9
+ from pkg_resources import parse_version
9
10
10
11
import io
11
12
import os
16
17
import tempfile
17
18
18
19
from crytic_compile import CryticCompile , InvalidCompilation , is_supported
20
+ from crytic_compile .platform .solc import get_version
19
21
20
22
from ..core .manticore import ManticoreBase
21
23
from ..core .smtlib import (
@@ -732,6 +734,14 @@ def solidity_create_contract(
732
734
while contract_names :
733
735
contract_name_i = contract_names .pop ()
734
736
try :
737
+ # version check
738
+ binary = crytic_compile_args .get ("solc" , "solc" )
739
+ version = get_version (binary )
740
+ if not parse_version (version ) < parse_version ("0.5.0" ):
741
+ raise EthereumError (
742
+ f"Manticore requires a solc version < 0.5.0 and { version } was found"
743
+ )
744
+
735
745
compile_results = self ._compile (
736
746
source_code ,
737
747
contract_name_i ,
You can’t perform that action at this time.
0 commit comments