2

I am thinking about getting all the data from the block which is stored from 1st transaction.

Assume we have done 4 txns from an address to another address and the data passed/saved in block for each transaction.

Now , i want to retrieve the data of all transaction from 1st to 4th txn (like history of data stored or passed between FROM and TO address or in block).

I tried getting the data from blocks using BLOCK and TRANSACTION object but it all gives HASH and not the raw data.

Currently working using Javascript,HTML, Geth and web3 for basic implementation.

Suggest if there is any ready API

UPDATE

Sample problem

let's assume each txn stores data of firstName and address of some person. Txn1 - "A" "place1" , Txn2 - "B" "place2" , Txn3 - "C" "place3" , Txn4 - "D" "place4".. now w.r.t the txn hash or anything of that kind i need to retrieve - A place1, B place2, C place3 ,D place4( the data stored at particular txn)

migrated from bitcoin.stackexchange.com Jun 22 '17 at 1:49

This question came from our site for Bitcoin crypto-currency enthusiasts.

1

I answered a similar question here.

Assuming that you are using Parity, they provide a number of 'trace' APIs which allow you to get information on transactions contained within specific blocks, and sent to/from specific addresses.

1

Easy.

https://medium.com/block-16/ethereum-block-transaction-info-via-aggregated-views-api-by-block-16-aa9b175da929

All you need is:

https://api.block16.io/v1/block/{block number}

change {block number} with the actual block number.

  • We don't get "RAW" data in this case..we get details from the block metadata. we get --from,to,value-- Assume we have stored form data( mail Id, Address, Phone etc) ..can this data be read in "RAW" format ? – Hem M Dec 12 '18 at 13:41
0

Ethereum's getBlock RPC call has an optional parameter, which if true, returns the entire transaction data for each transaction not just the hashes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.