Recently, our team is developing a free development-type full-chain game, which uses ERC721, ERC1155, and royalty-related protocols. Since it is written in cairo2, we found that cairo is not very clear about these nft protocols involved, ERC1155 only has version v0.6.1 for reference on openzeppelin. Now everyone uses cairo1.0 and later versions to write, which is obviously not suitable for developers to develop and learn. Although openzeppelin also has a version of cairo2 for ERC721, it is too complex to write, and some interfaces are not implemented, so it cannot be used out of the box.
After we sorted out the relevant information and compared it with the relevant protocols on Ethereum, we spent some time and wrote 2 versions using cairo2. One is a simple version with clear content, suitable for beginners and can be used immediately. The other is the regular version which is a little more standardized and can also be used directly. Developers can save a lot of time by referring to these two versions when writing. Of course, what we write may not necessarily be correct. It is for reference only. We hope that the official will provide the corresponding snip standard soon so that we can avoid detours.
Code open source url:
Firstly, I want to extend my sincere appreciation for your team’s efforts in developing these Cairo2 implementations of ERC721, ERC1155, and royalty-related protocols. Your initiative in creating both a simplified version for beginners and a standard version for more experienced developers is a commendable contribution to the StarkNet community. This work undoubtedly aids in bridging the gap between Ethereum protocols and StarkNet’s unique environment, especially considering the challenges with the current state of documentation and implementation standards.
I have a couple of questions regarding your implementations:
Security and Audit Concerns: Given the complexities and nuances of blockchain development, could you share if these implementations have undergone any security audits or peer reviews? Ensuring the security of NFT protocols is crucial, and I’m curious about the measures taken to validate the security of your code.
Compatibility and Future Updates: How do you anticipate these implementations will adapt to future updates in StarkNet and the evolving standards of NFT protocols? Since the blockchain landscape is constantly evolving, understanding your approach to maintain and update these implementations would be insightful.
Lastly, your call for an official SNIP standard highlights a significant need in the StarkNet ecosystem. It’s my hope that your work will catalyze further development and standardization in this area.
Looking forward to your thoughts and further contributions!
Our current main focus is on the development of full-chain games. Since we have spent a lot of time testing the compatibility of ERC721 and ERC1155 with the Starknet block browser, wallet, and NFT market, we have open sourced these codes for the reference of developers. It can avoid many detours and save a lot of time. The code has not been audited and is only used for reference. Regarding subsequent compatibility issues, users can add upgrade functions to their contracts to facilitate subsequent iterations. I know this is very simple on Starknet. If we have time in the future, we are also willing to contribute to these standards. Thank you!