3

If I set up a filter to receive changes, I only seem to receive transactions for addresses that are contract addresses.

How to put a filter to receive transactions that are sent to an address that is non-contract?

  • that other question is asking about a contract address, I'm not – knocte May 27 '16 at 16:16
  • Quite right, I misunderstood your problem. – Nick Johnson May 27 '16 at 16:23
1

You're using the topic filter API, which filters for events emitted by contracts; naturally, only contracts are going to show up in that.

Instead, you need to define a block filter and iterate over each transaction in the returned block, looking for transactions that target the desired account. Note that this won't catch all value transfers - see this answer for why.

  • you mention "a contract that sends ether", but I said I'm not interested in contracts, I'm interested in A->B transfers of ether, where B is an account (not a contract address) – knocte May 27 '16 at 16:17
  • You're right; see my updated answer. – Nick Johnson May 27 '16 at 16:20
  • the transfers that are not going to be caught are the ones that are sent from A to B where A is a contract address instead of an account? – knocte May 27 '16 at 16:25
  • @knocte Right - any transfer from a contract won't show up. – Nick Johnson May 27 '16 at 16:32
  • github.com/ethereum/wiki/wiki/… also worked, if you include this in your answer I will upvote, thanks – knocte May 27 '16 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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