Skip to main content

Solcheck | Solidity Contract Audit Tools

These tools are meant for Hackaton-BI, but it can be further enhanced depends on the needs, this tools use 2 type of check semantic using SMT and Slither analyzer. Both of these tools working hand in hand to generate a report in .md format for it to be easier to check if there is any vunerbility. There is also auto fix features that I implement using OpenAI API, but you need to feed it your own api key, for now I'm using the 4.0 model, but later on I will make it customizeable to change the model version either to latest version or earlier version like 3.5, the auto fix works by fethcing the report file that already been generated from the tools

How to use (in script)

from audit_tools.cli_input import run_static_analysis
from audit_tools.cli_input import write_markdown_report
import audit_tools.auto_fix as auto_fix
import os
from dotenv import load_dotenv

load_dotenv()
auto_fix.get_openai_client(os.getenv("OPENAI_API_KEY"))
sol_file = "/contracts/SimpleEscrow.sol"
output_path = "results/reports"

functions, variables, invariant_results, slither_issues = run_static_analysis(sol_file)
write_markdown_report(sol_file, functions, variables, invariant_results, slither_issues, output_path)

How to use (cli tools)

I've proided a cli tools for the github repo version if you want to tinker more with the tools

python cli_input.py 
    contracts/SimpleEscrow.sol 
    results/report.md -
    -fix y 
    --output fixed/SimpleEscrow_fixed.sol

I'll be adding a multiple file audit into this tools later on, so that it can detect all the sol file in a single directory and then check all of them and generate the appropriate reports and auto-fix if its enabled

Metadata

Release files for solcheck 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solcheck 0.1.5
File Size Uploaded
solcheck-0.1.5.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solcheck 0.1.5
File Interpreter ABI Platform
solcheck-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / solcheck-0.1.5.tar.gz

Download URL solcheck-0.1.5.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2cdc92371f82c8a10c6c5ef811fff589007e2ac18e61826432d85c4a3e0f4a72
BLAKE2b-256 checksum
How to use checksums
7e4a6ddf14a58583a9a4fa0976e39b64b958ce069c1f31ce39d01159931ecffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / solcheck-0.1.5-py3-none-any.whl

Download URL solcheck-0.1.5-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
663a12e92e695b3d4394593c7046f2f5d6eae00910b4594ea1cf44f2a4f04876
BLAKE2b-256 checksum
How to use checksums
866fbe7a2d1421a30de3ccca38fc011695a003d8fde34808adf1337b60ab4a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page