Author

Topic: listreceivedbyaddress for ETH (Read 449 times)

legendary
Activity: 1584
Merit: 1280
Heisenberg Design Services
June 15, 2020, 09:52:28 AM
#3
As HCP suggested, you could move this topic to Altcoin Discussion board by clicking on the Move Topic button in the bottom. The listreceivedbyaddress command in the Bitcoin Core is different from just receiving the number of confirmations of a bitcoin tx. Rather listreceivedbyaddress is used to list all the bitcoin addresses which has received transactions irrespective of number of confirmations. You can get all the addresses which has 0 transactions by changing the argument to 0.

In terms of Ethereum, the number of confirmations for a transaction is found by subtracting the Current Ethereum Block Number and the Block in which the transaction was mined. Here, you can find the Block in which tx was mined using eth_getTransactionByHash rpc command which displays the required information about the transaction hash.

Code:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["txhash"],"id":1}'

This inturn returns with the block number for the tx hash and the current Block number can be found using eth_blockNumber rpc command.

Code:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

This will return the most recent block number which was mined. If you don't really wan't to go through all these, try web3.eth.getblockNumber - web3.eth.getTransaction('txhash').blockNumber
HCP
legendary
Activity: 2086
Merit: 4361
June 14, 2020, 11:42:13 PM
#2
Not wanting to point out the obvious... but Bitcoin Technical Support is for: "Questions regarding issues with Bitcoin Core, nodes, the Bitcoin network, transactions, and addresses."

You might have better luck asking on the Altcoins board here, or some of the ETH community boards like:
https://www.reddit.com/r/ethereum/

or perhaps try some of the other resources here: https://ethereum.org/community/
jr. member
Activity: 38
Merit: 2
June 14, 2020, 11:32:17 PM
#1
Under bitcoin-core, when one fires the command:
Code:
bitcoin-cli listreceivedbyaddress 1 true
The output is something like:
[ {
    "address": "address-goes-here",
    "amount": 0.00000000,
    "confirmations": 10,
    "label": "label1",
    "txids": [
    ]
} ]


What is the equivalent command for Ethereum (geth)?
I just need to know the number confirmations for an ethereum address while it is receiving coins.
I am running the daemon with indexing.. currently testing on rinkeby.
Jump to: