Skip to content

v2 · Feature 2 — Delete Unused Templates - #2

Closed
robrigo wants to merge 1 commit into
mainfrom
feat/v2-2-delete-unused-templates
Closed

v2 · Feature 2 — Delete Unused Templates#2
robrigo wants to merge 1 commit into
mainfrom
feat/v2-2-delete-unused-templates

Conversation

@robrigo

@robrigo robrigo commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Adds cleanup of unused templates (with mutable-template erase checks).


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

⚠️ 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 an on-chain cleanup mechanism to remove unused (never-issued) templates from a collection, supporting AtomicAssets v2 template lifecycle management.

Changes:

  • Introduces a new deltemplate action to delete templates when issued_supply == 0.
  • Wires the new action into the contract interface/header.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/atomicassets.cpp Adds atomicassets::deltemplate implementation to erase templates with zero issued supply.
include/atomicassets.hpp Declares the new deltemplate action in the contract interface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/atomicassets.cpp
Comment on lines +478 to +481
require_auth(authorized_editor);

auto collection_itr = collections.require_find(collection_name.value,
"No collection with this name exists");
Comment thread include/atomicassets.hpp
name collection_name,
int32_t template_id
);

@robrigo

robrigo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #9, which is merged. This feature is on main: deltemplate is declared in include/atomicassets.hpp and 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