Skip to main content

A smart contract auditing tools

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solcheck-0.1.4.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solcheck-0.1.4-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file solcheck-0.1.4.tar.gz.

File metadata

  • Download URL: solcheck-0.1.4.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for solcheck-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bb298bf52c78b3b938dfb146d616c97a691f8385886d4220e07f2d6d8891d8ef
MD5 fdad948b9f371bf05ebe3ddebf855a7e
BLAKE2b-256 693e3971237436a9251031916c8a0898e69c031d04608d01bc618b7fa6488742

See more details on using hashes here.

File details

Details for the file solcheck-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: solcheck-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for solcheck-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 17d4cee1f0b8a39bb59f5a60798f39145334e56210d27a40f60878dff706adad
MD5 a9426a2ba76ae165cf4c1305bad5e1a2
BLAKE2b-256 cab66ae114929f94c418262a3efe3dc4b364fac63723e21ef198bed862dee6c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page