From d85fe7476fee44be219e0cf9bf734b5f05e40205 Mon Sep 17 00:00:00 2001 From: Jon-Becker Date: Mon, 2 Sep 2024 16:51:27 -0400 Subject: [PATCH] wip --- examples/python/README.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/examples/python/README.md b/examples/python/README.md index 7dacfa65..63119468 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -2,26 +2,8 @@ This Python script demonstrates how to use the `heimdall` CLI tool to decompile smart contracts via Python. It provides a simple class structure to define arguments and manage the decompilation process, with support for customizing various decompilation options. -## Overview - -The script utilizes the `heimdall decompile` command to decompile a target contract and retrieve its Solidity and Yul source code, along with its ABI. For ease of use, the script abstracts the command-line interface of `heimdall` into a Python class, allowing users to easily invoke the decompilation process programmatically. - -### Key Components - -- **DecompileArgs**: A class to define the arguments for the decompilation process, such as the target contract address, RPC URL, and other flags. -- **DecompiledContract**: A class to represent the output of the decompilation, including the Solidity/Yul source code and ABI. -- **Decompiler**: A class that abstracts the `heimdall decompile` command, handling argument parsing and command execution. -- **is_heimdall_installed**: A utility function to check if the `heimdall` CLI tool is installed on the system. +_Note: This is just an example for the decompile module, but a similar approach will work for all heimdall modules._ -## Usage - -1. **Install `heimdall`**: Ensure that the `heimdall` CLI tool is installed on your system. - - ```bash - which heimdall - -2. **Run the Script**: Execute the Python script to decompile a target contract. +## Overview - ```bash - python main.py - ``` +The script utilizes the `heimdall decompile` command to decompile a target contract and retrieve its Solidity and Yul source code, along with its ABI. For ease of use, the script abstracts the command-line interface of `heimdall` into a Python class, allowing users to easily call the decompilation process in their Python scripts.