@lukso/lsp-smart-contracts 0.12.1 → 0.14.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 (131) hide show
  1. package/README.md +3 -2
  2. package/artifacts/LSP0ERC725Account.json +6 -6
  3. package/artifacts/LSP0ERC725AccountInit.json +6 -6
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateUP.json +2 -2
  7. package/artifacts/LSP1UniversalReceiverDelegateVault.json +2 -2
  8. package/artifacts/LSP4DigitalAssetMetadata.json +5 -0
  9. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +5 -0
  10. package/artifacts/LSP6KeyManager.json +2 -2
  11. package/artifacts/LSP6KeyManagerInit.json +2 -2
  12. package/artifacts/LSP7CappedSupply.json +71 -36
  13. package/artifacts/LSP7CappedSupplyInitAbstract.json +71 -36
  14. package/artifacts/LSP7CompatibleERC20.json +71 -36
  15. package/artifacts/LSP7CompatibleERC20InitAbstract.json +71 -36
  16. package/artifacts/LSP7CompatibleERC20Mintable.json +78 -38
  17. package/artifacts/LSP7CompatibleERC20MintableInit.json +78 -38
  18. package/artifacts/LSP7DigitalAsset.json +71 -36
  19. package/artifacts/LSP7DigitalAssetInitAbstract.json +71 -36
  20. package/artifacts/LSP7Mintable.json +78 -38
  21. package/artifacts/LSP7MintableInit.json +78 -38
  22. package/artifacts/LSP8CappedSupply.json +187 -23
  23. package/artifacts/LSP8CappedSupplyInitAbstract.json +200 -36
  24. package/artifacts/LSP8CompatibleERC721.json +187 -23
  25. package/artifacts/LSP8CompatibleERC721InitAbstract.json +200 -36
  26. package/artifacts/LSP8CompatibleERC721Mintable.json +195 -26
  27. package/artifacts/LSP8CompatibleERC721MintableInit.json +208 -39
  28. package/artifacts/LSP8IdentifiableDigitalAsset.json +187 -23
  29. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +200 -36
  30. package/artifacts/LSP8Mintable.json +195 -26
  31. package/artifacts/LSP8MintableInit.json +208 -39
  32. package/artifacts/LSP9Vault.json +6 -6
  33. package/artifacts/LSP9VaultInit.json +6 -6
  34. package/artifacts/UniversalProfile.json +6 -6
  35. package/artifacts/UniversalProfileInit.json +6 -6
  36. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +1 -22
  37. package/contracts/LSP17Extensions/Extension4337.sol +26 -1
  38. package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -1
  39. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +10 -2
  40. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +20 -34
  41. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol +47 -0
  42. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +19 -31
  43. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +13 -6
  44. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +1 -1
  45. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +2 -2
  46. package/contracts/LSP6KeyManager/LSP6Utils.sol +1 -1
  47. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +20 -9
  48. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
  49. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +7 -5
  50. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +128 -25
  51. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +5 -2
  52. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +6 -0
  53. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +4 -2
  54. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +7 -4
  55. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -2
  56. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +5 -2
  57. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +8 -2
  58. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +12 -1
  59. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +4 -0
  60. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -0
  61. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +77 -5
  62. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +15 -12
  63. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +19 -3
  64. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +25 -16
  65. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +223 -19
  66. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +28 -15
  67. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
  68. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +1 -1
  69. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +1 -2
  70. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +1 -2
  71. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +15 -4
  72. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +8 -4
  73. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +1 -2
  74. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +1 -2
  75. package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +0 -1
  76. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +13 -2
  77. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +6 -2
  78. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +4 -2
  79. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +14 -4
  80. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +7 -4
  81. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +7 -4
  82. package/contracts/LSP9Vault/LSP9VaultCore.sol +0 -22
  83. package/contracts/Version.sol +1 -1
  84. package/devdocs/LSP4DigitalAssetMetadata.json +11 -5
  85. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -2
  86. package/devdocs/LSP6KeyManager.json +1 -1
  87. package/devdocs/LSP6KeyManagerInit.json +1 -1
  88. package/devdocs/LSP7CappedSupply.json +22 -2
  89. package/devdocs/LSP7CappedSupplyInitAbstract.json +22 -2
  90. package/devdocs/LSP7CompatibleERC20.json +23 -2
  91. package/devdocs/LSP7CompatibleERC20InitAbstract.json +22 -2
  92. package/devdocs/LSP7CompatibleERC20Mintable.json +23 -2
  93. package/devdocs/LSP7CompatibleERC20MintableInit.json +24 -3
  94. package/devdocs/LSP7DigitalAsset.json +27 -6
  95. package/devdocs/LSP7DigitalAssetInitAbstract.json +22 -2
  96. package/devdocs/LSP7Mintable.json +24 -2
  97. package/devdocs/LSP7MintableInit.json +25 -3
  98. package/devdocs/LSP8CappedSupply.json +66 -4
  99. package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -4
  100. package/devdocs/LSP8CompatibleERC721.json +69 -5
  101. package/devdocs/LSP8CompatibleERC721InitAbstract.json +67 -5
  102. package/devdocs/LSP8CompatibleERC721Mintable.json +69 -5
  103. package/devdocs/LSP8CompatibleERC721MintableInit.json +70 -6
  104. package/devdocs/LSP8IdentifiableDigitalAsset.json +71 -8
  105. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -4
  106. package/devdocs/LSP8Mintable.json +68 -4
  107. package/devdocs/LSP8MintableInit.json +69 -5
  108. package/dist/constants.cjs.js +4406 -1319
  109. package/dist/constants.d.ts +4158 -818
  110. package/dist/constants.es.js +4405 -1319
  111. package/package.json +2 -2
  112. package/userdocs/LSP7CappedSupply.json +8 -0
  113. package/userdocs/LSP7CappedSupplyInitAbstract.json +8 -0
  114. package/userdocs/LSP7CompatibleERC20.json +8 -0
  115. package/userdocs/LSP7CompatibleERC20InitAbstract.json +8 -0
  116. package/userdocs/LSP7CompatibleERC20Mintable.json +8 -0
  117. package/userdocs/LSP7CompatibleERC20MintableInit.json +9 -1
  118. package/userdocs/LSP7DigitalAsset.json +8 -0
  119. package/userdocs/LSP7DigitalAssetInitAbstract.json +8 -0
  120. package/userdocs/LSP7Mintable.json +8 -0
  121. package/userdocs/LSP7MintableInit.json +9 -1
  122. package/userdocs/LSP8CappedSupply.json +20 -0
  123. package/userdocs/LSP8CappedSupplyInitAbstract.json +20 -0
  124. package/userdocs/LSP8CompatibleERC721.json +20 -0
  125. package/userdocs/LSP8CompatibleERC721InitAbstract.json +20 -0
  126. package/userdocs/LSP8CompatibleERC721Mintable.json +20 -0
  127. package/userdocs/LSP8CompatibleERC721MintableInit.json +21 -1
  128. package/userdocs/LSP8IdentifiableDigitalAsset.json +21 -1
  129. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +20 -0
  130. package/userdocs/LSP8Mintable.json +20 -0
  131. package/userdocs/LSP8MintableInit.json +21 -1
