Skip to content

v2 · Feature 3 + 6 — Mutable Templates & Non-Burnable/Non-Transferable XOR - #3

Closed
robrigo wants to merge 7 commits into
mainfrom
feat/v2-3-6-mutable-templates-nonburn-xor
Closed

v2 · Feature 3 + 6 — Mutable Templates & Non-Burnable/Non-Transferable XOR#3
robrigo wants to merge 7 commits into
mainfrom
feat/v2-3-6-mutable-templates-nonburn-xor

Conversation

@robrigo

@robrigo robrigo commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Mutable template data (templatestemplates2) + non-burnable/non-transferable XOR condition.


Mirrored into the canonical atomicassets org for the AtomicAssets v2 release + audit.
Original: wax-office-of-inspector-general/atomicassets-contract#8

⚠️ Hold — do not merge to master yet. Kept on a feature branch to avoid prod integration risk; pending the comprehensive v2 audit.

@robrigo
robrigo marked this pull request as ready for review June 2, 2026 20:49
@robrigo
robrigo requested a review from Copilot June 2, 2026 20:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) into internal_create_template and introduces createtempl2 to include explicit mutable template fields at creation time.
  • Adds templatedata storage with settempldata + logsetdatatl to 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.

Comment thread src/atomicassets.cpp
/**
* 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
Comment thread include/atomicassets.hpp
Comment on lines +414 to +416
uint32_t max_supply,
ATTRIBUTE_MAP & immutable_data,
ATTRIBUTE_MAP mutable_data = {}
Comment thread src/atomicassets.cpp
Comment on lines +1297 to +1299
uint32_t max_supply,
ATTRIBUTE_MAP & immutable_data,
ATTRIBUTE_MAP mutable_data
@robrigo

robrigo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #9, which is merged. This feature is on main: settempldata and createtempl2 are declared in include/atomicassets.hpp, with the mutable data in the templates2 table, shipped in v2.0.0-rc4 and rc5. The integration branch carried the feature under its own commits rather than these, so this PR could not close automatically. Branch kept for history.

@robrigo robrigo closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants