コード例 #1
0
ファイル: input_helper.py プロジェクト: JupiterToken/oyente
    def _compile_solidity(self):
        cmd = "solc --bin-runtime %s" % self.source
        err = ''
        if self.compilation_err:
            out, err = run_command_with_err(cmd)
            err = re.sub(self.root_path, "", err)
        else:
            out = run_command(cmd)

        libs = re.findall(r"_+(.*?)_+", out)
        libs = set(libs)
        if libs:
            return self._link_libraries(self.source, libs)
        else:
            return self._extract_bin_str(out, err)
コード例 #2
0
ファイル: input_helper.py プロジェクト: Stevengu999/oyente
    def _compile_solidity(self):
        if not self.allow_paths:
            cmd = "solc --bin-runtime %s %s" % (self.remap, self.source)
        else:
            cmd = "solc --bin-runtime %s %s --allow-paths %s" % (self.remap, self.source, self.allow_paths)
        err = ''
        if self.compilation_err:
            out, err = run_command_with_err(cmd)
            err = re.sub(self.root_path, "", err)
        else:
            out = run_command(cmd)

        libs = re.findall(r"_+(.*?)_+", out)
        libs = set(libs)
        if libs:
            return self._link_libraries(self.source, libs)
        else:
            return self._extract_bin_str(out, err)