@@ -28,12 +28,22 @@
28
28
  ],
29
29
  "LSP4TokenNameNotEditable()": [
30
30
  {
31
- "details": "Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
31
+ "details": "Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized."
32
32
  }
33
33
  ],
34
34
  "LSP4TokenSymbolNotEditable()": [
35
35
  {
36
- "details": "Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
36
+ "details": "Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized."
37
+ }
38
+ ],
39
+ "LSP4TokenTypeNotEditable()": [
40
+ {
41
+ "details": "Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized."
42
+ }
43
+ ],
44
+ "LSP8BatchCallFailed(uint256)": [
45
+ {
46
+ "details": "Reverts when a batch call failed."
37
47
  }
38
48
  ],
39
49
  "LSP8CannotSendToAddressZero()": [
@@ -101,9 +111,19 @@
101
111
  "details": "Reverts when `tokenId` has already been minted."
102
112
  }
103
113
  ],
104
- "LSP8TokenIdTypeNotEditable()": [
114
+ "LSP8TokenIdFormatNotEditable()": [
115
+ {
116
+ "details": "Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` 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."
117
+ }
118
+ ],
119
+ "LSP8TokenIdsDataEmptyArray()": [
105
120
  {
106
- "details": "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."
121
+ "details": "Reverts when empty arrays is passed to the function"
122
+ }
123
+ ],
124
+ "LSP8TokenIdsDataLengthMismatch()": [
125
+ {
126
+ "details": "Reverts when the length of the token IDs data arrays is not equal"
107
127
  }
108
128
  ],
109
129
  "LSP8TokenOwnerCannotBeOperator()": [
@@ -149,6 +169,16 @@
149
169
  "_0": "The total number of token IDs that `tokenOwner` owns."
150
170
  }
151
171
  },
