@lukso/lsp-smart-contracts 0.12.0 → 0.13.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 (160) hide show
  1. package/README.md +2 -2
  2. package/artifacts/LSP0ERC725Account.json +19 -19
  3. package/artifacts/LSP0ERC725AccountInit.json +19 -19
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateUP.json +15 -15
  7. package/artifacts/LSP1UniversalReceiverDelegateVault.json +15 -15
  8. package/artifacts/LSP4DigitalAssetMetadata.json +5 -0
  9. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +5 -0
  10. package/artifacts/LSP6KeyManager.json +15 -15
  11. package/artifacts/LSP6KeyManagerInit.json +15 -15
  12. package/artifacts/LSP7CappedSupply.json +71 -49
  13. package/artifacts/LSP7CappedSupplyInitAbstract.json +71 -49
  14. package/artifacts/LSP7CompatibleERC20.json +71 -49
  15. package/artifacts/LSP7CompatibleERC20InitAbstract.json +71 -49
  16. package/artifacts/LSP7CompatibleERC20Mintable.json +78 -51
  17. package/artifacts/LSP7CompatibleERC20MintableInit.json +78 -51
  18. package/artifacts/LSP7DigitalAsset.json +71 -49
  19. package/artifacts/LSP7DigitalAssetInitAbstract.json +71 -49
  20. package/artifacts/LSP7Mintable.json +78 -51
  21. package/artifacts/LSP7MintableInit.json +78 -51
  22. package/artifacts/LSP8CappedSupply.json +187 -36
  23. package/artifacts/LSP8CappedSupplyInitAbstract.json +200 -49
  24. package/artifacts/LSP8CompatibleERC721.json +187 -36
  25. package/artifacts/LSP8CompatibleERC721InitAbstract.json +200 -49
  26. package/artifacts/LSP8CompatibleERC721Mintable.json +195 -39
  27. package/artifacts/LSP8CompatibleERC721MintableInit.json +208 -52
  28. package/artifacts/LSP8IdentifiableDigitalAsset.json +187 -36
  29. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +200 -49
  30. package/artifacts/LSP8Mintable.json +195 -39
  31. package/artifacts/LSP8MintableInit.json +208 -52
  32. package/artifacts/LSP9Vault.json +19 -19
  33. package/artifacts/LSP9VaultInit.json +19 -19
  34. package/artifacts/UniversalProfile.json +19 -19
  35. package/artifacts/UniversalProfileInit.json +19 -19
  36. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  37. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +7 -3
  38. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +62 -62
  39. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +2 -1
  40. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +3 -1
  41. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +11 -10
  42. package/contracts/LSP17Extensions/Extension4337.sol +26 -1
  43. package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +2 -1
  44. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +31 -33
  45. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +24 -17
  46. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +1 -1
  47. package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +1 -5
  48. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +9 -0
  49. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +20 -34
  50. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol +47 -0
  51. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +19 -31
  52. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +13 -6
  53. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +2 -1
  54. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +16 -10
  55. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +2 -1
  56. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +14 -16
  57. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +6 -2
  58. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +20 -9
  59. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
  60. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +7 -5
  61. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +129 -36
  62. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +5 -2
  63. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +6 -0
  64. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +4 -2
  65. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +7 -4
  66. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -2
  67. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +5 -2
  68. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +8 -2
  69. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +12 -1
  70. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +4 -0
  71. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -0
  72. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +77 -4
  73. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +15 -12
  74. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +19 -3
  75. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +25 -16
  76. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +222 -28
  77. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +28 -15
  78. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +16 -8
  79. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +9 -8
  80. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +13 -2
  81. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +6 -2
  82. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +4 -2
  83. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +13 -2
  84. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +6 -2
  85. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +6 -2
  86. package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
  87. package/contracts/LSP9Vault/LSP9Vault.sol +3 -2
  88. package/contracts/LSP9Vault/LSP9VaultCore.sol +22 -37
  89. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -1
  90. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +1 -1
  91. package/contracts/UniversalProfile.sol +4 -2
  92. package/contracts/UniversalProfileInit.sol +8 -5
  93. package/contracts/UniversalProfileInitAbstract.sol +4 -2
  94. package/contracts/Version.sol +6 -5
  95. package/devdocs/LSP0ERC725Account.json +3 -8
  96. package/devdocs/LSP0ERC725AccountInit.json +2 -7
  97. package/devdocs/LSP1UniversalReceiverDelegateUP.json +0 -6
  98. package/devdocs/LSP1UniversalReceiverDelegateVault.json +0 -6
  99. package/devdocs/LSP4DigitalAssetMetadata.json +11 -5
  100. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -2
  101. package/devdocs/LSP6KeyManager.json +2 -7
  102. package/devdocs/LSP6KeyManagerInit.json +2 -7
  103. package/devdocs/LSP7CappedSupply.json +22 -8
  104. package/devdocs/LSP7CappedSupplyInitAbstract.json +22 -8
  105. package/devdocs/LSP7CompatibleERC20.json +23 -8
  106. package/devdocs/LSP7CompatibleERC20InitAbstract.json +22 -8
  107. package/devdocs/LSP7CompatibleERC20Mintable.json +23 -8
  108. package/devdocs/LSP7CompatibleERC20MintableInit.json +24 -9
  109. package/devdocs/LSP7DigitalAsset.json +27 -12
  110. package/devdocs/LSP7DigitalAssetInitAbstract.json +22 -8
  111. package/devdocs/LSP7Mintable.json +24 -8
  112. package/devdocs/LSP7MintableInit.json +25 -9
  113. package/devdocs/LSP8CappedSupply.json +66 -10
  114. package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -10
  115. package/devdocs/LSP8CompatibleERC721.json +69 -11
  116. package/devdocs/LSP8CompatibleERC721InitAbstract.json +67 -11
  117. package/devdocs/LSP8CompatibleERC721Mintable.json +69 -11
  118. package/devdocs/LSP8CompatibleERC721MintableInit.json +70 -12
  119. package/devdocs/LSP8IdentifiableDigitalAsset.json +71 -14
  120. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -10
  121. package/devdocs/LSP8Mintable.json +68 -10
  122. package/devdocs/LSP8MintableInit.json +69 -11
  123. package/devdocs/LSP9Vault.json +0 -6
  124. package/devdocs/LSP9VaultInit.json +0 -6
  125. package/devdocs/UniversalProfile.json +3 -8
  126. package/devdocs/UniversalProfileInit.json +4 -9
  127. package/dist/constants.cjs.js +4552 -1859
  128. package/dist/constants.d.ts +4143 -1371
  129. package/dist/constants.es.js +4551 -1859
  130. package/package.json +2 -2
  131. package/userdocs/LSP0ERC725Account.json +3 -3
  132. package/userdocs/LSP0ERC725AccountInit.json +3 -3
  133. package/userdocs/LSP1UniversalReceiverDelegateUP.json +3 -3
  134. package/userdocs/LSP1UniversalReceiverDelegateVault.json +3 -3
  135. package/userdocs/LSP6KeyManager.json +3 -3
  136. package/userdocs/LSP6KeyManagerInit.json +3 -3
  137. package/userdocs/LSP7CappedSupply.json +8 -3
  138. package/userdocs/LSP7CappedSupplyInitAbstract.json +8 -3
  139. package/userdocs/LSP7CompatibleERC20.json +8 -3
  140. package/userdocs/LSP7CompatibleERC20InitAbstract.json +8 -3
  141. package/userdocs/LSP7CompatibleERC20Mintable.json +8 -3
  142. package/userdocs/LSP7CompatibleERC20MintableInit.json +9 -4
  143. package/userdocs/LSP7DigitalAsset.json +8 -3
  144. package/userdocs/LSP7DigitalAssetInitAbstract.json +8 -3
  145. package/userdocs/LSP7Mintable.json +8 -3
  146. package/userdocs/LSP7MintableInit.json +9 -4
  147. package/userdocs/LSP8CappedSupply.json +20 -3
  148. package/userdocs/LSP8CappedSupplyInitAbstract.json +20 -3
  149. package/userdocs/LSP8CompatibleERC721.json +20 -3
  150. package/userdocs/LSP8CompatibleERC721InitAbstract.json +20 -3
  151. package/userdocs/LSP8CompatibleERC721Mintable.json +20 -3
  152. package/userdocs/LSP8CompatibleERC721MintableInit.json +21 -4
  153. package/userdocs/LSP8IdentifiableDigitalAsset.json +20 -3
  154. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +19 -2
  155. package/userdocs/LSP8Mintable.json +19 -2
  156. package/userdocs/LSP8MintableInit.json +20 -3
  157. package/userdocs/LSP9Vault.json +3 -3
  158. package/userdocs/LSP9VaultInit.json +3 -3
  159. package/userdocs/UniversalProfile.json +3 -3
  160. package/userdocs/UniversalProfileInit.json +3 -3
