From 1305db9026eaf78e95188910ae0fc77b26e531b1 Mon Sep 17 00:00:00 2001 From: Emmet Date: Fri, 23 Oct 2026 16:48:50 +0200 Subject: [PATCH 1/2] fix(lsp34): align schema with canonical ABI ownership-source encoding --- LSPs/LSP-34-ExternalOwnership.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/LSPs/LSP-34-ExternalOwnership.md b/LSPs/LSP-34-ExternalOwnership.md index 7adc1bd0..03c174ad 100644 --- a/LSPs/LSP-34-ExternalOwnership.md +++ b/LSPs/LSP-34-ExternalOwnership.md @@ -34,12 +34,12 @@ Some contracts need to let an external party mint tokens without giving up owner "name": "LSP34OwnershipSource", "key": "0xa8bc5aea0671308a0920eb016db4108c486ef117a7cd18bf3a9dfcadab6232e1", "keyType": "Singleton", - "valueType": "(address,bytes32)", - "valueContent": "(Address,bytes32)" + "valueType": "(bytes32,bytes32)", + "valueContent": "(Bytes32,Bytes32)" } ``` -**Value encoding:** `abi.encode(address sourceContract, bytes32 tokenId)` +**Value encoding:** `abi.encode(address sourceContract, bytes32 tokenId)`, exactly 64 bytes: the first 32-byte word is `sourceContract` left-padded with 12 zero bytes, the second is `tokenId`. This is why the schema declares the LSP2 tuple `(bytes32,bytes32)`: the packed LSP2 tuple `(address,bytes32)` would be 52 bytes and is not a valid value. A value of any other length MUST be treated as unset. - `sourceContract` — the contract to query for the authorized minter. - `tokenId` — the tokenId to query on `sourceContract`. If `bytes32(0)`, query `owner()` on `sourceContract` instead of `tokenOwnerOf(tokenId)`. @@ -89,8 +89,8 @@ ERC725Y JSON Schema `LSP34ExternalOwnership`: "name": "LSP34OwnershipSource", "key": "0xa8bc5aea0671308a0920eb016db4108c486ef117a7cd18bf3a9dfcadab6232e1", "keyType": "Singleton", - "valueType": "(address,bytes32)", - "valueContent": "(Address,bytes32)" + "valueType": "(bytes32,bytes32)", + "valueContent": "(Bytes32,Bytes32)" } ] ``` From d783b22632f42e037827c6159577bcd192017d4f Mon Sep 17 00:00:00 2001 From: Emmet Date: Fri, 23 Oct 2026 17:26:11 +0200 Subject: [PATCH 2/2] docs(lsp33,lsp34): link music token implementations --- LSPs/LSP-33-MusicNFT.md | 5 ++++- LSPs/LSP-34-ExternalOwnership.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/LSPs/LSP-33-MusicNFT.md b/LSPs/LSP-33-MusicNFT.md index f435fe7a..a0e1b89c 100644 --- a/LSPs/LSP-33-MusicNFT.md +++ b/LSPs/LSP-33-MusicNFT.md @@ -518,7 +518,10 @@ A release with tracks naturally produces **four separate files** — one `LSP4Me ## Implementation -Reference implementation: [lukso-network/lsp-smart-contracts#1088](https://github.com/lukso-network/lsp-smart-contracts/pull/1088). +Reference implementations (introduced in [lukso-network/lsp-smart-contracts#1088](https://github.com/lukso-network/lsp-smart-contracts/pull/1088)): + +- [`LSP7MusicNDTAbstract`](https://github.com/emmet-bot/lsp-smart-contracts/blob/1da63956fd0c418e0766b3eeea864feaa18c7bb0/packages/lsp7-contracts/contracts/extensions/LSP7MusicNDT/LSP7MusicNDTAbstract.sol): an [LSP7] carrier for a Music NDT (Non-Divisible Token). One contract represents a track as multiple interchangeable units, each a whole, non-divisible token when deployed non-divisible (`decimals()` = `0`). It also implements [LSP34] minting delegation. +- [`LSP8MusicNFTAbstract`](https://github.com/lukso-network/lsp-smart-contracts/blob/main/packages/lsp8-contracts/contracts/extensions/LSP8MusicNFT/LSP8MusicNFTAbstract.sol): an [LSP8] collection carrier, where every item is a unique `tokenId` with its own per-tokenId metadata scope. ERC725Y JSON Schema `LSP33MusicNFT`: diff --git a/LSPs/LSP-34-ExternalOwnership.md b/LSPs/LSP-34-ExternalOwnership.md index 03c174ad..d1322239 100644 --- a/LSPs/LSP-34-ExternalOwnership.md +++ b/LSPs/LSP-34-ExternalOwnership.md @@ -79,7 +79,7 @@ By keeping ownership untouched, LSP34 ensures that artists never lose control ov ## Implementation -Reference implementation: [lukso-network/lsp-smart-contracts#1088](https://github.com/lukso-network/lsp-smart-contracts/pull/1088). +Reference implementation: [`LSP7MusicNDTAbstract`](https://github.com/emmet-bot/lsp-smart-contracts/blob/1da63956fd0c418e0766b3eeea864feaa18c7bb0/packages/lsp7-contracts/contracts/extensions/LSP7MusicNDT/LSP7MusicNDTAbstract.sol) (introduced in [lukso-network/lsp-smart-contracts#1088](https://github.com/lukso-network/lsp-smart-contracts/pull/1088)). Its `mint()` is callable by the [ERC173] `owner()` or by the address resolved from `LSP34OwnershipSource`; ownership, renouncement and `setData` access control stay standard [LSP7]. ERC725Y JSON Schema `LSP34ExternalOwnership`: