4

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)

0

3 Answers 3

4

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

1
  • this should be accepted as the answer
    – pcko1
    Commented May 25, 2021 at 16:18
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.

1
  • 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
    Commented Dec 12, 2018 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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