in my solidity contract ERC20 I have a function that looks like this:
function buy() payable public {
uint amount = msg.value / buyPrice; // calculates the amount
_transfer(address(this), msg.sender, amount); // makes the transfers
}
Who should be paid in order to buy some tokens? Is the owner of the tokens minted? Also a normal "send" Ether to the owner of the contract would suffice to buy tokens?
Thank you in advance for the answers.

