I'm new to solidity development so maybe this isn't as difficult as it is right now for me. I created a smart contract that can receive and send ether to different accounts. If I connect ganache to metamask, I can see it changes the account balance when these functions are called. I use "send" method to send ether to an account and use a "depositToThisContract" function as payable to receive ether in the smart contract.
My question is ¿Is it possible for a smart contract to be written so it can receive ether directly from metamask platform? That is without calling these functions through metamask API or using web3. Directly from metamask, just like you would send ether to any other account ¿Is there a class or other type of contract that I can import so my contract recognize transactions coming from metamask platform and updates the balance? ¿Or maybe override an existing default function?
PS: This is my first question ever at a development forum. I would really appreciate if you could tell me how to make this better.