Vandal工具批量处理合约代码
扫描文件:sol文件版本号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #!/usr/bin/python # -*- coding: utf-8 -*- # solc.py def scan(fileName): # 打开文件 f = open(fileName, 'r') # 读取文件 lines = f.readlines() for line in lines: if ("pragma" in line): index = line.find(".") return line[index