I'm going to use ERC223 token, but worry about backward compatibility with ERC20. Here are questions that bother me:

  1. Two different Transfer events: 3 args ERC20 Transfer(address indexed _from, address indexed _to, uint256 _value) and 4 args ERC223 Transfer(address indexed from, address indexed to, uint value, bytes data)
  2. transferFrom/approve/allowance functions and Approval event are specified in ERC20 standard, but lacks in ERC223 though it is said that "ERC223 is a superset of the ERC20 token standard".

Could anybody clarify this points for me? I want to avoid situation when token is already deployed and sent to people, but it is not operable at trading exchange and does not not work with services designed for ERC20.

  • I am not sure, but events are not part of the standard. Only the functions are. – Andromelus Apr 2 at 10:27
  • ERC223 is compatible with ERC20, and to @Andromelus, events are part of the standard. – Eli Drion Apr 2 at 13:33
  • Actually @ElishaDrion, there is a good chance that events might not be apart of that standard. As far as solidity is concerned, due to the natur of how function overriding works, a Transfer event function with 3 and 4 arguments are technically 2 totally different functions. – ReyHaynes Apr 2 at 13:58
  • Perhaps not for ERC223, but it is for ERC20. Check github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md – Eli Drion Apr 2 at 14:00
  • @ElishaDrion I know it's standard for ERC20, but was referring to the transfer method through both standards being different. – ReyHaynes Apr 3 at 1:43

This not about somebody's implementation of the token. ERC223 standard states clearly:

"ERC223 tokens are backwards compatible with ERC20 tokens. It means that ERC223 supports every ERC20 functional and contracts or services working with ERC20 tokens will work with ERC223 tokens correctly" https://github.com/Dexaran/ERC223-token-standard

That is, any valid ERC223 implementation is backwards compatible with ERC20

up vote 0 down vote accepted

Problem solved, found ERC20_compatible branch in Dexaran's ERC223 repo https://github.com/Dexaran/ERC223-token-standard/tree/ERC20_compatible and with few additions from master branch implemented fully functional and ERC20 compatible token.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.