Testing and Debugging
1. Verifying Data Integrity
Q: How can I ensure that the data stored within a Data Object is consistent and hasn't been tampered with by unauthorized Data Managers?
Data Objects should be designed in a way that prevents write access to the data assigned to the Data Point other than the one provided as an argument to the write()
call and verified by the Data Index. It is the responsibility of the Data Object developer to make an appropriate design. An example can be found here.
Q: Can I implement multiple standards (e.g., ERC-20 and ERC-721) within a single Data Manager?
It depends on the standards you want to implement. ERC-20 and ERC-721 are not compatible with each other because they have methods and events with the same name and argument list but different meanings; for example, the Transfer
event and the transferFrom()
method. The last argument in ERC-20 is the transferred value, while in ERC-721, it's the ID of the transferred token.
The Nexera Standard does not impose any additional restrictions here.