contract-assay 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. contract_assay/__init__.py +48 -0
  2. contract_assay/cli.py +1008 -0
  3. contract_assay/corpus/__init__.py +67 -0
  4. contract_assay/corpus/adapters/__init__.py +56 -0
  5. contract_assay/corpus/adapters/classify.py +153 -0
  6. contract_assay/corpus/adapters/code4rena.py +626 -0
  7. contract_assay/corpus/adapters/immunefi.py +398 -0
  8. contract_assay/corpus/adapters/markdown.py +279 -0
  9. contract_assay/corpus/adapters/sherlock.py +311 -0
  10. contract_assay/corpus/bytecode.py +104 -0
  11. contract_assay/corpus/fetch.py +723 -0
  12. contract_assay/corpus/harvest.py +642 -0
  13. contract_assay/corpus/incidents.py +346 -0
  14. contract_assay/corpus/normalize.py +835 -0
  15. contract_assay/corpus/records.py +1041 -0
  16. contract_assay/corpus/sources.py +377 -0
  17. contract_assay/corpus/units.py +117 -0
  18. contract_assay/corpus/verify.py +444 -0
  19. contract_assay/detectors/__init__.py +57 -0
  20. contract_assay/detectors/base.py +1411 -0
  21. contract_assay/detectors/loading.py +336 -0
  22. contract_assay/detectors/reference.py +1368 -0
  23. contract_assay/detectors/runner.py +193 -0
  24. contract_assay/evidence/__init__.py +76 -0
  25. contract_assay/evidence/predicates.py +904 -0
  26. contract_assay/evidence/solidity.py +314 -0
  27. contract_assay/evidence/syntax.py +1208 -0
  28. contract_assay/harness.py +386 -0
  29. contract_assay/models.py +995 -0
  30. contract_assay/py.typed +0 -0
  31. contract_assay/report/__init__.py +1 -0
  32. contract_assay/report/leaderboard.py +591 -0
  33. contract_assay/report/scoring.py +1957 -0
  34. contract_assay/report/wire.py +552 -0
  35. contract_assay/results.py +334 -0
  36. contract_assay-0.1.3.dist-info/METADATA +194 -0
  37. contract_assay-0.1.3.dist-info/RECORD +40 -0
  38. contract_assay-0.1.3.dist-info/WHEEL +4 -0
  39. contract_assay-0.1.3.dist-info/entry_points.txt +2 -0
  40. contract_assay-0.1.3.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,48 @@
1
+ """contract-assay: benchmark infrastructure for LLM smart contract auditing."""
2
+
3
+ from contract_assay.models import (
4
+ CitationStatus,
5
+ DetectorRun,
6
+ DifficultyLevel,
7
+ Escalation,
8
+ EvidenceRef,
9
+ EvidenceTier,
10
+ Finding,
11
+ InvalidReason,
12
+ Locator,
13
+ Outcome,
14
+ SkipReason,
15
+ VerifiedFinding,
16
+ )
17
+
18
+ __version__ = "0.1.3"
19
+ """The only place a version is written. `pyproject.toml` reads it from here.
20
+
21
+ Two hardcoded copies used to exist, and that is worse than untidy:
22
+ `report/wire.py` writes this value into every score document as
23
+ `engine_version`, and `engine_version` is one of the fields two published
24
+ results must agree on before their totals mean the same thing. A forgotten copy
25
+ would produce documents claiming a version the package does not have, grouping
26
+ with genuine results of that version -- and PyPI does not allow re-uploading a
27
+ version, so the only remedy would be burning one.
28
+
29
+ `importlib.metadata.version` was the first attempt at fixing that and is the
30
+ wrong single source: it reads the *installed* distribution, which an editable
31
+ install leaves stale. It reported the previous version immediately after the
32
+ bump, which is the same class of drift one layer out."""
33
+
34
+ __all__ = [
35
+ "CitationStatus",
36
+ "DetectorRun",
37
+ "DifficultyLevel",
38
+ "Escalation",
39
+ "EvidenceRef",
40
+ "EvidenceTier",
41
+ "Finding",
42
+ "InvalidReason",
43
+ "Locator",
44
+ "Outcome",
45
+ "SkipReason",
46
+ "VerifiedFinding",
47
+ "__version__",
48
+ ]