From 2c0630d5eb15bcd93330f5c61cae936c33b4a9e3 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 12 Sep 2023 12:59:24 +0100 Subject: [PATCH] docs: auto-generate new docs for LSP8 --- README.md | 1 + .../LSP8IdentifiableDigitalAsset.md | 46 +++++++++---- .../extensions/LSP8Burnable.md | 46 +++++++++---- .../extensions/LSP8CappedSupply.md | 46 +++++++++---- .../extensions/LSP8CompatibleERC721.md | 43 ++++++++---- .../extensions/LSP8Enumerable.md | 46 +++++++++---- .../presets/LSP8CompatibleERC721Mintable.md | 63 ++++++++++++------ .../presets/LSP8Mintable.md | 66 +++++++++++++------ 8 files changed, 254 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index f79b2666e..764ba210e 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ import { ERC725YDataKeys, PERMISSIONS, ALL_PERMISSIONS, + LSP8_TOKENID_TYPES, LSP25_VERSION, ErrorSelectors, EventSigHashes, diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md b/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md index 53def3084..c8a5e8365 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md @@ -702,7 +702,8 @@ mapping(bytes32 => bytes) _store function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; ``` -Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue +The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed +once the identifiable digital asset contract has been deployed.
@@ -1319,7 +1320,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1338,7 +1339,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1357,7 +1358,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1376,7 +1377,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1395,7 +1396,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1420,7 +1421,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1446,7 +1447,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1472,7 +1473,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1501,7 +1502,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1526,7 +1527,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1551,7 +1552,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1562,6 +1563,25 @@ reverts when `operator` is already authorized for the `tokenId`.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1577,7 +1597,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md index 3b57aa369..20d2bab74 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md @@ -728,7 +728,8 @@ mapping(bytes32 => bytes) _store function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; ``` -Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue +The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed +once the identifiable digital asset contract has been deployed.
@@ -1345,7 +1346,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1364,7 +1365,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1383,7 +1384,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1402,7 +1403,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1421,7 +1422,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1446,7 +1447,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1472,7 +1473,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1498,7 +1499,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1527,7 +1528,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1552,7 +1553,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1577,7 +1578,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1588,6 +1589,25 @@ reverts when `operator` is already authorized for the `tokenId`.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1603,7 +1623,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md index a69370888..3881ae9a4 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md @@ -727,7 +727,8 @@ mapping(bytes32 => bytes) _store function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; ``` -Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue +The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed +once the identifiable digital asset contract has been deployed.
@@ -1329,7 +1330,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1348,7 +1349,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1367,7 +1368,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1428,7 +1429,7 @@ Reverts when setting `0` for the [`tokenSupplyCap`](#tokensupplycap). The max to error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1447,7 +1448,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1472,7 +1473,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1498,7 +1499,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1524,7 +1525,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1553,7 +1554,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1578,7 +1579,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1603,7 +1604,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1614,6 +1615,25 @@ reverts when `operator` is already authorized for the `tokenId`.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1629,7 +1649,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md index 85efdae38..2aa488239 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md @@ -1724,7 +1724,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1743,7 +1743,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1762,7 +1762,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1781,7 +1781,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1800,7 +1800,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1825,7 +1825,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1851,7 +1851,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1877,7 +1877,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1906,7 +1906,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1931,7 +1931,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1956,7 +1956,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1967,6 +1967,25 @@ reverts when `operator` is already authorized for the `tokenId`.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1982,7 +2001,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md index 46edaa81d..d75178a4e 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md @@ -733,7 +733,8 @@ mapping(bytes32 => bytes) _store function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; ``` -Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue +The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed +once the identifiable digital asset contract has been deployed.
@@ -1346,7 +1347,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1365,7 +1366,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1384,7 +1385,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1403,7 +1404,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1422,7 +1423,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1447,7 +1448,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1473,7 +1474,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1499,7 +1500,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1528,7 +1529,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1553,7 +1554,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1578,7 +1579,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1589,6 +1590,25 @@ reverts when `operator` is already authorized for the `tokenId`.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1604,7 +1624,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md index b495bd998..b7bc087b4 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md @@ -31,18 +31,24 @@ When marked as 'public', a method can be called both externally and internally, ::: ```solidity -constructor(string name_, string symbol_, address newOwner_); +constructor( + string name_, + string symbol_, + address newOwner_, + uint256 tokenIdType +); ``` _Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | -------------------------------- | -| `name_` | `string` | The name of the token. | -| `symbol_` | `string` | The symbol of the token. | -| `newOwner_` | `address` | The owner of the token contract. | +| Name | Type | Description | +| ------------- | :-------: | -------------------------------- | +| `name_` | `string` | The name of the token. | +| `symbol_` | `string` | The symbol of the token. | +| `newOwner_` | `address` | The owner of the token contract. | +| `tokenIdType` | `uint256` | - |
@@ -1764,7 +1770,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1783,7 +1789,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1802,7 +1808,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1821,7 +1827,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1840,7 +1846,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1865,7 +1871,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1891,7 +1897,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1917,7 +1923,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1946,7 +1952,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1971,7 +1977,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1996,7 +2002,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -2022,7 +2028,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenIdAlreadyMinted(bytes32 tokenId); ``` -reverts when `tokenId` has already been minted. +Reverts when `tokenId` has already been minted. #### Parameters @@ -2032,6 +2038,25 @@ reverts when `tokenId` has already been minted.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -2047,7 +2072,7 @@ reverts when `tokenId` has already been minted. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md index 1e54c36b0..43aa21a18 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md @@ -31,18 +31,24 @@ When marked as 'public', a method can be called both externally and internally, ::: ```solidity -constructor(string name_, string symbol_, address newOwner_); +constructor( + string name_, + string symbol_, + address newOwner_, + uint256 tokenIdType_ +); ``` _Deploying a `LSP8Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | -------------------------------- | -| `name_` | `string` | The name of the token. | -| `symbol_` | `string` | The symbol of the token. | -| `newOwner_` | `address` | The owner of the token contract. | +| Name | Type | Description | +| -------------- | :-------: | -------------------------------- | +| `name_` | `string` | The name of the token. | +| `symbol_` | `string` | The symbol of the token. | +| `newOwner_` | `address` | The owner of the token contract. | +| `tokenIdType_` | `uint256` | - |
@@ -760,7 +766,8 @@ mapping(bytes32 => bytes) _store function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; ``` -Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue +The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed +once the identifiable digital asset contract has been deployed.
@@ -1377,7 +1384,7 @@ Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital ass error LSP8CannotSendToAddressZero(); ``` -reverts when trying to send token to the zero address. +Reverts when trying to send token to the zero address.
@@ -1396,7 +1403,7 @@ reverts when trying to send token to the zero address. error LSP8CannotSendToSelf(); ``` -reverts when specifying the same address for `from` and `to` in a token transfer. +Reverts when specifying the same address for `from` and `to` in a token transfer.
@@ -1415,7 +1422,7 @@ reverts when specifying the same address for `from` and `to` in a token transfer error LSP8CannotUseAddressZeroAsOperator(); ``` -reverts when trying to set the zero address as an operator. +Reverts when trying to set the zero address as an operator.
@@ -1434,7 +1441,7 @@ reverts when trying to set the zero address as an operator. error LSP8InvalidTransferBatch(); ``` -reverts when the parameters used for `transferBatch` have different lengths. +Reverts when the parameters used for `transferBatch` have different lengths.
@@ -1453,7 +1460,7 @@ reverts when the parameters used for `transferBatch` have different lengths. error LSP8NonExistentTokenId(bytes32 tokenId); ``` -reverts when `tokenId` has not been minted. +Reverts when `tokenId` has not been minted. #### Parameters @@ -1478,7 +1485,7 @@ reverts when `tokenId` has not been minted. error LSP8NonExistingOperator(address operator, bytes32 tokenId); ``` -reverts when `operator` is not an operator for the `tokenId`. +Reverts when `operator` is not an operator for the `tokenId`. #### Parameters @@ -1504,7 +1511,7 @@ reverts when `operator` is not an operator for the `tokenId`. error LSP8NotTokenOperator(bytes32 tokenId, address caller); ``` -reverts when `caller` is not an allowed operator for `tokenId`. +Reverts when `caller` is not an allowed operator for `tokenId`. #### Parameters @@ -1530,7 +1537,7 @@ reverts when `caller` is not an allowed operator for `tokenId`. error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller); ``` -reverts when `caller` is not the `tokenOwner` of the `tokenId`. +Reverts when `caller` is not the `tokenOwner` of the `tokenId`. #### Parameters @@ -1559,7 +1566,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( ); ``` -reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1584,7 +1591,7 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); ``` -reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. +Reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. #### Parameters @@ -1609,7 +1616,7 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId); ``` -reverts when `operator` is already authorized for the `tokenId`. +Reverts when `operator` is already authorized for the `tokenId`. #### Parameters @@ -1635,7 +1642,7 @@ reverts when `operator` is already authorized for the `tokenId`. error LSP8TokenIdAlreadyMinted(bytes32 tokenId); ``` -reverts when `tokenId` has already been minted. +Reverts when `tokenId` has already been minted. #### Parameters @@ -1645,6 +1652,25 @@ reverts when `tokenId` has already been minted.
+### LSP8TokenIdTypeNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) +- Error signature: `LSP8TokenIdTypeNotEditable()` +- Error hash: `0x53bc1122` + +::: + +```solidity +error LSP8TokenIdTypeNotEditable(); +``` + +Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed. + +
+ ### LSP8TokenOwnerCannotBeOperator :::note References @@ -1660,7 +1686,7 @@ reverts when `tokenId` has already been minted. error LSP8TokenOwnerCannotBeOperator(); ``` -reverts when trying to authorize or revoke the token's owner as an operator. +Reverts when trying to authorize or revoke the token's owner as an operator.