172
+ "batchCalls(bytes[])": {
173
+ "custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
174
+ "details": "Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.",
175
+ "params": {
176
+ "data": "An array of ABI encoded function calls to be called on the contract."
177
+ },
178
+ "returns": {
179
+ "results": "An array of abi-encoded data returned by the functions executed."
180
+ }
181
+ },
152
182
  "constructor": {
153
183
  "details": "initialize (= lock) base implementation contract on deployment"
154
184
  },
@@ -170,6 +200,24 @@
170
200
  "dataValues": "The array of data stored at multiple keys"
171
201
  }
172
202
  },
203
+ "getDataBatchForTokenIds(bytes32[],bytes32[])": {
204
+ "params": {
205
+ "dataKeys": "An array of data keys corresponding to the token IDs.",
206
+ "tokenIds": "An array of token IDs."
207
+ },
208
+ "returns": {
209
+ "dataValues": "An array of data values for each pair of `tokenId` and `dataKey`."
210
+ }
211
+ },
212
+ "getDataForTokenId(bytes32,bytes32)": {
213
+ "params": {
214
+ "dataKey": "The key for the data to retrieve.",
215
+ "tokenId": "The unique identifier for a token."
216
+ },
217
+ "returns": {
218
+ "dataValue": "The data value associated with the given `tokenId` and `dataKey`."
219
+ }
220
+ },
173
221
  "getOperatorsOf(bytes32)": {
174
222
  "details": "Returns all `operator` addresses that are allowed to transfer or burn a specific `tokenId` on behalf of its owner.",
175
223
  "params": {
@@ -179,8 +227,10 @@
179
227
  "_0": "An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist."
180
228
  }
181
229
  },
182
- "initialize(string,string,address,uint256)": {
230
+ "initialize(string,string,address,uint256,uint256)": {
183
231
  "params": {
232
+ "lsp4TokenType_": "The type of token this digital asset contract represents (`0` = Token, `1` = NFT, `2` = Collection).",
233
+ "lsp8TokenIdFormat_": "The format of tokenIds (= NFTs) that this contract will create.",
184
234
  "name_": "The name of the token.",
185
235
  "newOwner_": "The owner of the token contract.",
186
236
  "symbol_": "The symbol of the token."
@@ -240,6 +290,20 @@
240
290
  "dataValues": "An array of bytes values to set for each `dataKeys`."
241
291
  }
242
292
  },
293
+ "setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])": {
294
+ "params": {
295
+ "dataKeys": "An array of data keys corresponding to the token IDs.",
296
+ "dataValues": "An array of values to set for the given data keys.",
297
+ "tokenIds": "An array of token IDs."
298
+ }
299
+ },
300
+ "setDataForTokenId(bytes32,bytes32,bytes)": {
301
+ "params": {
302
+ "dataKey": "The key for the data to set.",
303
+ "dataValue": "The value to set for the given data key.",
304
+ "tokenId": "The unique identifier for a token."
305
+ }
306
+ },
243
307
  "supportsInterface(bytes4)": {
244
308
  "details": "See {IERC165-supportsInterface}."
245
309
  },