Is their any way to execute a function of smart contract whenever a transaction to a predefined external account occurs? I mean if someone transfers some ethers to account A, a function of a smart contract can store some values of that transaction. I want to do it using smart contract only not using any wrapper around this. Please suggest.

bumped to the homepage by Community 5 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • It is possible in a reverse way. i.e., whenever someone sends Ether to the contract, record it and send the amount to account A. – Rajesh Oct 31 '17 at 4:39

If you mean without you sending instructions to check it each turn, up to my limited knowledge I think it is not possible because someone has to interact with the contract for it to do anything.

However, it is possible to do so with the external functions you do not want to use.

I hope I help.

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.