@@ -29,12 +29,22 @@
29
29
  ],
30
30
  "LSP4TokenNameNotEditable()": [
31
31
  {
32
- "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."
32
+ "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."
33
33
  }
34
34
  ],
35
35
  "LSP4TokenSymbolNotEditable()": [
36
36
  {
37
- "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."
37
+ "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."
38
+ }
39
+ ],
40
+ "LSP4TokenTypeNotEditable()": [
41
+ {
42
+ "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."
43
+ }
44
+ ],
45
+ "LSP8BatchCallFailed(uint256)": [
46
+ {
47
+ "details": "Reverts when a batch call failed."
38
48
  }
39
49
  ],
40
50
  "LSP8CannotSendToAddressZero()": [
@@ -97,9 +107,19 @@
97
107
  "details": "Error occurs when sending native tokens to the LSP8 contract without sending any data. E.g. Sending value without passing a bytes4 function selector to call a LSP17 Extension."
98
108
  }
99
109
  ],
100
- "LSP8TokenIdTypeNotEditable()": [
110
+ "LSP8TokenIdSchemaNotEditable()": [
111
+ {
112
+ "details": "Reverts when trying to edit the data key `LSP8TokenIdSchema` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdSchema` 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."
113
+ }
114
+ ],
115
+ "LSP8TokenIdsDataEmptyArray()": [
101
116
  {
102
- "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."
117
+ "details": "Reverts when empty arrays is passed to the function"
118
+ }
119
+ ],
120
+ "LSP8TokenIdsDataLengthMismatch()": [
121
+ {
122
+ "details": "Reverts when the length of the token IDs data arrays is not equal"
103
123
  }
104
124
  ],
105
125
  "LSP8TokenOwnerCannotBeOperator()": [
@@ -145,6 +165,16 @@
145
165
  "_0": "The total number of token IDs that `tokenOwner` owns."
146
166
  }
147
167
  },
