Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion LSPs/LSP-33-MusicNFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down
12 changes: 6 additions & 6 deletions LSPs/LSP-34-ExternalOwnership.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`.
Expand Down Expand Up @@ -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`:

Expand All @@ -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)"
}
]
```
Expand Down
Loading