@lukso/lsp-smart-contracts 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +10 -2
  2. package/artifacts/Create2Factory.json +2 -2
  3. package/artifacts/LSP0ERC725Account.json +68 -47
  4. package/artifacts/LSP0ERC725AccountInit.json +68 -47
  5. package/artifacts/LSP11BasicSocialRecovery.json +18 -2
  6. package/artifacts/LSP11BasicSocialRecoveryInit.json +18 -2
  7. package/artifacts/LSP16UniversalFactory.json +3 -3
  8. package/artifacts/LSP1UniversalReceiverDelegateUP.json +27 -46
  9. package/artifacts/LSP1UniversalReceiverDelegateVault.json +27 -46
  10. package/artifacts/LSP23LinkedContractsFactory.json +3 -3
  11. package/artifacts/LSP4DigitalAssetMetadata.json +16 -0
  12. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +16 -0
  13. package/artifacts/LSP6KeyManager.json +34 -6
  14. package/artifacts/LSP6KeyManagerInit.json +34 -6
  15. package/artifacts/LSP7CappedSupply.json +64 -4
  16. package/artifacts/LSP7CappedSupplyInitAbstract.json +64 -4
  17. package/artifacts/LSP7CompatibleERC20.json +83 -23
  18. package/artifacts/LSP7CompatibleERC20InitAbstract.json +83 -23
  19. package/artifacts/LSP7CompatibleERC20Mintable.json +86 -26
  20. package/artifacts/LSP7CompatibleERC20MintableInit.json +86 -26
  21. package/artifacts/LSP7DigitalAsset.json +64 -4
  22. package/artifacts/LSP7DigitalAssetInitAbstract.json +64 -4
  23. package/artifacts/LSP7Mintable.json +67 -7
  24. package/artifacts/LSP7MintableInit.json +67 -7
  25. package/artifacts/LSP8CappedSupply.json +57 -3
  26. package/artifacts/LSP8CappedSupplyInitAbstract.json +57 -3
  27. package/artifacts/LSP8CompatibleERC721.json +79 -25
  28. package/artifacts/LSP8CompatibleERC721InitAbstract.json +79 -25
  29. package/artifacts/LSP8CompatibleERC721Mintable.json +87 -28
  30. package/artifacts/LSP8CompatibleERC721MintableInit.json +87 -28
  31. package/artifacts/LSP8IdentifiableDigitalAsset.json +57 -3
  32. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +57 -3
  33. package/artifacts/LSP8Mintable.json +65 -6
  34. package/artifacts/LSP8MintableInit.json +65 -6
  35. package/artifacts/LSP9Vault.json +51 -35
  36. package/artifacts/LSP9VaultInit.json +51 -35
  37. package/artifacts/UniversalProfile.json +68 -47
  38. package/artifacts/UniversalProfileInit.json +68 -47
  39. package/contracts/Factories/Create2Factory.sol +1 -1
  40. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -22
  41. package/contracts/LSP0ERC725Account/LSP0Constants.sol +6 -1
  42. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
  43. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +196 -123
  44. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
  45. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
  46. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +5 -3
  47. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +54 -14
  48. package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +1 -1
  49. package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +1 -1
  50. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +2 -2
  51. package/contracts/LSP14Ownable2Step/LSP14Constants.sol +1 -1
  52. package/contracts/LSP14Ownable2Step/LSP14Errors.sol +9 -3
  53. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +16 -12
  54. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +65 -96
  55. package/contracts/LSP17ContractExtension/LSP17Errors.sol +1 -1
  56. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +22 -15
  57. package/contracts/LSP17ContractExtension/LSP17Extension.sol +6 -5
  58. package/contracts/LSP17Extensions/Extension4337.sol +101 -0
  59. package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +15 -0
  60. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +1 -2
  61. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +24 -0
  62. package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -0
  63. package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +0 -6
  64. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +49 -33
  65. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +33 -27
  66. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +5 -48
  67. package/contracts/LSP20CallVerification/ILSP20CallVerifier.sol +13 -9
  68. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +64 -45
  69. package/contracts/LSP20CallVerification/LSP20Constants.sol +6 -6
  70. package/contracts/LSP20CallVerification/LSP20Errors.sol +10 -4
  71. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/ILSP23LinkedContractsFactory.sol +1 -1
  72. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/IPostDeploymentModule.sol +1 -1
  73. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23Errors.sol +1 -1
  74. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23LinkedContractsFactory.sol +5 -1
  75. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfileInitPostDeploymentModule.sol +1 -1
  76. package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfilePostDeploymentModule.sol +1 -1
  77. package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +1 -1
  78. package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +8 -3
  79. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +1 -97
  80. package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -1
  81. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
  82. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +8 -3
  83. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +8 -3
  84. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +4 -3
  85. package/contracts/LSP6KeyManager/LSP6Constants.sol +4 -3
  86. package/contracts/LSP6KeyManager/LSP6Errors.sol +2 -23
  87. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +0 -1
  88. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +176 -101
  89. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
  90. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +1 -2
  91. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol +27 -0
  92. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +34 -28
  93. package/contracts/LSP6KeyManager/LSP6Utils.sol +29 -2
  94. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +70 -10
  95. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +2 -2
  96. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +29 -13
  97. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +273 -265
  98. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +28 -12
  99. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +17 -3
  100. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
  101. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +4 -1
  102. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +7 -7
  103. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +3 -3
  104. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +128 -54
  105. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +129 -54
  106. package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
  107. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -4
  108. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +2 -2
  109. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +4 -4
  110. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +4 -4
  111. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +1 -1
  112. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -4
  113. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +16 -11
  114. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +20 -6
  115. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +32 -16
  116. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +67 -16
  117. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +143 -137
  118. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +69 -15
  119. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
  120. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +1 -1
  121. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +7 -7
  122. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +3 -3
  123. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +172 -80
  124. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +178 -91
  125. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +7 -7
  126. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +7 -7
  127. package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
  128. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +8 -7
  129. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +5 -3
  130. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +13 -7
  131. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +9 -8
  132. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +9 -3
  133. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +10 -8
  134. package/contracts/LSP9Vault/ILSP9Vault.sol +0 -21
  135. package/contracts/LSP9Vault/LSP9Constants.sol +6 -1
  136. package/contracts/LSP9Vault/LSP9Errors.sol +1 -1
  137. package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
  138. package/contracts/LSP9Vault/LSP9VaultCore.sol +119 -66
  139. package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -1
  140. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
  141. package/contracts/UniversalProfile.sol +1 -1
  142. package/contracts/UniversalProfileInit.sol +1 -1
  143. package/contracts/UniversalProfileInitAbstract.sol +1 -1
  144. package/contracts/Version.sol +16 -0
  145. package/devdocs/LSP0ERC725Account.json +86 -52
  146. package/devdocs/LSP0ERC725AccountInit.json +86 -52
  147. package/devdocs/LSP11BasicSocialRecovery.json +13 -0
  148. package/devdocs/LSP11BasicSocialRecoveryInit.json +13 -0
  149. package/devdocs/LSP16UniversalFactory.json +9 -9
  150. package/devdocs/LSP1UniversalReceiverDelegateUP.json +7 -6
  151. package/devdocs/LSP1UniversalReceiverDelegateVault.json +7 -6
  152. package/devdocs/LSP4DigitalAssetMetadata.json +32 -10
  153. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +32 -10
  154. package/devdocs/LSP6KeyManager.json +27 -13
  155. package/devdocs/LSP6KeyManagerInit.json +27 -13
  156. package/devdocs/LSP7CappedSupply.json +61 -28
  157. package/devdocs/LSP7CappedSupplyInitAbstract.json +61 -28
  158. package/devdocs/LSP7CompatibleERC20.json +102 -32
  159. package/devdocs/LSP7CompatibleERC20InitAbstract.json +102 -32
  160. package/devdocs/LSP7CompatibleERC20Mintable.json +102 -32
  161. package/devdocs/LSP7CompatibleERC20MintableInit.json +102 -32
  162. package/devdocs/LSP7DigitalAsset.json +61 -28
  163. package/devdocs/LSP7DigitalAssetInitAbstract.json +61 -28
  164. package/devdocs/LSP7Mintable.json +61 -28
  165. package/devdocs/LSP7MintableInit.json +61 -28
  166. package/devdocs/LSP8CappedSupply.json +66 -27
  167. package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -27
  168. package/devdocs/LSP8CompatibleERC721.json +93 -33
  169. package/devdocs/LSP8CompatibleERC721InitAbstract.json +93 -33
  170. package/devdocs/LSP8CompatibleERC721Mintable.json +95 -35
  171. package/devdocs/LSP8CompatibleERC721MintableInit.json +96 -36
  172. package/devdocs/LSP8IdentifiableDigitalAsset.json +70 -28
  173. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -27
  174. package/devdocs/LSP8Mintable.json +68 -29
  175. package/devdocs/LSP8MintableInit.json +69 -30
  176. package/devdocs/LSP9Vault.json +69 -41
  177. package/devdocs/LSP9VaultInit.json +69 -41
  178. package/devdocs/UniversalProfile.json +86 -52
  179. package/devdocs/UniversalProfileInit.json +86 -52
  180. package/dist/constants.cjs.js +5565 -2846
  181. package/dist/constants.d.ts +3996 -1182
  182. package/dist/constants.es.js +5564 -2846
  183. package/package.json +8 -8
  184. package/userdocs/LSP0ERC725Account.json +20 -11
  185. package/userdocs/LSP0ERC725AccountInit.json +20 -11
  186. package/userdocs/LSP16UniversalFactory.json +26 -1
  187. package/userdocs/LSP1UniversalReceiverDelegateUP.json +4 -11
  188. package/userdocs/LSP1UniversalReceiverDelegateVault.json +4 -11
  189. package/userdocs/LSP4DigitalAssetMetadata.json +7 -4
  190. package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -4
  191. package/userdocs/LSP6KeyManager.json +3 -5
  192. package/userdocs/LSP6KeyManagerInit.json +3 -5
  193. package/userdocs/LSP7CappedSupply.json +17 -6
  194. package/userdocs/LSP7CappedSupplyInitAbstract.json +16 -5
  195. package/userdocs/LSP7CompatibleERC20.json +18 -5
  196. package/userdocs/LSP7CompatibleERC20InitAbstract.json +18 -5
  197. package/userdocs/LSP7CompatibleERC20Mintable.json +18 -5
  198. package/userdocs/LSP7CompatibleERC20MintableInit.json +18 -5
  199. package/userdocs/LSP7DigitalAsset.json +18 -5
  200. package/userdocs/LSP7DigitalAssetInitAbstract.json +18 -5
  201. package/userdocs/LSP7Mintable.json +18 -5
  202. package/userdocs/LSP7MintableInit.json +18 -5
  203. package/userdocs/LSP8CappedSupply.json +16 -5
  204. package/userdocs/LSP8CappedSupplyInitAbstract.json +15 -4
  205. package/userdocs/LSP8CompatibleERC721.json +30 -17
  206. package/userdocs/LSP8CompatibleERC721InitAbstract.json +30 -17
  207. package/userdocs/LSP8CompatibleERC721Mintable.json +31 -18
  208. package/userdocs/LSP8CompatibleERC721MintableInit.json +32 -19
  209. package/userdocs/LSP8IdentifiableDigitalAsset.json +18 -5
  210. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +17 -4
  211. package/userdocs/LSP8Mintable.json +18 -5
  212. package/userdocs/LSP8MintableInit.json +19 -6
  213. package/userdocs/LSP9Vault.json +23 -14
  214. package/userdocs/LSP9VaultInit.json +23 -14
  215. package/userdocs/UniversalProfile.json +20 -11
  216. package/userdocs/UniversalProfileInit.json +20 -11
  217. package/CONTRIBUTING.md +0 -184
  218. package/artifacts/LSP4Compatibility.json +0 -216
  219. package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +0 -25
  220. package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +0 -38
  221. package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +0 -83
  222. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +0 -175
  223. package/devdocs/LSP4Compatibility.json +0 -79
  224. package/userdocs/LSP4Compatibility.json +0 -20
