<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 22:51:39 May 01, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

Display transactions -&gt; Object to String (or array maybe...?)

kornholiokornholio Member Posts: 11
Hi,
I would like to display transactions. I don´t know how to... Please help.

var options = {fromBlock : 0, toBlock: 'latest', address: addr};
var filter = web3.eth.filter(options);

document.getElementById('txs').innerText = 'Txs: ' + filter;
// returns [object Object]

//OR

document.getElementById('txs').innerText = 'Txs: ' + filter.toString();
// returns [object Object]
CODE START
var options = {fromBlock : 0, toBlock: 'latest', address: addr};
var filter = web3.eth.filter(options);

document.getElementById('txs').innerText = 'Txs: ' + filter;
// returns [object Object]

//OR

document.getElementById('txs').innerText = 'Txs: ' + filter.toString();
// returns [object Object]
CODE END

I would like to have
the transactionhash,
the other ‎affected adress,
the block when the transactions were ‎captured
and the amount of in-/outcoming
from a transaction.
Nearly like on etherscan.

Maybe an other function (not filter) is more useful? An example code please.

Thanks.

Comments

  • kornholiokornholio Member Posts: 11
    edited May 2017
    UPDATE:

    filter = JSON.stringify(filter).toString();
    document.getElementById('txs').innerText = 'Tx: ' + filter;

    In this way I get the raw text. ‎Unfortunately the result doesn´t provides the wished content... And I don´t no how to filter single values like transactionHash...

Sign In or Register to comment.