Skip to content

blockpipe/eth-abi-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Human Readable ABI Parser

Summary

This package provides a way to parse Human Readable ABI introduced by ethers.js to the Python world. It's still pretty much a WIP. The goal is to be fully compatible with ethers.js and ethers-rs.

$ pip install eth-abi-parser
from eth_abi_parser import HumanReadableParser

parser = HumanReadableParser('event TestEvent(uint indexed id, (string, uint16, (uint8, uint8)) value)')
print(parser.take_event())
# {'type': 'event', 'name': 'TestEvent', 'anonymous': False, 'inputs': [{'type': 'uint', 'name': 'id', 'indexed': True}, {'type': 'tuple', 'name': 'value', 'indexed': False, 'components': [{'type': 'string'}, {'type': 'uint16'}, {'type': 'tuple', 'components': [{'type': 'uint8'}, {'type': 'uint8'}]}]}]}

WIP

This library is still a work-in-progress. Features are being implemented as needed. But if you find it lacks what you need, feel free to submit a pull request!

LICENSE

Apache License 2.0

About

Human readable ABI for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages