ERC20 - это стандартный токен, который большинство людей знают и любят сегодня. Этот стандарт определяет основные потребности в _totalSupply, такие как _totalSupply, transfer(), _totalSupply approve() и transferFrom(). Вы должны определить name, symbol и decimals. Он также определяет сопоставление balances которое отслеживает все пользовательские холдинги, между прочим.
ERC223 - это расширение ERC20, которое предотвращает случайную передачу токенов самому договору токена (в отличие от другого пользователя). Когда инициируется передача ERC20, на самом деле происходит взаимодействие с токеновым контрактом, которое вызывает изменение остатков. Из-за этого люди путаются и случайно посылают токены на токен-контракт, эффективно сжигая их навсегда. Реализация этого проста: расширьте интерфейс ERC20 и добавьте дополнительную функцию transfer() с дополнительным параметром (чтобы избежать перезаписи передачи ERC20 transfer()). Если эта функция transfer() используется, транзакция завершится неудачей, если токены будут отправлены в токен.