168
+ "batchCalls(bytes[])": {
169
+ "custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
170
+ "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.",
171
+ "params": {
172
+ "data": "An array of ABI encoded function calls to be called on the contract."
173
+ },
174
+ "returns": {
175
+ "results": "An array of abi-encoded data returned by the functions executed."
176
+ }
177
+ },
148
178
  "getData(bytes32)": {
149
179
  "details": "Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`.",
150
180
  "params": {
@@ -172,6 +202,24 @@
172
202
  "_0": "An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist."
173
203
  }
174
204
  },
205
+ "getTokenIdData(bytes32,bytes32)": {
206
+ "params": {
207
+ "dataKey": "The key for the data to retrieve.",
208
+ "tokenId": "The unique identifier for a token."
209
+ },
210
+ "returns": {
211
+ "dataValues": "The data value associated with the given `tokenId` and `dataKey`."
212
+ }
213
+ },
214
+ "getTokenIdDataBatch(bytes32[],bytes32[])": {
215
+ "params": {
216
+ "dataKey": "An array of data keys corresponding to the token IDs.",
217
+ "tokenId": "An array of token IDs."
218
+ },
219
+ "returns": {
220
+ "dataValues": "An array of data values for each pair of `tokenId` and `dataKey`."
221
+ }
222
+ },
175
223
  "isOperatorFor(address,bytes32)": {
176
224
  "details": "Returns whether `operator` address is an operator for a given `tokenId`.",
177
225
  "params": {
@@ -217,6 +265,20 @@
217
265
  "dataValues": "An array of bytes values to set for each `dataKeys`."
218
266
  }
219
267
  },
268
+ "setTokenIdData(bytes32,bytes32,bytes)": {
269
+ "params": {
270
+ "dataKey": "The key for the data to set.",
271
+ "dataValue": "The value to set for the given data key.",
272
+ "tokenId": "The unique identifier for a token."
273
+ }
274
+ },
275
+ "setTokenIdDataBatch(bytes32[],bytes32[],bytes[])": {
276
+ "params": {
277
+ "dataKey": "An array of data keys corresponding to the token IDs.",
278
+ "dataValue": "An array of values to set for the given data keys.",
279
+ "tokenId": "An array of token IDs."
280
+ }
281
+ },
220
282
  "supportsInterface(bytes4)": {
221
283
  "details": "See {IERC165-supportsInterface}."
222
284
  },
@@ -266,12 +328,6 @@
266
328
  },
267
329
  "transferOwnership(address)": {
268
330
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
269
- },
270
- "version()": {
271
- "details": "Get the version of the contract.",
272
- "returns": {
273
- "_0": "The version of the the contract."
274
- }
275
331
  }
276
332
  },
277
333
  "title": "Implementation of a LSP8 Identifiable Digital Asset, a contract that represents a non-fungible token.",
@@ -27,12 +27,22 @@
27
27
  ],
28
28
  "LSP4TokenNameNotEditable()": [
29
29
  {
30
- "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."
30
+ "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."
31
31
  }
32
32
  ],
33
33
  "LSP4TokenSymbolNotEditable()": [
34
34
  {
35
- "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."
35
+ "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."
36
+ }
37
+ ],
38
+ "LSP4TokenTypeNotEditable()": [
39
+ {
40
+ "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."
41
+ }
42
+ ],
43
+ "LSP8BatchCallFailed(uint256)": [
44
+ {
45
+ "details": "Reverts when a batch call failed."
36
46
  }
37
47
  ],
38
48
  "LSP8CannotSendToAddressZero()": [
@@ -100,9 +110,19 @@
100
110
  "details": "Reverts when `tokenId` has already been minted."
101
111
  }
102
112
  ],
103
- "LSP8TokenIdTypeNotEditable()": [
113
+ "LSP8TokenIdSchemaNotEditable()": [
114
+ {
115
+ "details": "Reverts when trying to edit the data key `LSP8TokenIdSchema` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdSchema` 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."
116
+ }
117
+ ],
118
+ "LSP8TokenIdsDataEmptyArray()": [
104
119
  {
105
- "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."
120
+ "details": "Reverts when empty arrays is passed to the function"
121
+ }
122
+ ],
123
+ "LSP8TokenIdsDataLengthMismatch()": [
124
+ {
125
+ "details": "Reverts when the length of the token IDs data arrays is not equal"
106
126
  }
107
127
  ],
108
128
  "LSP8TokenOwnerCannotBeOperator()": [
@@ -148,8 +168,20 @@
148
168
  "_0": "The total number of token IDs that `tokenOwner` owns."
149
169
  }
150
170
  },
171
+ "batchCalls(bytes[])": {
172
+ "custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
173
+ "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.",
174
+ "params": {
175
+ "data": "An array of ABI encoded function calls to be called on the contract."
176
+ },
177
+ "returns": {
178
+ "results": "An array of abi-encoded data returned by the functions executed."
179
+ }
180
+ },
151
181
  "constructor": {
152
182
  "params": {
183
+ "lsp4TokenType_": "The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection).",
184
+ "lsp8TokenIdSchema_": "The schema of tokenIds (= NFTs) that this contract will create.",
153
185
  "name_": "The name of the token.",
154
186
  "newOwner_": "The owner of the token contract.",
155
187
  "symbol_": "The symbol of the token."
@@ -182,6 +214,24 @@
182
214
  "_0": "An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist."
183
215
  }
184
216
  },
217
+ "getTokenIdData(bytes32,bytes32)": {
218
+ "params": {
219
+ "dataKey": "The key for the data to retrieve.",
220
+ "tokenId": "The unique identifier for a token."
221
+ },
222
+ "returns": {
223
+ "dataValues": "The data value associated with the given `tokenId` and `dataKey`."
224
+ }
225
+ },
226
+ "getTokenIdDataBatch(bytes32[],bytes32[])": {
227
+ "params": {
228
+ "dataKey": "An array of data keys corresponding to the token IDs.",
229
+ "tokenId": "An array of token IDs."
230
+ },
231
+ "returns": {
232
+ "dataValues": "An array of data values for each pair of `tokenId` and `dataKey`."
233
+ }
234
+ },
185
235
  "isOperatorFor(address,bytes32)": {
186
236
  "details": "Returns whether `operator` address is an operator for a given `tokenId`.",
187
237
  "params": {
@@ -236,6 +286,20 @@
236
286
  "dataValues": "An array of bytes values to set for each `dataKeys`."
237
287
  }
238
288
  },