@@ -1,27 +1,29 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.12;
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.7;
3
3
 
4
4
  // interfaces
5
- import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
6
- import {ILSP7CompatibleERC20} from "./ILSP7CompatibleERC20.sol";
5
+ import {
6
+ IERC20Metadata,
7
+ IERC20
8
+ } from "@openzeppelin/contracts/interfaces/IERC20Metadata.sol";
7
9
 
8
10
  // modules
9
- import {
10
- LSP4Compatibility
11
- } from "../../LSP4DigitalAssetMetadata/LSP4Compatibility.sol";
12
11
  import {
13
12
  LSP7DigitalAssetCore,
14
- LSP7DigitalAssetInitAbstract,
15
- LSP4DigitalAssetMetadataInitAbstract,
16
- ERC725YCore
13
+ LSP7DigitalAssetInitAbstract
17
14
  } from "../LSP7DigitalAssetInitAbstract.sol";
18
15
 
16
+ // constants
17
+ import {
18
+ _LSP4_TOKEN_NAME_KEY,
19
+ _LSP4_TOKEN_SYMBOL_KEY
20
+ } from "../../LSP4DigitalAssetMetadata/LSP4Constants.sol";
21
+
19
22
  /**
20
23
  * @dev LSP7 extension, for compatibility for clients / tools that expect ERC20.
21
24
  */
