From 7f9d039654bff9f187e986f765897d81f6e7552f Mon Sep 17 00:00:00 2001 From: Rob Konsdorf Date: Tue, 18 Aug 2026 16:20:22 -0400 Subject: [PATCH] docs: mark issued_supply a lifetime mint counter that burns never decrement An integrator computing a template's circulating count from issued_supply alone overcounts by the number of burns, and neither page said so. burnasset reads the template row only for the burnable check and writes nothing back, so the counter only ever moves up. --- reference/atomicassets/actions.md | 2 +- reference/atomicassets/tables.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/atomicassets/actions.md b/reference/atomicassets/actions.md index 45971a7..3a0bda9 100644 --- a/reference/atomicassets/actions.md +++ b/reference/atomicassets/actions.md @@ -358,7 +358,7 @@ Source: `include/atomicassets.hpp:202-207`, `src/atomicassets.cpp:1079-1087` Required authorization: `asset_owner`. -Erases the `assets` row. If the asset is templated, the template's `burnable` flag must be true. Any `backed_tokens` still on the row (only possible on assets that predate the V2 backing deprecation) are credited into `asset_owner`'s `balances` row. Sends `logburnasset` with the full pre-burn state (collection, schema, template id, backed tokens, both data layers, prior ram_payer) before erasing the row. +Erases the `assets` row. If the asset is templated, the template's `burnable` flag must be true. Any `backed_tokens` still on the row (only possible on assets that predate the V2 backing deprecation) are credited into `asset_owner`'s `balances` row. Sends `logburnasset` with the full pre-burn state (collection, schema, template id, backed tokens, both data layers, prior ram_payer) before erasing the row. The parent template's `issued_supply` is unchanged: the action reads the template row only for the `burnable` check, so `issued_supply` counts lifetime mints and a circulating supply must subtract burns. Source: `include/atomicassets.hpp:209-212`, `src/atomicassets.cpp:1096-1177` diff --git a/reference/atomicassets/tables.md b/reference/atomicassets/tables.md index 563fe8e..65dcf5a 100644 --- a/reference/atomicassets/tables.md +++ b/reference/atomicassets/tables.md @@ -130,10 +130,10 @@ Secondary indexes: none. | `transferable` | `bool` | Inherited by every asset minted from this template; blocks `transfer`, `createoffer`, and `acceptoffer` for the asset when false. | | `burnable` | `bool` | Inherited by every asset minted from this template. `burnable || transferable` is enforced at creation; both false is rejected. | | `max_supply` | `uint32_t` | 0 means unlimited. Set at creation, only ever lowered afterward (`locktemplate`, `redtemplmax`). | -| `issued_supply` | `uint32_t` | Incremented by every `mintasset` against this template; must stay `< max_supply` when `max_supply > 0`. Also the value `deltemplate` requires to be exactly 0. | +| `issued_supply` | `uint32_t` | Incremented by every `mintasset` against this template; must stay `< max_supply` when `max_supply > 0`. Also the value `deltemplate` requires to be exactly 0. No action decrements it, `burnasset` included, so it counts lifetime mints rather than circulating supply; a circulating supply must subtract burns. | | `immutable_serialized_data` | `vector` | Set once at `createtempl`/`createtempl2`; no action changes it afterward. | -Source: `include/atomicassets.hpp:383-394`, `src/atomicassets.cpp:566-696` (create/lock/reduce/delete actions), `src/atomicassets.cpp:1613-1689` (`internal_create_template`) +Source: `include/atomicassets.hpp:383-394`, `src/atomicassets.cpp:566-696` (create/lock/reduce/delete actions), `src/atomicassets.cpp:1613-1689` (`internal_create_template`), `src/atomicassets.cpp:1096-1177` (`burnasset`, which reads the row for the `burnable` check and never writes it) Live chain example (`scope=farmersworld`, `table=templates`, `lower_bound=260638`, byte field elided):