From b40f909f5980d968493df270a0cca40b0aad4c14 Mon Sep 17 00:00:00 2001 From: Robrigo <590263+robrigo@users.noreply.github.com> Date: Wed, 5 Aug 2026 02:12:08 -0400 Subject: [PATCH 1/2] fix(abi): ship the Ricardian clauses --- resource/atomicassets.contracts.md | 188 ++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 1 deletion(-) diff --git a/resource/atomicassets.contracts.md b/resource/atomicassets.contracts.md index 50c93f4..2daa59e 100644 --- a/resource/atomicassets.contracts.md +++ b/resource/atomicassets.contracts.md @@ -846,4 +846,190 @@ icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CF Clauses:
This action may only be called with the permission of {{payer}}. -
\ No newline at end of file + + +

createtempl2

+ +--- +spec_version: "0.2.0" +title: Create a template with mutable data +summary: '{{nowrap authorized_creator}} creates a new template which belongs to the {{nowrap collection_name}} collection and uses the {{nowrap schema_name}} schema' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+{{authorized_creator}} creates a new template which belongs to the {{collection_name}} collection. + +The schema {{schema_name}} is used for the serialization of the template's data. + +{{#if transferable}}The assets within this template will be transferable +{{else}}The assets within this template will not be transferable +{{/if}} + +{{#if burnable}}The assets within this template will be burnable +{{else}}The assets within this template will not be burnable +{{/if}} + +{{#if max_supply}}A maximum of {{max_supply}} assets can ever be created within this template. +{{else}}There is no maximum amount of assets that can be created within this template. +{{/if}} + +Unlike createtempl, this action also sets mutable template data, which the collection's authorized accounts can change later with settempldata. +
+ +Clauses: +
+This action may only be called with the permission of {{authorized_creator}}, who must be an authorized account of the {{collection_name}} collection. +
+ +

settempldata

+ +--- +spec_version: "0.2.0" +title: Update a template's mutable data +summary: '{{nowrap authorized_editor}} updates the mutable data of template {{nowrap template_id}} in the {{nowrap collection_name}} collection' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+{{authorized_editor}} replaces the mutable data of the template {{template_id}} within the {{collection_name}} collection with {{new_mutable_data}}. + +The template's immutable data, its transferability, its burnability and its maximum supply are not changed. Assets already minted from this template are affected, because mutable template data is read from the template rather than copied onto each asset. +
+ +Clauses: +
+This action may only be called with the permission of {{authorized_editor}}, who must be an authorized account of the {{collection_name}} collection. +
+ +

deltemplate

+ +--- +spec_version: "0.2.0" +title: Delete an unused template +summary: '{{nowrap authorized_editor}} deletes the template {{nowrap template_id}} from the {{nowrap collection_name}} collection' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+{{authorized_editor}} deletes the template {{template_id}} within the {{collection_name}} collection. + +A template can only be deleted while no assets have been issued from it. The deletion is permanent and the template id is not reused. +
+ +Clauses: +
+This action may only be called with the permission of {{authorized_editor}}, who must be an authorized account of the {{collection_name}} collection. +
+ +

redtemplmax

+ +--- +spec_version: "0.2.0" +title: Reduce a template's maximum supply +summary: '{{nowrap authorized_editor}} reduces the maximum supply of template {{nowrap template_id}} to {{nowrap new_max_supply}}' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+{{authorized_editor}} lowers the maximum supply of the template {{template_id}} within the {{collection_name}} collection to {{new_max_supply}}. + +The maximum supply can only be reduced, never raised, and never below the number of assets already issued from this template. The reduction is permanent. +
+ +Clauses: +
+This action may only be called with the permission of {{authorized_editor}}, who must be an authorized account of the {{collection_name}} collection. +
+ +

setschematyp

+ +--- +spec_version: "0.2.0" +title: Set media type descriptors for a schema +summary: '{{nowrap authorized_editor}} sets the media type descriptors of the {{nowrap schema_name}} schema in the {{nowrap collection_name}} collection' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+{{authorized_editor}} sets the media type descriptors of the schema {{schema_name}} within the {{collection_name}} collection to {{schema_format_type}}. + +These descriptors record how each field of the schema should be interpreted, for example as an image or a video. They replace the schema's existing descriptors in full rather than merging with them, so any descriptor omitted here is removed. +
+ +Clauses: +
+This action may only be called with the permission of {{authorized_editor}}, who must be an authorized account of the {{collection_name}} collection. +
+ +

createauswap

+ +--- +spec_version: "0.2.0" +title: Propose a new collection author +summary: 'The author of {{nowrap collection_name}} proposes {{nowrap new_author}} as the collection's new author' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+The current author of the {{collection_name}} collection proposes that {{new_author}} becomes its new author. + +This action only records the proposal. The collection's author does not change until {{new_author}} calls acceptauswap. Until then the current author keeps full control and may withdraw the proposal. + +{{#if owner}}The proposal also transfers the collection's owner permission. +{{else}}The proposal does not transfer the collection's owner permission. +{{/if}} +
+ +Clauses: +
+This action may only be called with the owner permission of the current author of the {{collection_name}} collection. +
+ +

acceptauswap

+ +--- +spec_version: "0.2.0" +title: Accept becoming a collection's author +summary: '{{nowrap collection_name}}'s proposed new author accepts the author change' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+The account proposed as the new author of the {{collection_name}} collection accepts the change. + +On acceptance the collection's author becomes the proposed account, and the pending proposal is removed. This transfers control of the collection, including the right to authorize accounts and to set the market fee. +
+ +Clauses: +
+This action may only be called with the permission of the account named as the new author in the pending proposal for {{collection_name}}. +
+ +

rejectauswap

+ +--- +spec_version: "0.2.0" +title: Reject or withdraw a proposed author change +summary: 'The pending author change for {{nowrap collection_name}} is rejected' +icon: https://atomicassets.io/image/logo256.png#108AEE3530F4EB368A4B0C28800894CFBABF46534F48345BF6453090554C52D5 +--- + +Description: +
+The pending author change for the {{collection_name}} collection is rejected and the proposal is removed. + +The collection's author does not change. A new proposal can be created afterwards with createauswap. +
+ +Clauses: +
+This action may only be called with the permission of either the current author of {{collection_name}} or the account named as the proposed new author. +
From ad0e37d4a261bf3c437f287b37cea4b8429baab8 Mon Sep 17 00:00:00 2001 From: Robrigo <590263+robrigo@users.noreply.github.com> Date: Wed, 5 Aug 2026 02:12:09 -0400 Subject: [PATCH 2/2] fix(abi): ship the Ricardian clauses --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 07d5107..28ef746 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ build: mkdir -p build - cdt-cpp -abigen -contract=atomicassets -I./include src/atomicassets.cpp -o build/atomicassets.wasm + cdt-cpp -abigen -contract=atomicassets -I./include -R./resource src/atomicassets.cpp -o build/atomicassets.wasm $(MAKE) build-test-consumer # Test-only fixture: a minimal EXTERNAL contract that reads atomicassets tables