Asset tracking and movement
NFTs can be transferred just like regular ERC-20 tokens. The standard provides modified transfer
and approve
functions for token transfer and delegation tasks. It also includes the standard event logging facility so that asset tracking can be made easier.
In this recipe, you will learn how to implement asset movement and tracking functionality in the ERC-721 token created in the previous recipe. Token transfer functionality can be achieved by modifying the standard transfer method and asset tracking can be implemented with event filtering.
Getting ready
You need to have a working installation of Ethereum (geth
, Parity
, ganache
, and so on) or the Remix IDE to test this recipe.
The contracts explained in this recipe extend the basic ERC-721 token created in the previous recipe. It is recommended to read through it before stepping through this recipe.
How to do it…
- Create a new contract that inherits the
BasicERC721
contract created in the previous recipe. This removes...