read.cash is a platform where you can earn money for your articles and comments. You can get paid upvotes
from other users or just earn points for writing articles and comments, which are converted daily to
Bitcoin Cash (BCH) cryptocurrency, which can be used on the Internet or converted to your local money.
Takes one minute, no documents required
«What are the addresses involved in this transaction?» using Python
A Bitcoin Cash transaction contains no addresses, yet whenever we're presented with a transaction in a graphical interface, we always get to see the addresses involved. Let's find a recent transaction in a block explorer:
The transaction pretty much only contains pointers to previous transaction and no other info. So to find the input addresses, we need to fetch the parent transactions to get their scriptPubKey.
for i in tx.vin:
prevout = i.prevout
prevtx = rpc.getrawtransaction(prevout.hash)
script_from_input = prevtx.vout[prevout.n].scriptPubKey