Closed
Description
- Version: 4.2.1
What was wrong?
w3.eth.getTransaction()
returns an AttributeDict
, which I want to send as a string, say over HTTP. I couldn't find a convenient way to make this conversion.
How can it be fixed?
A new method that converts an AttributeDict
to a json string:
txn = w3.eth.getTransaction(txn_hash)
txn_json = Web3.toJson(txn)