Am I wondering how can I validate simple money transfer from one address to another? I'm querying the blockchain with etherscan and have transaction hash. Is it enough just to check from, to and amount, or I need to check something else?

  • Yes. The transactions hash is enough. its existence and passing means that the value transferred from the from account to destination account. – Kaki Master Of Time Dec 17 '18 at 13:58

You should also consider a number of validations to make sure the transaction is final.

Have a look at this very good reddit thread regarding the recommended number of confirmations.

If you're receiving small payments, with low chances of fraud, then yes, you can assume that what etherscan shows is correct.

If you're handling large amounts, with high chances of frauds, then the same thread recommends you to wait for 12 confirmations and to:

exchanges and entities handling very large amounts of Ether frequently are still encouraged to run two different Ethereum implementations and only accept transactions that have been confirmed by both for maximum security (e.g. Go & C++).

  • Thank you for the response, yes I forgot to mention the confirmations, but I rather thought of some code that can be in the transaction/contract itself? I'm aware that this question could sound stupid, but I'm not sure what's the difference between contract and transaction in ethereum. – Nikola Dec 17 '18 at 14:14
  • for ETH, once your regular account (ie, not a smart contract) shows a balance, that can't be decreased. Nobody can transfer funds from your account once the funds are there and you're the only one having the private keys. – Tudor Constantin Dec 17 '18 at 14:18

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.