Skip to content

About

Ethereum transaction decoder with 4byte.directory integration

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tx-decoder

Decode Ethereum transaction input data into human-readable function calls.

Install

pip install tx-decoder

Usage

from tx_decoder import TxDecoder

decoder = TxDecoder()

# Decode an ERC20 transfer
result = decoder.decode("0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000000000000000dead")
print(result["signature"])  # transfer(address,uint256)

# Extract addresses from params
addrs = TxDecoder.extract_addresses(result["param_words"])

License

MIT

About

Ethereum transaction decoder with 4byte.directory integration

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages