linderpascallinderpascal Member Posts: 10
Hei guys, is there a way to get a list of all transactions? Didn't found a function for this in web3. The only way that works is to iterate through all blocks, but that seems to be a dumb way :wink:

Thanks for the answers



  • linderpascallinderpascal Member Posts: 10
    After reading in other posts i figured out how to list all transactions. There is the filter feature in web3. This allows you to get the transactions from a specific time:

    var filter = web3.eth.filter({fromBlock: 0, toBlock: 'latest'}); filter.get(function(error, result) { transactions=result; console.log(result); counter=transactions.length; length=transactions.length; addTransactions(); $scope.$apply(); });

    "latest" is a magic parameter, which take the number of the last block.
    Here the link to the documentation:
Sign In or Register to comment.