tron-api-python
tron-api-python copied to clipboard
Can I use Python to make a tron abi decoder?
I would like to read this result where is from trc usdt documents. link:Trc usdt
constant_result is Hex type
Hex: 0000000000000000000000000000000000000000000000000000000000000020000000000
000000000000000000000000000000000000000000000000000000a5465746865722055534
400000000000000000000000000000000000000000000
Convert to decimal:Tether USD
hi, Do you found solution? Can you share you're solution?
it is works for me
from trx_utils import decode_hex
from eth_abi import decode_abi
b = a['constant_result']
w = decode_hex(b[0])
w = decode_abi(('uint256', 'string', 'uint256', 'string', 'uint256', 'uint256',),w)