How to tell if a token is ERC223


#1

The simplest way is to try to self-list the token on Saturn Network.

For dApp developers, in case you want to disambiguate ERC20 and ERC223 functionality in your app, you can try the following method as an approximation. This method will return true for all real ERC223 tokens, and false for all real ERC20 tokens.

async function isERC223(contractAddress) {
  let code = await web3.eth.getCode(contractAddress)
  let hash = 'be45fd62'
  return (code.indexOf(hash.slice(2, hash.length)) > 0)
}