A package for decoding and analyzing EVM transactions and logs
Project description
EVM Decoder
EVM Decoder is a Python package for decoding and analyzing Ethereum Virtual Machine (EVM) transactions and logs. It provides tools to help developers and researchers understand and work with EVM-based blockchain data.
Features
- Decode EVM transaction input data
- Decode EVM event logs
- Analyze balance changes in transactions
- Support for custom ABI and fixed types
- Retrieve chain information for various EVM-compatible networks
Installation
You can install the EVM Decoder package using pip:
bash
pip install evm-decoder
Usage
Here's a quick example of how to use EVM Decoder:
python from evm_decoder import DecoderManager, AnalyzerManager Initialize managers decoder_manager = DecoderManager() analyzer_manager = AnalyzerManager() Example transaction data transaction_data = { 'input': '0x23b872dd000000000000000000000000...', 'from': '0xb8faa80fe04a4afd30c89f40e4fcdc6dafb274d9', 'to': '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', 'value': '0', 'chain_id': 1, 'logs': [...] } Decode the transaction decode_result = decoder_manager.decode(transaction_data) print("Transaction decode result:", decode_result) Analyze the transaction analysis_result = analyzer_manager.analyze_transaction(transaction_data, {}) print("Transaction analysis result:", analysis_result)
For more detailed examples, check the examples
directory in the repository.
Configuration
EVM Decoder uses a configuration file to set up decoders. You can customize this file to add support for specific contracts or event types. The default configuration file is located at evm_decoder/config/decoder_config.json
.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Thanks to all contributors who have helped to improve this project.
- This project makes use of several open-source libraries, including Web3.py and eth-abi.
Contact
If you have any questions or feedback, please open an issue on the GitHub repository.
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 evm_decoder-0.1.3.tar.gz
.
File metadata
- Download URL: evm_decoder-0.1.3.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68a7650d8ffb9d3b580fb0e5a35903b8a262fe88685ac7ebaa9c53c13874a40f |
|
MD5 | 21418c9adb63d8e11cb328a27a65f36c |
|
BLAKE2b-256 | 1efb6bc0669d31fe5b3100dbb5efb1c562564b9002b5fea03f9a62a424d02b03 |
File details
Details for the file evm_decoder-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: evm_decoder-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5684f2c4bdb9dbcdc0adf811c80808af40c1318f0c873e2686c712ecc28dd2ad |
|
MD5 | 845203eed8259dd16ce19629a090adc8 |
|
BLAKE2b-256 | 38b81d6bb192fa48c35eb4757e974ca147d5142633abb2fcb5cdf8a2e0bda6fb |