Add your description here
Project description
Solc Event Extractor
Solc Event Extractor is a Python library for extracting metadata (events and functions) from Solidity contracts. It allows you to parse Solidity source files or URLs pointing to Solidity code and retrieve detailed information about contract events and functions.
Features
- Extracts events and functions from Solidity contracts.
- Supports both local files and URLs.
- Handles different Solidity compiler versions.
- Provides detailed metadata including inputs, outputs, and state mutability.
Installation
You can install the library via pip:
bash uv pip install solc-event-extractor
Usage
In order to use the library, provide a raw github contract path or filepath to a .sol file. Make sure that the correct solidity version is also selected.
from solc_event_extractor import extract_contract_details
contract_source = 'path/to/your/contract.sol'
details = extract_contract_details(contract_source, version='0.8.26')
if details:
print("Events:")
for event in details['events']:
print(f" - {event.name}: {event.signature}")
print("\nFunctions:")
for function in details['functions']:
print(f" - {function.name}: {function.signature}")
else:
print("Failed to extract contract details.")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file solc_event_extractor-0.1.0.tar.gz
.
File metadata
- Download URL: solc_event_extractor-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a3c138ec42bb0326e764cb8325c639caed805b143922b528cfaee76c0ab5ce |
|
MD5 | efbbb16edcfc45c92b264893cd171b91 |
|
BLAKE2b-256 | 0d7e004259c46b7c5ec8e87ee573bdde1a4cd411b9982f59bec65e77f825bcd0 |
File details
Details for the file solc_event_extractor-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: solc_event_extractor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f23e0233c89966391703d8393c346e80c64c4d2eb6973c306350f10adf3c33a7 |
|
MD5 | c25ea8af059949778dcf53544c10eb82 |
|
BLAKE2b-256 | 0192d5bda6e67b793f88a0a2e7def58b7d39e6b9dc51d65091ac9965c8dcaec9 |