How to get Ethereum transaction list by address

纵然是瞬间 提交于 2019-12-10 08:11:16

问题


I'm looking for a way to get a list of transactions for a given address. If there are too many transactions I'd expect to be able to page the results. It would be better if I can give the latest processed transaction as parameter so I could get the latest transactions from a given point.

Something like this:

var page = 1;
txList = getTransactionList("0x323432432...", page, lastProcessedTx);

回答1:


From my research so far there is no way to get transaction list for an address. You should check all the transactions in the blockchain for the given address or relate addresses to transaction hashes in a database. See this thread that confirms the lack of the needed API: https://github.com/ethereum/go-ethereum/issues/1897

An alternative to this is to use Etherscan API: https://etherscan.io/apis But it depends on a third party server.




回答2:


If you want to fetch ethereum transaction list by using ethereum addrsss with geth console then you need to run below command after connecting get terminal--

eth.listTransactions

if you want to fetch full transaction information using txn hash then you can use-

eth.getTransaction command using geth

For count all transaction count --

getTransactionCount

You can also get information of completion of transaction by using -

eth.getTransactionReceipt

If you want full java class for all ethereum then tell me I will share code snippet written in java for ethereum transaction, create wallet, fetch transaction for particular account within block range and transaction listener of deposit ether.

Hope this will help



来源:https://stackoverflow.com/questions/36291117/how-to-get-ethereum-transaction-list-by-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!