How is it exactly determined whether a contract is ERC20 compliant and who determines it? After reading Do I have to implement ERC20 signature as separate contract and use inheritance? and some googling, I have some ideas.
1) Who decides whether a contract is ERC20 compliant? Is it just the one who wants to use it (exchange, wallet, ...)?
2) How do you determine whether a contract is ERC20 compliant? My current understanding is that all you need is to have the right function signatures (right function hashes). So it doesn't exactly have to inherit (implement) from an ERC20 interface. Is that correct?
3) If the answer to the second question is "yes", is it ok to add for example payable
modifier to some of the functions (as I've understood, it wouldn't change the hash of the function)?
If the answer to question 2 and 3 is "yes", then the following would be a valid implementation of ERC20 standard (assuming the rest of the functions are implemented also):
contract A {
...
function transfer(address to, uint tokens) public payable returns (bool success) {
...
}
...
}