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?


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
    – JTConsulta
    Apr 1 '21 at 11:53

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.