289
+ "setTokenIdData(bytes32,bytes32,bytes)": {
290
+ "params": {
291
+ "dataKey": "The key for the data to set.",
292
+ "dataValue": "The value to set for the given data key.",
293
+ "tokenId": "The unique identifier for a token."
294
+ }
295
+ },
296
+ "setTokenIdDataBatch(bytes32[],bytes32[],bytes[])": {
297
+ "params": {
298
+ "dataKey": "An array of data keys corresponding to the token IDs.",
299
+ "dataValue": "An array of values to set for the given data keys.",
300
+ "tokenId": "An array of token IDs."
301
+ }
302
+ },
239
303
  "supportsInterface(bytes4)": {
240
304
  "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
241
305
  },
@@ -285,12 +349,6 @@
285
349
  },
286
350
  "transferOwnership(address)": {
287
351
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
288
- },
289
- "version()": {
290
- "details": "Get the version of the contract.",
291
- "returns": {
292
- "_0": "The version of the the contract."
293
- }
294
352
  }
295
353
  },
296
354
  "title": "LSP8IdentifiableDigitalAsset deployable preset contract with a public {mint} function callable only by the contract {owner}.",
@@ -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
+ "LSP8TokenIdSchemaNotEditable()": [
115
+ {
116
+ "details": "Reverts when trying to edit the data key `LSP8TokenIdSchema` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdSchema` 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
  },
@@ -179,8 +209,28 @@
179
209
  "_0": "An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist."
180
210
  }
181
211
  },
182
- "initialize(string,string,address,uint256)": {
212
+ "getTokenIdData(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
+ "dataValues": "The data value associated with the given `tokenId` and `dataKey`."
219
+ }
220
+ },
221
+ "getTokenIdDataBatch(bytes32[],bytes32[])": {
222
+ "params": {
223
+ "dataKey": "An array of data keys corresponding to the token IDs.",
224
+ "tokenId": "An array of token IDs."
225
+ },
226
+ "returns": {
227
+ "dataValues": "An array of data values for each pair of `tokenId` and `dataKey`."
228
+ }
229
+ },
230
+ "initialize(string,string,address,uint256,uint256)": {
183
231
  "params": {
232
+ "lsp4TokenType_": "The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection).",
233
+ "lsp8TokenIdSchema_": "The schema 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
+ "setTokenIdData(bytes32,bytes32,bytes)": {
294
+ "params": {
295
+ "dataKey": "The key for the data to set.",
296
+ "dataValue": "The value to set for the given data key.",
297
+ "tokenId": "The unique identifier for a token."
298
+ }
299
+ },
300
+ "setTokenIdDataBatch(bytes32[],bytes32[],bytes[])": {
301
+ "params": {
302
+ "dataKey": "An array of data keys corresponding to the token IDs.",
303
+ "dataValue": "An array of values to set for the given data keys.",
304
+ "tokenId": "An array of token IDs."
305
+ }
306
+ },
243
307
  "supportsInterface(bytes4)": {
244
308
  "details": "See {IERC165-supportsInterface}."
245
309
  },
@@ -289,12 +353,6 @@
289
353
  },
290
354
  "transferOwnership(address)": {
291
355
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
292
- },
293
- "version()": {
294
- "details": "Get the version of the contract.",
295
- "returns": {
296
- "_0": "The version of the the contract."
297
- }
298
356
  }
299
357
  },
300
358
  "version": 1
@@ -229,12 +229,6 @@
229
229
  "returns": {
230
230
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
231
231
  }
232
- },
233
- "version()": {
234
- "details": "Get the version of the contract.",
235
- "returns": {
236
- "_0": "The version of the the contract."
237
- }
238
232
  }
239
233
  },
240
234
  "title": "Implementation of LSP9Vault built on top of [ERC725], [LSP-1-UniversalReceiver]",
@@ -232,12 +232,6 @@
232
232
  "returns": {
233
233
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
234
234
  }
235
- },
236
- "version()": {
237
- "details": "Get the version of the contract.",
238
- "returns": {
239
- "_0": "The version of the the contract."
240
- }
241
235
  }
