How to determine is a nft token is erc1155 or erc721

how can i determine if a token is erc1155 or erc721

1 Like

I think both of them must implement EIP165, so you can use the supportsInterface of EIP165 to check whether the contract is ERC721 or ERC1155. More details about EIP165 you can find at here: https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified

2 Likes