A token ERC-20 smart contract can call functions when the transfer() function is called to send or receive tokens. I can test if is the owner address and make things.

Its possible that my smart contract know if the owner address receives ethers (no tokens) and call a function?

1 Answer 1


You can implement in your code a PAYABLE function that accepts Ether and transfer it to the owner's account

function deposit() public payable {
    require(msg.value > 0);
    /* Make your things ;) */
  • Oh, interesting and easy way, thank you
    – JTCon
    Commented Apr 1, 2021 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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