Given a contract address and access to a fully synced ethereum node, what do you query to figure out if the token conforms (strictly or not) to ERC1155, ERC721 or ERC20?

I've been trying to build checks with `eth_call` to achieve this, just like etherscan does, but I can't help wondering if there's a little less painful/complicated way to do this.
A lot of contracts that do not implement EIP-165 are still properly categorized by etherscan.
submitted by /u/dystopiandev
[link] [comments]