242
236
  },
243
237
  "title": "Deployable Proxy Implementation of LSP9Vault built on top of ERC725, LSP1UniversalReceiver",
@@ -140,7 +140,7 @@
140
140
  },
141
141
  "constructor": {
142
142
  "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}. - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.",
143
- "details": "Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment.",
143
+ "details": "Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3Profile` data key in the ERC725Y data key/value store. - The `constructor` is payable and allows funding the contract on deployment. - The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.",
144
144
  "params": {
145
145
  "initialOwner": "the owner of the contract"
146
146
  }
@@ -187,6 +187,7 @@
187
187
  }
188
188
  },
189
189
  "isValidSignature(bytes32,bytes)": {
190
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed across different LSP0ERC725Accounts.",
190
191
  "details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `_ERC1271_SUCCESSVALUE` if the address recovered is the same as the owner, indicating that it was a valid signature. - If the address is different, it returns the `_ERC1271_FAILVALUE` indicating that the signature is not valid. 2. If the owner is a smart contract, it forwards the call of {isValidSignature()} to the owner contract: - If the contract fails or returns the `_ERC1271_FAILVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_FAILVALUE`, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the `_ERC1271_SUCCESSVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_SUCCESSVALUE`, indicating that it's a valid signature.",
191
192
  "params": {
192
193
  "dataHash": "The hash of the data to be validated.",
@@ -244,7 +245,7 @@
244
245
  },
245
246
  "universalReceiver(bytes32,bytes)": {
246
247
  "custom:events": "- {UniversalReceiver} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
247
- "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function.",
248
+ "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. This function delegates internally the handling of native tokens to the {universalReceiver} function itself passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and the calldata as received data.",
248
249
  "params": {
249
250
  "receivedData": "The data received.",
250
251
  "typeId": "The type of call received."
@@ -252,12 +253,6 @@
252
253
  "returns": {
253
254
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
254
255
  }
255
- },
256
- "version()": {
257
- "details": "Get the version of the contract.",
258
- "returns": {
259
- "_0": "The version of the the contract."
260
- }
261
256
  }
262
257
  },
263
258
  "title": "implementation of a LUKSO's Universal Profile based on LSP3",
@@ -183,13 +183,14 @@
183
183
  }
184
184
  },
185
185
  "initialize(address)": {
186
- "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
187
- "details": "Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment. The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier. The `initialize(address)` function also allows funding the contract on initialization.",
186
+ "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}. - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.",
187
+ "details": "Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3Profile` data key in the ERC725Y data key/value store. - The `initialize(address)` function is payable and allows funding the contract on initialization. - The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.",
188
188
  "params": {
189
189
  "initialOwner": "the owner of the contract"
190
190
  }
191
191
  },
192
192
  "isValidSignature(bytes32,bytes)": {
193
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed across different LSP0ERC725Accounts.",
193
194
  "details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `_ERC1271_SUCCESSVALUE` if the address recovered is the same as the owner, indicating that it was a valid signature. - If the address is different, it returns the `_ERC1271_FAILVALUE` indicating that the signature is not valid. 2. If the owner is a smart contract, it forwards the call of {isValidSignature()} to the owner contract: - If the contract fails or returns the `_ERC1271_FAILVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_FAILVALUE`, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the `_ERC1271_SUCCESSVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_SUCCESSVALUE`, indicating that it's a valid signature.",
194
195
  "params": {
195
196
  "dataHash": "The hash of the data to be validated.",
@@ -247,7 +248,7 @@
247
248
  },
248
249
  "universalReceiver(bytes32,bytes)": {
249
250
  "custom:events": "- {UniversalReceiver} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
250
- "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function.",
251
+ "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. This function delegates internally the handling of native tokens to the {universalReceiver} function itself passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and the calldata as received data.",
251
252
  "params": {
252
253
  "receivedData": "The data received.",
253
254
  "typeId": "The type of call received."
@@ -255,12 +256,6 @@
255
256
  "returns": {
256
257
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
257
258
  }
258
- },
259
- "version()": {
260
- "details": "Get the version of the contract.",
261
- "returns": {
262
- "_0": "The version of the the contract."
263
- }
264
259
  }
265
260
  },
266
261
  "title": "Deployable Proxy implementation of a LUKSO's Universal Profile based on LSP3",