Factory Cell
In order to store the common data without repeating and paying for unnecessary storage space in the blockchain a factory Cell is defined to store common data:
Since we need some mechanism to ensure that this cell is unique, we recommend using the Type ID proposed here. For that purpose, the nervos blockchain offers a built-in type_id script that can be used without the need of developing and deploying a custom script, but, when looking for custom features on the factory, a specific script should be developed implementing the type_id functionality, plus the custom features. The data on this cell should be verified on the NFT script to ensure compatibility with the standard, so the script should require using the factory as a dependency.
The purpose ofbase_token_uri
is to provide a detailed information source for the token. The path to fetch this info would use the base_token_uri
as the base path along with the token id:base_token_uri/token_id
, and it should return a JSON object with the extra info. For this JSON object, we adopt Ethereum’s ERC721 Metadata JSON Schema
:
Referencing the Ethereum standard will allow straightforward cross-chain integration with blockchains that have already adopted it.
Last updated