v2 · Feature 3 + 6 — Mutable Templates & Non-Burnable/Non-Transferable XOR - #3
v2 · Feature 3 + 6 — Mutable Templates & Non-Burnable/Non-Transferable XOR#3robrigo wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for mutable per-template data via a new templatedata table and associated actions, while refactoring template creation into a shared helper and enforcing that templates cannot be both non-transferable and non-burnable.
Changes:
- Refactors template creation (
createtempl) intointernal_create_templateand introducescreatetempl2to include explicit mutable template fields at creation time. - Adds
templatedatastorage withsettempldata+logsetdatatlto update/log template mutable data per collection scope. - Enforces the “non-burnable/non-transferable XOR” invariant (
burnable || transferable) during template creation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/atomicassets.cpp | Adds createtempl2, settempldata, logsetdatatl, internal_create_template, and templatedata table access (get_template_data), plus the new burnable/transferable constraint. |
| include/atomicassets.hpp | Exposes the new actions, introduces the templatedata table type, and declares internal_create_template + get_template_data. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * Updates the mutable data of a template within the templatedata table | ||
| * If the row doesn't exist within the template, it emplaces a new row | ||
| * If the new_mutable_data is empty & the row exists, it eraes the row |
| uint32_t max_supply, | ||
| ATTRIBUTE_MAP & immutable_data, | ||
| ATTRIBUTE_MAP mutable_data = {} |
| uint32_t max_supply, | ||
| ATTRIBUTE_MAP & immutable_data, | ||
| ATTRIBUTE_MAP mutable_data |
|
Superseded by #9, which is merged. This feature is on |
Mutable template data (
templates→templates2) + non-burnable/non-transferable XOR condition.Mirrored into the canonical
atomicassetsorg for the AtomicAssets v2 release + audit.Original: wax-office-of-inspector-general/atomicassets-contract#8
masteryet. Kept on a feature branch to avoid prod integration risk; pending the comprehensive v2 audit.