Creating an ERC223 token
ERC20 is a widely used token standard but it comes with some issues. Transferring ERC20 standard tokens to a non-supported address such as a contract address can make them unusable. ERC223 tries to solve this problem by recommending some modifications to the existing standard.
In this recipe, you will understand the difference between these two standards and will learn to implement an ERC223-based contract.
Getting ready
You need to have a development environment that supports solidity programming and an Ethereum network to deploy and test your code.
How to do it…
- The standard handles the token transfers to a contract address. Follow this standard to create a function that will reject the transaction if the receiving contract does not support such functionality.
- The standard modifies the transfer function to include an additional data field. It also keeps the regular transfer function for backward compatibility. Use the following interface to implement a minimal ERC223...