22
25
  abstract contract LSP7CompatibleERC20InitAbstract is
23
- ILSP7CompatibleERC20,
24
- LSP4Compatibility,
26
+ IERC20Metadata,
25
27
  LSP7DigitalAssetInitAbstract
26
28
  {
27
29
  /**
@@ -46,45 +48,130 @@ abstract contract LSP7CompatibleERC20InitAbstract is
46
48
  }
47
49
 
48
50
  /**
49
- * @inheritdoc LSP7DigitalAssetInitAbstract
51
+ * @inheritdoc IERC20Metadata
52
+ * @dev Returns the name of the token.
53
+ * For compatibility with clients & tools that expect ERC20.
54
+ *
55
+ * @return The name of the token
50
56
  */
51
- function supportsInterface(
52
- bytes4 interfaceId
57
+ function name() public view virtual override returns (string memory) {
58
+ bytes memory data = _getData(_LSP4_TOKEN_NAME_KEY);
59
+ return string(data);
60
+ }
61
+
62
+ /**
63
+ * @inheritdoc IERC20Metadata
64
+ * @dev Returns the symbol of the token, usually a shorter version of the name.
65
+ * For compatibility with clients & tools that expect ERC20.
66
+ *
67
+ * @return The symbol of the token
68
+ */
69
+ function symbol() public view virtual override returns (string memory) {
70
+ bytes memory data = _getData(_LSP4_TOKEN_SYMBOL_KEY);
71
+ return string(data);
72
+ }
73
+
74
+ /**
75
+ * @inheritdoc LSP7DigitalAssetCore
76
+ */
77
+ function decimals()
78
+ public
79
+ view
80
+ virtual
81
+ override(IERC20Metadata, LSP7DigitalAssetCore)
82
+ returns (uint8)
83
+ {
84
+ return super.decimals();
85
+ }
86
+
87
+ /**
88
+ * @inheritdoc LSP7DigitalAssetCore
89
+ */
90
+ function totalSupply()
91
+ public
92
+ view
93
+ virtual
94
+ override(IERC20, LSP7DigitalAssetCore)
95
+ returns (uint256)
96
+ {
97
+ return super.totalSupply();
98
+ }
99
+
100
+ /**
101
+ * @inheritdoc LSP7DigitalAssetCore
102
+ */
103
+ function balanceOf(
104
+ address tokenOwner
53
105
  )
54
106
  public
55
107
  view
56
108
  virtual
57
- override(IERC165, ERC725YCore, LSP7DigitalAssetInitAbstract)
58
- returns (bool)
109
+ override(IERC20, LSP7DigitalAssetCore)
110
+ returns (uint256)
59
111
  {
60
- return super.supportsInterface(interfaceId);
112
+ return super.balanceOf(tokenOwner);
113
+ }
114
+
115
+ /**
116
+ * @inheritdoc LSP7DigitalAssetInitAbstract
117
+ */
118
+ function supportsInterface(
119
+ bytes4 interfaceId
120
+ ) public view virtual override returns (bool) {
121
+ return
122
+ interfaceId == type(IERC20).interfaceId ||
123
+ interfaceId == type(IERC20Metadata).interfaceId ||
124
+ super.supportsInterface(interfaceId);
61
125
  }
62
126
 
63
127
  /**
64
- * @inheritdoc ILSP7CompatibleERC20
128
+ * @inheritdoc IERC20
129
+ * @dev Function to get operator allowance allowed to spend on behalf of `tokenOwner` from the ERC20 standard interface.
130
+ *
131
+ * @param tokenOwner The address of the token owner
132
+ * @param operator The address approved by the `tokenOwner`
133
+ *
134
+ * @return The amount `operator` is approved by `tokenOwner`
65
135
  */
66
136
  function allowance(
67
137
  address tokenOwner,
68
138
  address operator
69
- ) public view virtual returns (uint256) {
139
+ ) public view virtual override returns (uint256) {
70
140
  return authorizedAmountFor(operator, tokenOwner);
71
141
  }
72
142
 
73
143
  /**
74
- * @inheritdoc ILSP7CompatibleERC20
144
+ * @inheritdoc IERC20
145
+ * @dev Approval function from th ERC20 standard interface.
146
+ *
147
+ * @param operator The address to approve for `amount`
148
+ * @param amount The amount to approve.
149
+ *
150
+ * @return `true` on successful approval.
75
151
  */
76
152
  function approve(
77
153
  address operator,
78
154
  uint256 amount
79
155
  ) public virtual returns (bool) {
80
- authorizeOperator(operator, amount, "");
156
+ if (amount != 0) {
157
+ authorizeOperator(operator, amount, "");
158
+ } else {
159
+ revokeOperator(operator, false, "");
160
+ }
81
161
  return true;
82
162
  }
83
163
 
84
164
  /**
85
- * @inheritdoc ILSP7CompatibleERC20
165
+ * @inheritdoc IERC20
166
+ * @dev Transfer functions for operators from the ERC20 standard interface.
167
+ *
168
+ * @param from The address sending tokens.
169
+ * @param to The address receiving tokens.
170
+ * @param amount The amount of tokens to transfer.
86
171
  *
87
- * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens.
172
+ * @return `true` on successful transfer.
173
+ *
174
+ * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens.
88
175
  */
89
176
  function transferFrom(
90
177
  address from,
@@ -98,9 +185,15 @@ abstract contract LSP7CompatibleERC20InitAbstract is
98
185
  // --- Overrides
99
186
 
100
187
  /**
101
- * @inheritdoc ILSP7CompatibleERC20
188
+ * @inheritdoc IERC20
189
+ * @dev Transfer function from the ERC20 standard interface.
190
+ *
191
+ * @param to The address receiving tokens.
192
+ * @param amount The amount of tokens to transfer.
102
193
  *
103
- * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens.
194
+ * @return `true` on successful transfer.
195
+ *
196
+ * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens.
104
197
  */
105
198
  function transfer(
106
199
  address to,
@@ -117,20 +210,20 @@ abstract contract LSP7CompatibleERC20InitAbstract is
117
210
  address tokenOwner,
118
211
  address operator,
119
212
  uint256 amount,
213
+ bool notified,
120
214
  bytes memory operatorNotificationData
121
215
  ) internal virtual override {
122
216
  super._updateOperator(
123
217
  tokenOwner,
124
218
  operator,
125
219
  amount,
220
+ notified,
126
221
  operatorNotificationData
127
222
  );
128
- emit Approval(tokenOwner, operator, amount);
223
+ emit IERC20.Approval(tokenOwner, operator, amount);
129
224
  }
130
225
 
131
226
  /**
132
- * @inheritdoc LSP7DigitalAssetCore
133
- *
134
227
  * @custom:events
135
228
  * - LSP7 {Transfer} event.
136
229
  * - ERC20 {Transfer} event.
@@ -139,16 +232,14 @@ abstract contract LSP7CompatibleERC20InitAbstract is
139
232
  address from,
140
233
  address to,
141
234
  uint256 amount,
142
- bool allowNonLSP1Recipient,
235
+ bool force,
143
236
  bytes memory data
144
237
  ) internal virtual override {
145
- emit Transfer(from, to, amount);
146
- super._transfer(from, to, amount, allowNonLSP1Recipient, data);
238
+ emit IERC20.Transfer(from, to, amount);
239
+ super._transfer(from, to, amount, force, data);
147
240
  }
148
241
 
149
242
  /**
150
- * @inheritdoc LSP7DigitalAssetCore
151
- *
152
243
  * @custom:events
153
244
  * - LSP7 {Transfer} event with `address(0)` as `from`.
154
245
  * - ERC20 {Transfer} event with `address(0)` as `from`.
@@ -156,16 +247,14 @@ abstract contract LSP7CompatibleERC20InitAbstract is
156
247
  function _mint(
157
248
  address to,
158
249
  uint256 amount,
159
- bool allowNonLSP1Recipient,
250
+ bool force,
160
251
  bytes memory data
161
252
  ) internal virtual override {
162
- emit Transfer(address(0), to, amount);
163
- super._mint(to, amount, allowNonLSP1Recipient, data);
253
+ emit IERC20.Transfer(address(0), to, amount);
254
+ super._mint(to, amount, force, data);
164
255
  }
165
256
 
166
257
  /**
167
- * @inheritdoc LSP7DigitalAssetCore
168
- *
169
258
  * @custom:events
170
259
  * - LSP7 {Transfer} event with `address(0)` as the `to` address.
171
260
  * - ERC20 {Transfer} event with `address(0)` as the `to` address.
@@ -175,21 +264,7 @@ abstract contract LSP7CompatibleERC20InitAbstract is
175
264
  uint256 amount,
176
265
  bytes memory data
177
266
  ) internal virtual override {
178
- emit Transfer(from, address(0), amount);
267
+ emit IERC20.Transfer(from, address(0), amount);
179
268
  super._burn(from, amount, data);
180
269
  }
181
-
182
- /**
183
- * @inheritdoc LSP4DigitalAssetMetadataInitAbstract
184
- */
185
- function _setData(
186
- bytes32 key,
187
- bytes memory value
188
- )
189
- internal
190
- virtual
191
- override(LSP4DigitalAssetMetadataInitAbstract, ERC725YCore)
192
- {
193
- super._setData(key, value);
194
- }
195
270
  }
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: MIT
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  pragma solidity ^0.8.4;
4
4
 
@@ -12,7 +12,7 @@ interface ILSP7Mintable is ILSP7DigitalAsset {
12
12
  /**
13
13
  * @param to The address to mint tokens
14
14
  * @param amount The amount to mint
15
- * @param allowNonLSP1Recipient When set to TRUE, to may be any address but
15
+ * @param force When set to TRUE, to may be any address but
16
16
  * when set to FALSE to must be a contract that supports LSP1 UniversalReceiver
17
17
  * @param data Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.
18
18
  * @dev Mints `amount` tokens and transfers it to `to`.
@@ -26,7 +26,7 @@ interface ILSP7Mintable is ILSP7DigitalAsset {
26
26
  function mint(
27
27
  address to,
28
28
  uint256 amount,
29
- bool allowNonLSP1Recipient,
29
+ bool force,
30
30
  bytes memory data
31
31
  ) external;
32
32
  }
@@ -1,5 +1,5 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.12;
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.7;
3
3
 
4
4
  import {LSP7CompatibleERC20} from "../extensions/LSP7CompatibleERC20.sol";
5
5
 
@@ -27,9 +27,9 @@ contract LSP7CompatibleERC20Mintable is LSP7CompatibleERC20 {
27
27
  function mint(
28
28
  address to,
29
29
  uint256 amount,
30
- bool allowNonLSP1Recipient,
30
+ bool force,
31
31
  bytes memory data
32
32
  ) public virtual onlyOwner {
33
- _mint(to, amount, allowNonLSP1Recipient, data);
33
+ _mint(to, amount, force, data);
34
34
  }
35
35
  }
@@ -1,5 +1,5 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.12;
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.7;
3
3
 
4
4
  // modules
5
5
  import {
@@ -1,5 +1,5 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.12;
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.7;
3
3
 
4
4
  // modules
5
5
  import {
@@ -29,9 +29,9 @@ abstract contract LSP7CompatibleERC20MintableInitAbstract is
29
29
  function mint(
30
30
  address to,
31
31
  uint256 amount,
32
- bool allowNonLSP1Recipient,
32
+ bool force,
33
33
  bytes memory data
34
34
  ) public virtual onlyOwner {
35
- _mint(to, amount, allowNonLSP1Recipient, data);
35
+ _mint(to, amount, force, data);
36
36
  }
37
37
  }
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: MIT
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  pragma solidity ^0.8.4;
4
4
 
@@ -34,9 +34,9 @@ contract LSP7Mintable is LSP7DigitalAsset, ILSP7Mintable {
34
34
  function mint(
35
35
  address to,
36
36
  uint256 amount,
37
- bool allowNonLSP1Recipient,
37
+ bool force,
38
38
  bytes memory data
39
- ) public virtual onlyOwner {
40
- _mint(to, amount, allowNonLSP1Recipient, data);
39
+ ) public virtual override onlyOwner {
40
+ _mint(to, amount, force, data);
41
41
  }
42
42
  }
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: MIT
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  pragma solidity ^0.8.4;
4
4
 
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: MIT
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  pragma solidity ^0.8.4;
4
4
 
@@ -45,9 +45,9 @@ abstract contract LSP7MintableInitAbstract is
45
45
  function mint(
46
46
  address to,
47
47
  uint256 amount,
48
- bool allowNonLSP1Recipient,
48
+ bool force,
49
49
  bytes memory data
50
- ) public virtual onlyOwner {
51
- _mint(to, amount, allowNonLSP1Recipient, data);
50
+ ) public virtual override onlyOwner {
51
+ _mint(to, amount, force, data);
52
52
  }
53
53
  }
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: MIT
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  pragma solidity ^0.8.4;
4
4
 
@@ -20,7 +20,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
20
20
  * @param from The previous owner of the `tokenId`
21
21
  * @param to The new owner of `tokenId`
22
22
  * @param tokenId The tokenId that was transferred
23
- * @param allowNonLSP1Recipient If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not.
23
+ * @param force If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not.
24
24
  * @param data Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses.
25
25
  */
26
26
  event Transfer(
@@ -28,7 +28,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
28
28
  address indexed from,
29
29
  address indexed to,
30
30
  bytes32 indexed tokenId,
31
- bool allowNonLSP1Recipient,
31
+ bool force,
32
32
  bytes data
33
33
  );
34
34
 
@@ -51,12 +51,14 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
51
51
  * @param operator The address revoked from the operator array ({getOperatorsOf}).
52
52
  * @param tokenOwner The owner of the `tokenId`.
53
53
  * @param tokenId The tokenId `operator` is revoked from operating on.
54
+ * @param notified Bool indicating whether the operator has been notified or not
54
55
  * @param operatorNotificationData The data to notify the operator about via LSP1.
55
56
  */
56
57
  event RevokedOperator(
57
58
  address indexed operator,
58
59
  address indexed tokenOwner,
59
60
  bytes32 indexed tokenId,
61
+ bool notified,
60
62
  bytes operatorNotificationData
61
63
  );
62
64
 
@@ -102,6 +104,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
102
104
 
103
105
  /**
104
106
  * @dev Allow an `operator` address to transfer or burn a specific `tokenId` on behalf of its token owner. See {isOperatorFor}.
107
+ * Notify the operator based on the LSP1-UniversalReceiver standard
105
108
  *
106
109
  * @param operator The address to authorize as an operator.
107
110
  * @param tokenId The token ID operator has access to.
@@ -127,6 +130,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
127
130
  *
128
131
  * @param operator The address to revoke as an operator.
129
132
  * @param tokenId The tokenId `operator` is revoked from operating on.
133
+ * @param notify Boolean indicating whether to notify the operator or not
130
134
  * @param operatorNotificationData The data to notify the operator about via LSP1.
131
135
  *
132
136
  * @custom:requirements
@@ -140,6 +144,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
140
144
  function revokeOperator(
141
145
  address operator,
142
146
  bytes32 tokenId,
147
+ bool notify,
143
148
  bytes memory operatorNotificationData
144
149
  ) external;
145
150
 
@@ -182,13 +187,13 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
182
187
  *
183
188
  * If operators are set for a specific `tokenId`, all the operators are revoked after the tokenId have been transferred.
184
189
  *
185
- * The `allowNonLSP1Recipient` parameter MUST be set to `true` when transferring tokens to Externally Owned Accounts (EOAs)
190
+ * The `force` parameter MUST be set to `true` when transferring tokens to Externally Owned Accounts (EOAs)
186
191
  * or contracts that do not implement the LSP1 standard.
187
192
  *
188
193
  * @param from The address that owns the given `tokenId`.
189
194
  * @param to The address that will receive the `tokenId`.
190
195
  * @param tokenId The token ID to transfer.
191
- * @param allowNonLSP1Recipient When set to `true`, the `to` address CAN be any addres.
196
+ * @param force When set to `true`, the `to` address CAN be any addres.
192
197
  * When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard.
193
198
  * @param data Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses.
194
199
  *
@@ -202,19 +207,19 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
202
207
  * @custom:events
203
208
  * - {Transfer} event when the `tokenId` is successfully transferred.
204
209
  *
205
- * @custom:hint The `allowNonLSP1Recipient` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs)
210
+ * @custom:hint The `force` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs)
206
211
  * or contracts that do not implement the LSP1 Universal Receiver Standard. Otherwise the function will revert making the transfer fail.
207
212
  *
208
- * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `allowNonLSP1Recipient` is set to `true` or `false`.
213
+ * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `force` is set to `true` or `false`.
209
214
  *
210
215
  * @custom:warning Be aware that when either the sender or the recipient can have logic that revert in their `universalReceiver(...)` function when being notified.
211
- * This even if the `allowNonLSP1Recipient` was set to `true`.
216
+ * This even if the `force` was set to `true`.
212
217
  */
213
218
  function transfer(
214
219
  address from,
215
220
  address to,
216
221
  bytes32 tokenId,
217
- bool allowNonLSP1Recipient,
222
+ bool force,
218
223
  bytes memory data
219
224
  ) external;
220
225
 
@@ -225,7 +230,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
225
230
  * @param from An array of sending addresses.
226
231
  * @param to An array of recipient addresses.
227
232
  * @param tokenId An array of token IDs to transfer.
228
- * @param allowNonLSP1Recipient When set to `true`, `to` may be any address.
233
+ * @param force When set to `true`, `to` may be any address.
229
234
  * When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert.
230
235
  * @param data Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses.
231
236
  *
@@ -245,7 +250,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y {
245
250
  address[] memory from,
246
251
  address[] memory to,
247
252
  bytes32[] memory tokenId,
248
- bool[] memory allowNonLSP1Recipient,
253
+ bool[] memory force,
249
254
  bytes[] memory data
250
255
  ) external;
251
256
  }
@@ -1,16 +1,22 @@
1
- // SPDX-License-Identifier: CC0-1.0
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.4;
3
3
 
4
4
  // --- ERC165 interface ids
5
- bytes4 constant _INTERFACEID_LSP8 = 0x1ae9ba1f;
5
+ bytes4 constant _INTERFACEID_LSP8 = 0x30dc5278;
6
6
 
7
7
  // --- ERC725Y Data Keys
8
8
 
9
- // bytes10(keccak256('LSP8MetadataAddress')) + bytes2(0)
10
- bytes12 constant _LSP8_METADATA_ADDRESS_KEY_PREFIX = 0x73dcc7c3c4096cdc7f8a0000;
9
+ // keccak256('LSP8TokenIdType')
10
+ bytes32 constant _LSP8_TOKENID_TYPE_KEY = 0x715f248956de7ce65e94d9d836bfead479f7e70d69b718d47bfe7b00e05b4fe4;
11
11
 
12
- // bytes10(keccak256('LSP8MetadataJSON')) + bytes2(0)
13
- bytes12 constant _LSP8_METADATA_JSON_KEY_PREFIX = 0x9a26b4060ae7f7d5e3cd0000;
12
+ // bytes10(keccak256('LSP8MetadataTokenURI')) + bytes2(0)
13
+ bytes12 constant _LSP8_METADATA_TOKEN_URI_PREFIX = 0x1339e76a390b7b9ec9010000;
14
+
15
+ // keccak256('LSP8TokenMetadataBaseURI')
16
+ bytes32 constant _LSP8_TOKEN_METADATA_BASE_URI = 0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843;
17
+
18
+ // keccak256('LSP8ReferenceContract')
19
+ bytes32 constant _LSP8_REFERENCE_CONTRACT = 0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6;
14
20
 
15
21
  // --- Token Hooks
16
22
 
@@ -22,3 +28,11 @@ bytes32 constant _TYPEID_LSP8_TOKENSRECIPIENT = 0x0b084a55ebf70fd3c06fd755269dac
22
28
 
23
29
  // keccak256('LSP8Tokens_OperatorNotification')
24
30
  bytes32 constant _TYPEID_LSP8_TOKENOPERATOR = 0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970;
31
+
32
+ // --- Types of token IDs
33
+
34
+ uint256 constant _LSP8_TOKENID_TYPE_NUMBER = 0;
35
+ uint256 constant _LSP8_TOKENID_TYPE_STRING = 1;
36
+ uint256 constant _LSP8_TOKENID_TYPE_UNIQUE_ID = 2;
37
+ uint256 constant _LSP8_TOKENID_TYPE_HASH = 3;
38
+ uint256 constant _LSP8_TOKENID_TYPE_ADDRESS = 4;
@@ -1,73 +1,89 @@
1
- // SPDX-License-Identifier: CC0-1.0
1
+ // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.4;
3
3
 
4
4
  // --- Errors
5
5
 
6
6
  /**
7
- * @dev reverts when `tokenId` has not been minted.
7
+ * @dev Reverts when `tokenId` has not been minted.
8
8
  */
9
9
  error LSP8NonExistentTokenId(bytes32 tokenId);
10
10
 
11
11
  /**
12
- * @dev reverts when `caller` is not the `tokenOwner` of the `tokenId`.
12
+ * @dev Reverts when `caller` is not the `tokenOwner` of the `tokenId`.
13
13
  */
14
14
  error LSP8NotTokenOwner(address tokenOwner, bytes32 tokenId, address caller);
15
15
 
16
16
  /**
17
- * @dev reverts when `caller` is not an allowed operator for `tokenId`.
17
+ * @dev Reverts when `caller` is not an allowed operator for `tokenId`.
18
18
  */
19
19
  error LSP8NotTokenOperator(bytes32 tokenId, address caller);
20
20
 
21
21
  /**
22
- * @dev reverts when `operator` is already authorized for the `tokenId`.
22
+ * @dev Reverts when `operator` is already authorized for the `tokenId`.
23
23
  */
24
24
  error LSP8OperatorAlreadyAuthorized(address operator, bytes32 tokenId);
25
25
 
26
26
  /**
27
- * @dev reverts when trying to set the zero address as an operator.
27
+ * @dev Reverts when trying to set the zero address as an operator.
28
28
  */
29
29
  error LSP8CannotUseAddressZeroAsOperator();
30
30
 
31
31
  /**
32
- * @dev reverts when trying to send token to the zero address.
32
+ * @dev Reverts when trying to send token to the zero address.
33
33
  */
34
34
  error LSP8CannotSendToAddressZero();
35
35
 
36
36
  /**
37
- * @dev reverts when specifying the same address for `from` and `to` in a token transfer.
37
+ * @dev Reverts when specifying the same address for `from` and `to` in a token transfer.
38
38
  */
39
39
  error LSP8CannotSendToSelf();
40
40
 
41
41
  /**
42
- * @dev reverts when `operator` is not an operator for the `tokenId`.
42
+ * @dev Reverts when `operator` is not an operator for the `tokenId`.
43
43
  */
44
44
  error LSP8NonExistingOperator(address operator, bytes32 tokenId);
45
45
 
46
46
  /**
47
- * @dev reverts when `tokenId` has already been minted.
47
+ * @dev Reverts when `tokenId` has already been minted.
48
48
  */
49
49
  error LSP8TokenIdAlreadyMinted(bytes32 tokenId);
50
50
 
51
51
  /**
52
- * @dev reverts when the parameters used for `transferBatch` have different lengths.
52
+ * @dev Reverts when the parameters used for `transferBatch` have different lengths.
53
53
  */
54
54
  error LSP8InvalidTransferBatch();
55
55
 
56
56
  /**
57
- * @dev reverts if the `tokenReceiver` does not implement LSP1
58
- * when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`.
57
+ * @dev Reverts if the `tokenReceiver` does not implement LSP1
58
+ * when minting or transferring tokens with `bool force` set as `false`.
59
59
  */
60
60
  error LSP8NotifyTokenReceiverContractMissingLSP1Interface(
61
61
  address tokenReceiver
62
62
  );
63
63
 
64
64
  /**
65
- * @dev reverts if the `tokenReceiver` is an EOA
66
- * when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`.
65
+ * @dev Reverts if the `tokenReceiver` is an EOA
66
+ * when minting or transferring tokens with `bool force` set as `false`.
67
67
  */
68
68
  error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver);
69
69
 
70
70
  /**
71
- * @dev reverts when trying to authorize or revoke the token's owner as an operator.
71
+ * @dev Reverts when trying to authorize or revoke the token's owner as an operator.
72
72
  */
73
73
  error LSP8TokenOwnerCannotBeOperator();
74
+
75
+ /**
76
+ * @dev Error occurs when sending native tokens to the LSP8 contract without sending any data.
77
+ *
78
+ * E.g. Sending value without passing a bytes4 function selector to call a LSP17 Extension.
79
+ *
80
+ * @notice LSP8 contract cannot receive native tokens.
81
+ */
82
+ error LSP8TokenContractCannotHoldValue();
83
+
84
+ /**
85
+ * @dev Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed.
86
+ * The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract.
87
+ * It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
88
+ */
89
+ error LSP8TokenIdTypeNotEditable();