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.5.tar.gz (8.8 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.5-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for solcheck-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2cdc92371f82c8a10c6c5ef811fff589007e2ac18e61826432d85c4a3e0f4a72
MD5 f5fe82b8edb1dc3436c0b9363c021180
BLAKE2b-256 7e4a6ddf14a58583a9a4fa0976e39b64b958ce069c1f31ce39d01159931ecffd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: solcheck-0.1.5-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.9

File hashes

Hashes for solcheck-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 663a12e92e695b3d4394593c7046f2f5d6eae00910b4594ea1cf44f2a4f04876
MD5 1ae47299ca095cfa50c080c6b152c7b9
BLAKE2b-256 866fbe7a2d1421a30de3ccca38fc011695a003d8fde34808adf1337b60ab4a94

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