I have a contract. I store data in ethereum using contract. Is it possible, to work with contract in git-like way. For example, i have a list of previous transaction hashes. Can i fetch data from any specific transaction using web3j for example?
BTW, how i did it using web3j:
Dto dto = new Dto(); Observable<EthTransaction> observable = getWeb3().ethGetTransactionByHash(transactionHash).observable(); observable.subscribe(ethTransaction -> ethTransaction.getTransaction().ifPresent(dto::setTransaction)); return dto.getTransaction();
So, here is transaction with specific tx hash. Then simply getInput() to get data from transaction
QuickBlocks (http://quickblocks.io) provides a number of command line tools that you might find interesting. You can do this from the command line for example:
and it will print that block to the console. Or,
and it will print that transaction to the screen. Other tools include
whenBlock, among others. It's also a C++ programming library, so you can write code against it.
Public service announcement: I work for QuickBlocks.