# Update Module

The foundational philosophy guiding attribute registration across various applications within this EIP emphasizes a balance between standardization and adaptability. When registering an application through the proposed smart contract, application owners are REQUIRED to specify an update mechanism (i.e., an update module) that details the attributes to be updated and the method of their update. This module must be universally applicable across all associated NFT collections. This approach is designed to meet the unique needs of different applications, ensuring scalability and generalizability in attribute management.

For example, in the context of a Role-Playing Game (RPG), the application owner (game developer) MAY specify an array of attributes such as `["HP", "MP", "EXP", "ATK", "DEF", ...]` upon registration in the update module. These attributes serve as global defaults for any NFT collection registered with the application, providing a consistent framework for attribute integration. Depending on the nature of the NFT collection—whether characters, weapons, or other in-game items—the applicable attributes from the predefined list are utilized. For instance, character NFTs might incorporate the entire attribute range, including `HP`, `MP`, `EXP`, `ATK`, `DEF`, whereas weapon NFTs might only use `ATK` and `DEF`.

Echoing the event-driven mechanism, this EIP proposes dynamically updating NFT attributes within a specific application through the emission of an `UpdateModuleSet(appId, updateModuleUrl);` event. This event signals an update by pointing to a URL that hosts a JSON file containing the updated module (e.g., it could contain an array of attributes: `["HP", "MP", "EXP", "ATK", "DEF", "SPEED", ...]`). This method enables application-specific adjustments to NFT attributes, enhancing their adaptability and relevance.

This framework allows for the tailoring of attribute sets to different NFT collections within the same application, ensuring consistency and providing the necessary flexibility for various application scenarios. It simplifies attribute management across collections and enhances the interoperability and dynamic interaction of NFTs within applications, aligning with the event-driven update mechanism described in this EIP.

Additionally, for those seeking a formalized method to implement the update module, `ERC-5185` offers a structured strategy that enables controlled NFT status updates through specific formulas. This method ensures deterministic, limited updates, verifiable through on-chain events, making it suitable for applications desiring methodical NFT status modification.

This EIP fosters dynamic, application-specific updates for NFTs, while `ERC-5185` provides an option for scenarios that demand a defined, deterministic update process. Application owners are RECOMMENDED to consider `ERC-5185` for implementing a structured update module.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://martinzerox.gitbook.io/zerox-network-whitepaper/erc-xxxx/update-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
