@lukso/lsp-smart-contracts 0.8.2 → 0.10.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 (179) hide show
  1. package/README.md +29 -8
  2. package/artifacts/LSP0ERC725Account.json +90 -50
  3. package/artifacts/LSP0ERC725AccountInit.json +90 -50
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP16UniversalFactory.json +31 -2
  7. package/artifacts/LSP1UniversalReceiverDelegateUP.json +19 -35
  8. package/artifacts/LSP1UniversalReceiverDelegateVault.json +13 -13
  9. package/artifacts/LSP4Compatibility.json +39 -40
  10. package/artifacts/LSP4DigitalAssetMetadata.json +39 -40
  11. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +39 -40
  12. package/artifacts/LSP6KeyManager.json +107 -8
  13. package/artifacts/LSP6KeyManagerInit.json +119 -20
  14. package/artifacts/LSP7CappedSupply.json +78 -38
  15. package/artifacts/LSP7CappedSupplyInitAbstract.json +78 -38
  16. package/artifacts/LSP7CompatibleERC20.json +78 -38
  17. package/artifacts/LSP7CompatibleERC20InitAbstract.json +78 -38
  18. package/artifacts/LSP7CompatibleERC20Mintable.json +80 -40
  19. package/artifacts/LSP7CompatibleERC20MintableInit.json +80 -40
  20. package/artifacts/LSP7DigitalAsset.json +78 -38
  21. package/artifacts/LSP7DigitalAssetInitAbstract.json +78 -38
  22. package/artifacts/LSP7Mintable.json +80 -40
  23. package/artifacts/LSP7MintableInit.json +80 -40
  24. package/artifacts/LSP8CappedSupply.json +39 -40
  25. package/artifacts/LSP8CappedSupplyInitAbstract.json +39 -40
  26. package/artifacts/LSP8CompatibleERC721.json +42 -43
  27. package/artifacts/LSP8CompatibleERC721InitAbstract.json +42 -43
  28. package/artifacts/LSP8CompatibleERC721Mintable.json +44 -45
  29. package/artifacts/LSP8CompatibleERC721MintableInit.json +44 -45
  30. package/artifacts/LSP8IdentifiableDigitalAsset.json +39 -40
  31. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +39 -40
  32. package/artifacts/LSP8Mintable.json +41 -42
  33. package/artifacts/LSP8MintableInit.json +41 -42
  34. package/artifacts/LSP9Vault.json +73 -55
  35. package/artifacts/LSP9VaultInit.json +73 -55
  36. package/artifacts/UniversalProfile.json +90 -50
  37. package/artifacts/UniversalProfileInit.json +90 -50
  38. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +62 -0
  39. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  40. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +36 -6
  41. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +605 -219
  42. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +31 -5
  43. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +37 -3
  44. package/contracts/LSP0ERC725Account/LSP0Utils.sol +0 -1
  45. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +71 -60
  46. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +5 -7
  47. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +0 -1
  48. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +27 -4
  49. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +41 -84
  50. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +8 -8
  51. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +10 -5
  52. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +0 -4
  53. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +129 -77
  54. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +45 -16
  55. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +12 -0
  56. package/contracts/LSP20CallVerification/ILSP20CallVerification.sol +30 -0
  57. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +83 -0
  58. package/contracts/LSP20CallVerification/LSP20Constants.sol +17 -0
  59. package/contracts/LSP20CallVerification/LSP20Errors.sol +15 -0
  60. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +26 -12
  61. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +0 -1
  62. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +76 -66
  63. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +12 -3
  64. package/contracts/LSP6KeyManager/LSP6Constants.sol +9 -3
  65. package/contracts/LSP6KeyManager/LSP6Errors.sol +22 -1
  66. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +172 -29
  67. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
  68. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +270 -100
  69. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +187 -67
  70. package/contracts/LSP6KeyManager/LSP6Utils.sol +31 -20
  71. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +79 -30
  72. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
  73. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +2 -2
  74. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +24 -0
  75. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +1 -2
  76. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +1 -2
  77. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +3 -5
  78. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +3 -5
  79. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +27 -29
  80. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +1 -1
  81. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +1 -2
  82. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +1 -2
  83. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +5 -5
  84. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +6 -6
  85. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +2 -2
  86. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +2 -2
  87. package/contracts/LSP9Vault/ILSP9Vault.sol +27 -0
  88. package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
  89. package/contracts/LSP9Vault/LSP9Vault.sol +11 -8
  90. package/contracts/LSP9Vault/LSP9VaultCore.sol +96 -71
  91. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -1
  92. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +19 -7
  93. package/contracts/UniversalProfileInitAbstract.sol +5 -0
  94. package/devdocs/Create2Factory.json +16 -0
  95. package/devdocs/LSP0ERC725Account.json +200 -0
  96. package/devdocs/LSP0ERC725AccountInit.json +203 -0
  97. package/devdocs/LSP11BasicSocialRecovery.json +146 -0
  98. package/devdocs/LSP11BasicSocialRecoveryInit.json +146 -0
  99. package/devdocs/LSP16UniversalFactory.json +51 -0
  100. package/devdocs/LSP1UniversalReceiverDelegateUP.json +80 -0
  101. package/devdocs/LSP1UniversalReceiverDelegateVault.json +62 -0
  102. package/devdocs/LSP4Compatibility.json +79 -0
  103. package/devdocs/LSP4DigitalAssetMetadata.json +84 -0
  104. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +77 -0
  105. package/devdocs/LSP6KeyManager.json +257 -0
  106. package/devdocs/LSP6KeyManagerInit.json +260 -0
  107. package/devdocs/LSP7CappedSupply.json +211 -0
  108. package/devdocs/LSP7CappedSupplyInitAbstract.json +206 -0
  109. package/devdocs/LSP7CompatibleERC20.json +225 -0
  110. package/devdocs/LSP7CompatibleERC20InitAbstract.json +218 -0
  111. package/devdocs/LSP7CompatibleERC20Mintable.json +217 -0
  112. package/devdocs/LSP7CompatibleERC20MintableInit.json +227 -0
  113. package/devdocs/LSP7DigitalAsset.json +210 -0
  114. package/devdocs/LSP7DigitalAssetInitAbstract.json +202 -0
  115. package/devdocs/LSP7Mintable.json +219 -0
  116. package/devdocs/LSP7MintableInit.json +220 -0
  117. package/devdocs/LSP8CappedSupply.json +232 -0
  118. package/devdocs/LSP8CappedSupplyInitAbstract.json +227 -0
  119. package/devdocs/LSP8CompatibleERC721.json +298 -0
  120. package/devdocs/LSP8CompatibleERC721InitAbstract.json +291 -0
  121. package/devdocs/LSP8CompatibleERC721Mintable.json +290 -0
  122. package/devdocs/LSP8CompatibleERC721MintableInit.json +300 -0
  123. package/devdocs/LSP8IdentifiableDigitalAsset.json +230 -0
  124. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +223 -0
  125. package/devdocs/LSP8Mintable.json +242 -0
  126. package/devdocs/LSP8MintableInit.json +245 -0
  127. package/devdocs/LSP9Vault.json +171 -0
  128. package/devdocs/LSP9VaultInit.json +175 -0
  129. package/devdocs/UniversalProfile.json +199 -0
  130. package/devdocs/UniversalProfileInit.json +202 -0
  131. package/devdocs/UniversalReceiverAddressStore.json +9 -0
  132. package/dist/constants.cjs.js +31569 -0
  133. package/dist/constants.d.ts +31681 -0
  134. package/dist/constants.es.js +31550 -0
  135. package/package.json +70 -52
  136. package/userdocs/Create2Factory.json +5 -0
  137. package/userdocs/LSP0ERC725Account.json +47 -0
  138. package/userdocs/LSP0ERC725AccountInit.json +47 -0
  139. package/userdocs/LSP11BasicSocialRecovery.json +29 -0
  140. package/userdocs/LSP11BasicSocialRecoveryInit.json +29 -0
  141. package/userdocs/LSP16UniversalFactory.json +5 -0
  142. package/userdocs/LSP1UniversalReceiverDelegateUP.json +10 -0
  143. package/userdocs/LSP1UniversalReceiverDelegateVault.json +10 -0
  144. package/userdocs/LSP4Compatibility.json +20 -0
  145. package/userdocs/LSP4DigitalAssetMetadata.json +23 -0
  146. package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +20 -0
  147. package/userdocs/LSP6KeyManager.json +18 -0
  148. package/userdocs/LSP6KeyManagerInit.json +18 -0
  149. package/userdocs/LSP7CappedSupply.json +29 -0
  150. package/userdocs/LSP7CappedSupplyInitAbstract.json +26 -0
  151. package/userdocs/LSP7CompatibleERC20.json +35 -0
  152. package/userdocs/LSP7CompatibleERC20InitAbstract.json +32 -0
  153. package/userdocs/LSP7CompatibleERC20Mintable.json +32 -0
  154. package/userdocs/LSP7CompatibleERC20MintableInit.json +35 -0
  155. package/userdocs/LSP7DigitalAsset.json +29 -0
  156. package/userdocs/LSP7DigitalAssetInitAbstract.json +26 -0
  157. package/userdocs/LSP7Mintable.json +29 -0
  158. package/userdocs/LSP7MintableInit.json +29 -0
  159. package/userdocs/LSP8CappedSupply.json +23 -0
  160. package/userdocs/LSP8CappedSupplyInitAbstract.json +20 -0
  161. package/userdocs/LSP8CompatibleERC721.json +29 -0
  162. package/userdocs/LSP8CompatibleERC721InitAbstract.json +26 -0
  163. package/userdocs/LSP8CompatibleERC721Mintable.json +26 -0
  164. package/userdocs/LSP8CompatibleERC721MintableInit.json +29 -0
  165. package/userdocs/LSP8IdentifiableDigitalAsset.json +23 -0
  166. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +20 -0
  167. package/userdocs/LSP8Mintable.json +23 -0
  168. package/userdocs/LSP8MintableInit.json +23 -0
  169. package/userdocs/LSP9Vault.json +38 -0
  170. package/userdocs/LSP9VaultInit.json +38 -0
  171. package/userdocs/UniversalProfile.json +50 -0
  172. package/userdocs/UniversalProfileInit.json +50 -0
  173. package/userdocs/UniversalReceiverAddressStore.json +5 -0
  174. package/CONTRIBUTING.md +0 -57
  175. package/common/constants.d.ts +0 -738
  176. package/common/constants.js +0 -785
  177. package/contracts/Utils/GasLib.sol +0 -17
  178. package/module/constants.d.ts +0 -738
  179. package/module/constants.js +0 -782
@@ -0,0 +1,242 @@
1
+ {
2
+ "details": "LSP8 extension.",
3
+ "errors": {
4
+ "ERC725Y_DataKeysValuesEmptyArray()": [
5
+ {
6
+ "details": "reverts when one of the array parameter provided to `setDataBatch` is an empty array"
7
+ }
8
+ ],
9
+ "ERC725Y_DataKeysValuesLengthMismatch()": [
10
+ {
11
+ "details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
12
+ }
13
+ ],
14
+ "ERC725Y_MsgValueDisallowed()": [
15
+ {
16
+ "details": "reverts when sending value to the `setData(..)` functions"
17
+ }
18
+ ],
19
+ "LSP4TokenNameNotEditable()": [
20
+ {
21
+ "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."
22
+ }
23
+ ],
24
+ "LSP4TokenSymbolNotEditable()": [
25
+ {
26
+ "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."
27
+ }
28
+ ],
29
+ "LSP8CannotSendToAddressZero()": [
30
+ {
31
+ "details": "reverts when trying to send token to the zero address."
32
+ }
33
+ ],
34
+ "LSP8CannotSendToSelf()": [
35
+ {
36
+ "details": "reverts when specifying the same address for `from` and `to` in a token transfer."
37
+ }
38
+ ],
39
+ "LSP8CannotUseAddressZeroAsOperator()": [
40
+ {
41
+ "details": "reverts when trying to set the zero address as an operator."
42
+ }
43
+ ],
44
+ "LSP8InvalidTransferBatch()": [
45
+ {
46
+ "details": "reverts when the parameters used for `transferBatch` have different lengths."
47
+ }
48
+ ],
49
+ "LSP8NonExistentTokenId(bytes32)": [
50
+ {
51
+ "details": "reverts when `tokenId` has not been minted."
52
+ }
53
+ ],
54
+ "LSP8NonExistingOperator(address,bytes32)": [
55
+ {
56
+ "details": "reverts when `operator` is not an operator for the `tokenId`."
57
+ }
58
+ ],
59
+ "LSP8NotTokenOperator(bytes32,address)": [
60
+ {
61
+ "details": "reverts when `caller` is not an allowed operator for `tokenId`."
62
+ }
63
+ ],
64
+ "LSP8NotTokenOwner(address,bytes32,address)": [
65
+ {
66
+ "details": "reverts when `caller` is not the `tokenOwner` of the `tokenId`."
67
+ }
68
+ ],
69
+ "LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)": [
70
+ {
71
+ "details": "reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
72
+ }
73
+ ],
74
+ "LSP8NotifyTokenReceiverIsEOA(address)": [
75
+ {
76
+ "details": "reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
77
+ }
78
+ ],
79
+ "LSP8OperatorAlreadyAuthorized(address,bytes32)": [
80
+ {
81
+ "details": "reverts when `operator` is already authorized for the `tokenId`."
82
+ }
83
+ ],
84
+ "LSP8TokenIdAlreadyMinted(bytes32)": [
85
+ {
86
+ "details": "reverts when `tokenId` has already been minted."
87
+ }
88
+ ],
89
+ "LSP8TokenOwnerCannotBeOperator()": [
90
+ {
91
+ "details": "reverts when trying to authorize or revoke the token's owner as an operator."
92
+ }
93
+ ]
94
+ },
95
+ "kind": "dev",
96
+ "methods": {
97
+ "authorizeOperator(address,bytes32)": {
98
+ "details": "Makes `operator` address an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits an {AuthorizedOperator} event.",
99
+ "params": {
100
+ "operator": "The address to authorize as an operator.",
101
+ "tokenId": "The tokenId operator has access to."
102
+ }
103
+ },
104
+ "balanceOf(address)": {
105
+ "details": "Returns the number of tokens owned by `tokenOwner`.",
106
+ "params": {
107
+ "tokenOwner": "The address to query"
108
+ },
109
+ "returns": {
110
+ "_0": "The number of tokens owned by this address"
111
+ }
112
+ },
113
+ "constructor": {
114
+ "params": {
115
+ "name_": "The name of the token",
116
+ "newOwner_": "The owner of the the token-Metadata",
117
+ "symbol_": "The symbol of the token"
118
+ }
119
+ },
120
+ "getData(bytes32)": {
121
+ "params": {
122
+ "dataKey": "The key which value to retrieve"
123
+ },
124
+ "returns": {
125
+ "dataValue": "The data stored at the key"
126
+ }
127
+ },
128
+ "getDataBatch(bytes32[])": {
129
+ "params": {
130
+ "dataKeys": "The array of keys which values to retrieve"
131
+ },
132
+ "returns": {
133
+ "dataValues": "The array of data stored at multiple keys"
134
+ }
135
+ },
136
+ "getOperatorsOf(bytes32)": {
137
+ "details": "Returns all `operator` addresses of `tokenId`. Requirements - `tokenId` must exist.",
138
+ "params": {
139
+ "tokenId": "The tokenId to query"
140
+ },
141
+ "returns": {
142
+ "_0": "The list of operators for the `tokenId`"
143
+ }
144
+ },
145
+ "isOperatorFor(address,bytes32)": {
146
+ "details": "Returns whether `operator` address is an operator of `tokenId`. Operators can send and burn tokens on behalf of their owners. The tokenOwner is their own operator. Requirements - `tokenId` must exist.",
147
+ "params": {
148
+ "operator": "The address to query",
149
+ "tokenId": "The tokenId to query"
150
+ },
151
+ "returns": {
152
+ "_0": "True if the owner of `tokenId` is `operator` address, false otherwise"
153
+ }
154
+ },
155
+ "mint(address,bytes32,bool,bytes)": {
156
+ "details": "Mints `amount` tokens and transfers it to `to`. Requirements: - `to` cannot be the zero address. Emits a {Transfer} event.",
157
+ "params": {
158
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
159
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
160
+ "to": "The address to mint tokens",
161
+ "tokenId": "The tokenId to mint"
162
+ }
163
+ },
164
+ "owner()": {
165
+ "details": "Returns the address of the current owner."
166
+ },
167
+ "renounceOwnership()": {
168
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
169
+ },
170
+ "revokeOperator(address,bytes32)": {
171
+ "details": "Removes `operator` address as an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits a {RevokedOperator} event.",
172
+ "params": {
173
+ "operator": "The address to revoke as an operator.",
174
+ "tokenId": "The tokenId `operator` is revoked from operating"
175
+ }
176
+ },
177
+ "setData(bytes32,bytes)": {
178
+ "params": {
179
+ "dataKey": "The key to retrieve stored value",
180
+ "dataValue": "The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event."
181
+ }
182
+ },
183
+ "setDataBatch(bytes32[],bytes[])": {
184
+ "details": "Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event.",
185
+ "params": {
186
+ "dataKeys": "The array of data keys for values to set",
187
+ "dataValues": "The array of values to set"
188
+ }
189
+ },
190
+ "supportsInterface(bytes4)": {
191
+ "details": "See {IERC165-supportsInterface}."
192
+ },
193
+ "tokenIdsOf(address)": {
194
+ "details": "Returns the list of `tokenIds` for the `tokenOwner` address.",
195
+ "params": {
196
+ "tokenOwner": "The address to query owned tokens"
197
+ },
198
+ "returns": {
199
+ "_0": "List of owned tokens by `tokenOwner` address"
200
+ }
201
+ },
202
+ "tokenOwnerOf(bytes32)": {
203
+ "details": "Returns the `tokenOwner` address of the `tokenId` token. Requirements: - `tokenId` must exist.",
204
+ "params": {
205
+ "tokenId": "The tokenId to query"
206
+ },
207
+ "returns": {
208
+ "_0": "The address owning the `tokenId`"
209
+ }
210
+ },
211
+ "totalSupply()": {
212
+ "details": "Returns the number of existing tokens.",
213
+ "returns": {
214
+ "_0": "The number of existing tokens"
215
+ }
216
+ },
217
+ "transfer(address,address,bytes32,bool,bytes)": {
218
+ "details": "Transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `from` and `to` cannot be the same address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of `tokenId`. Emits a {Transfer} event.",
219
+ "params": {
220
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
221
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
222
+ "from": "The sending address.",
223
+ "to": "The receiving address.",
224
+ "tokenId": "The tokenId to transfer."
225
+ }
226
+ },
227
+ "transferBatch(address[],address[],bytes32[],bool[],bytes[])": {
228
+ "details": "Transfers many tokens based on the list `from`, `to`, `tokenId`. If any transfer fails the call will revert. Requirements: - `from`, `to`, `tokenId` lists are the same length. - no values in `from` can be the zero address. - no values in `to` can be the zero address. - `from` and `to` cannot be the same address at the same index of each lists. - each `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of each `tokenId`. Emits {Transfer} events.",
229
+ "params": {
230
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
231
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
232
+ "from": "The list of sending addresses.",
233
+ "to": "The list of receiving addresses.",
234
+ "tokenId": "The list of tokenId to transfer."
235
+ }
236
+ },
237
+ "transferOwnership(address)": {
238
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
239
+ }
240
+ },
241
+ "version": 1
242
+ }
@@ -0,0 +1,245 @@
1
+ {
2
+ "details": "LSP8 extension.",
3
+ "errors": {
4
+ "ERC725Y_DataKeysValuesEmptyArray()": [
5
+ {
6
+ "details": "reverts when one of the array parameter provided to `setDataBatch` is an empty array"
7
+ }
8
+ ],
9
+ "ERC725Y_DataKeysValuesLengthMismatch()": [
10
+ {
11
+ "details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
12
+ }
13
+ ],
14
+ "ERC725Y_MsgValueDisallowed()": [
15
+ {
16
+ "details": "reverts when sending value to the `setData(..)` functions"
17
+ }
18
+ ],
19
+ "LSP4TokenNameNotEditable()": [
20
+ {
21
+ "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."
22
+ }
23
+ ],
24
+ "LSP4TokenSymbolNotEditable()": [
25
+ {
26
+ "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."
27
+ }
28
+ ],
29
+ "LSP8CannotSendToAddressZero()": [
30
+ {
31
+ "details": "reverts when trying to send token to the zero address."
32
+ }
33
+ ],
34
+ "LSP8CannotSendToSelf()": [
35
+ {
36
+ "details": "reverts when specifying the same address for `from` and `to` in a token transfer."
37
+ }
38
+ ],
39
+ "LSP8CannotUseAddressZeroAsOperator()": [
40
+ {
41
+ "details": "reverts when trying to set the zero address as an operator."
42
+ }
43
+ ],
44
+ "LSP8InvalidTransferBatch()": [
45
+ {
46
+ "details": "reverts when the parameters used for `transferBatch` have different lengths."
47
+ }
48
+ ],
49
+ "LSP8NonExistentTokenId(bytes32)": [
50
+ {
51
+ "details": "reverts when `tokenId` has not been minted."
52
+ }
53
+ ],
54
+ "LSP8NonExistingOperator(address,bytes32)": [
55
+ {
56
+ "details": "reverts when `operator` is not an operator for the `tokenId`."
57
+ }
58
+ ],
59
+ "LSP8NotTokenOperator(bytes32,address)": [
60
+ {
61
+ "details": "reverts when `caller` is not an allowed operator for `tokenId`."
62
+ }
63
+ ],
64
+ "LSP8NotTokenOwner(address,bytes32,address)": [
65
+ {
66
+ "details": "reverts when `caller` is not the `tokenOwner` of the `tokenId`."
67
+ }
68
+ ],
69
+ "LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)": [
70
+ {
71
+ "details": "reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
72
+ }
73
+ ],
74
+ "LSP8NotifyTokenReceiverIsEOA(address)": [
75
+ {
76
+ "details": "reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
77
+ }
78
+ ],
79
+ "LSP8OperatorAlreadyAuthorized(address,bytes32)": [
80
+ {
81
+ "details": "reverts when `operator` is already authorized for the `tokenId`."
82
+ }
83
+ ],
84
+ "LSP8TokenIdAlreadyMinted(bytes32)": [
85
+ {
86
+ "details": "reverts when `tokenId` has already been minted."
87
+ }
88
+ ],
89
+ "LSP8TokenOwnerCannotBeOperator()": [
90
+ {
91
+ "details": "reverts when trying to authorize or revoke the token's owner as an operator."
92
+ }
93
+ ]
94
+ },
95
+ "kind": "dev",
96
+ "methods": {
97
+ "authorizeOperator(address,bytes32)": {
98
+ "details": "Makes `operator` address an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits an {AuthorizedOperator} event.",
99
+ "params": {
100
+ "operator": "The address to authorize as an operator.",
101
+ "tokenId": "The tokenId operator has access to."
102
+ }
103
+ },
104
+ "balanceOf(address)": {
105
+ "details": "Returns the number of tokens owned by `tokenOwner`.",
106
+ "params": {
107
+ "tokenOwner": "The address to query"
108
+ },
109
+ "returns": {
110
+ "_0": "The number of tokens owned by this address"
111
+ }
112
+ },
113
+ "constructor": {
114
+ "details": "initialize (= lock) base implementation contract on deployment"
115
+ },
116
+ "getData(bytes32)": {
117
+ "params": {
118
+ "dataKey": "The key which value to retrieve"
119
+ },
120
+ "returns": {
121
+ "dataValue": "The data stored at the key"
122
+ }
123
+ },
124
+ "getDataBatch(bytes32[])": {
125
+ "params": {
126
+ "dataKeys": "The array of keys which values to retrieve"
127
+ },
128
+ "returns": {
129
+ "dataValues": "The array of data stored at multiple keys"
130
+ }
131
+ },
132
+ "getOperatorsOf(bytes32)": {
133
+ "details": "Returns all `operator` addresses of `tokenId`. Requirements - `tokenId` must exist.",
134
+ "params": {
135
+ "tokenId": "The tokenId to query"
136
+ },
137
+ "returns": {
138
+ "_0": "The list of operators for the `tokenId`"
139
+ }
140
+ },
141
+ "initialize(string,string,address)": {
142
+ "params": {
143
+ "name_": "The name of the token",
144
+ "newOwner_": "The owner of the the token-Metadata",
145
+ "symbol_": "The symbol of the token"
146
+ }
147
+ },
148
+ "isOperatorFor(address,bytes32)": {
149
+ "details": "Returns whether `operator` address is an operator of `tokenId`. Operators can send and burn tokens on behalf of their owners. The tokenOwner is their own operator. Requirements - `tokenId` must exist.",
150
+ "params": {
151
+ "operator": "The address to query",
152
+ "tokenId": "The tokenId to query"
153
+ },
154
+ "returns": {
155
+ "_0": "True if the owner of `tokenId` is `operator` address, false otherwise"
156
+ }
157
+ },
158
+ "mint(address,bytes32,bool,bytes)": {
159
+ "details": "Mints `amount` tokens and transfers it to `to`. Requirements: - `to` cannot be the zero address. Emits a {Transfer} event.",
160
+ "params": {
161
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
162
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
163
+ "to": "The address to mint tokens",
164
+ "tokenId": "The tokenId to mint"
165
+ }
166
+ },
167
+ "owner()": {
168
+ "details": "Returns the address of the current owner."
169
+ },
170
+ "renounceOwnership()": {
171
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
172
+ },
173
+ "revokeOperator(address,bytes32)": {
174
+ "details": "Removes `operator` address as an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits a {RevokedOperator} event.",
175
+ "params": {
176
+ "operator": "The address to revoke as an operator.",
177
+ "tokenId": "The tokenId `operator` is revoked from operating"
178
+ }
179
+ },
180
+ "setData(bytes32,bytes)": {
181
+ "params": {
182
+ "dataKey": "The key to retrieve stored value",
183
+ "dataValue": "The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event."
184
+ }
185
+ },
186
+ "setDataBatch(bytes32[],bytes[])": {
187
+ "details": "Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event.",
188
+ "params": {
189
+ "dataKeys": "The array of data keys for values to set",
190
+ "dataValues": "The array of values to set"
191
+ }
192
+ },
193
+ "supportsInterface(bytes4)": {
194
+ "details": "See {IERC165-supportsInterface}."
195
+ },
196
+ "tokenIdsOf(address)": {
197
+ "details": "Returns the list of `tokenIds` for the `tokenOwner` address.",
198
+ "params": {
199
+ "tokenOwner": "The address to query owned tokens"
200
+ },
201
+ "returns": {
202
+ "_0": "List of owned tokens by `tokenOwner` address"
203
+ }
204
+ },
205
+ "tokenOwnerOf(bytes32)": {
206
+ "details": "Returns the `tokenOwner` address of the `tokenId` token. Requirements: - `tokenId` must exist.",
207
+ "params": {
208
+ "tokenId": "The tokenId to query"
209
+ },
210
+ "returns": {
211
+ "_0": "The address owning the `tokenId`"
212
+ }
213
+ },
214
+ "totalSupply()": {
215
+ "details": "Returns the number of existing tokens.",
216
+ "returns": {
217
+ "_0": "The number of existing tokens"
218
+ }
219
+ },
220
+ "transfer(address,address,bytes32,bool,bytes)": {
221
+ "details": "Transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `from` and `to` cannot be the same address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of `tokenId`. Emits a {Transfer} event.",
222
+ "params": {
223
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
224
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
225
+ "from": "The sending address.",
226
+ "to": "The receiving address.",
227
+ "tokenId": "The tokenId to transfer."
228
+ }
229
+ },
230
+ "transferBatch(address[],address[],bytes32[],bool[],bytes[])": {
231
+ "details": "Transfers many tokens based on the list `from`, `to`, `tokenId`. If any transfer fails the call will revert. Requirements: - `from`, `to`, `tokenId` lists are the same length. - no values in `from` can be the zero address. - no values in `to` can be the zero address. - `from` and `to` cannot be the same address at the same index of each lists. - each `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of each `tokenId`. Emits {Transfer} events.",
232
+ "params": {
233
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
234
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
235
+ "from": "The list of sending addresses.",
236
+ "to": "The list of receiving addresses.",
237
+ "tokenId": "The list of tokenId to transfer."
238
+ }
239
+ },
240
+ "transferOwnership(address)": {
241
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
242
+ }
243
+ },
244
+ "version": 1
245
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "author": "Fabian Vogelsteller, Yamen Merhi, Jean Cavallera",
3
+ "details": "Could be owned by a UniversalProfile and able to register received asset with UniversalReceiverDelegateVault",
4
+ "errors": {
5
+ "CannotTransferOwnershipToSelf()": [
6
+ {
7
+ "details": "reverts when trying to transfer ownership to the address(this)"
8
+ }
9
+ ],
10
+ "ERC725X_ContractDeploymentFailed()": [
11
+ {
12
+ "details": "reverts when contract deployment via `ERC725X.execute(...)`/`ERC725X.executeBatch(...)` failed. whether using operation type 1 (CREATE) or 2 (CREATE2)."
13
+ }
14
+ ],
15
+ "ERC725X_CreateOperationsRequireEmptyRecipientAddress()": [
16
+ {
17
+ "details": "reverts when passing a `to` address while deploying a contract va `ERC725X.execute(...)`/`ERC725X.executeBatch(...)` whether using operation type 1 (CREATE) or 2 (CREATE2)."
18
+ }
19
+ ],
20
+ "ERC725X_ExecuteParametersEmptyArray()": [
21
+ {
22
+ "details": "reverts when one of the array parameter provided to `executeBatch(uint256[],address[],uint256[],bytes[]) is an empty array"
23
+ }
24
+ ],
25
+ "ERC725X_ExecuteParametersLengthMismatch()": [
26
+ {
27
+ "details": "reverts when there is not the same number of operation, to addresses, value, and data."
28
+ }
29
+ ],
30
+ "ERC725X_InsufficientBalance(uint256,uint256)": [
31
+ {
32
+ "details": "reverts when trying to send more native tokens `value` than available in current `balance`.",
33
+ "params": {
34
+ "balance": "the balance of the ERC725X contract.",
35
+ "value": "the amount of native tokens sent via `ERC725X.execute(...)`/`ERC725X.executeBatch(...)`."
36
+ }
37
+ }
38
+ ],
39
+ "ERC725X_MsgValueDisallowedInStaticCall()": [
40
+ {
41
+ "details": "the `value` parameter (= sending native tokens) is not allowed when making a staticcall via `ERC725X.execute(...)`/`ERC725X.executeBatch(...)` because sending native tokens is a state changing operation."
42
+ }
43
+ ],
44
+ "ERC725X_NoContractBytecodeProvided()": [
45
+ {
46
+ "details": "reverts when no contract bytecode was provided as parameter when trying to deploy a contract via `ERC725X.execute(...)`/`ERC725X.executeBatch(...)`, whether using operation type 1 (CREATE) or 2 (CREATE2)."
47
+ }
48
+ ],
49
+ "ERC725X_UnknownOperationType(uint256)": [
50
+ {
51
+ "details": "reverts when the `operationTypeProvided` is none of the default operation types available. (CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4)"
52
+ }
53
+ ],
54
+ "ERC725Y_DataKeysValuesLengthMismatch()": [
55
+ {
56
+ "details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
57
+ }
58
+ ],
59
+ "ERC725Y_MsgValueDisallowed()": [
60
+ {
61
+ "details": "reverts when sending value to the `setData(..)` functions"
62
+ }
63
+ ],
64
+ "LSP1DelegateNotAllowedToSetDataKey(bytes32)": [
65
+ {
66
+ "details": "reverts when the UniversalReceiverDelegates of the Vault sets LSP1/6/17 Data Keys",
67
+ "params": {
68
+ "dataKey": "The data key that the UniversalReceiverDelegate is not allowed to set"
69
+ }
70
+ }
71
+ ],
72
+ "NoExtensionFoundForFunctionSelector(bytes4)": [
73
+ {
74
+ "details": "reverts when there is no extension for the function selector being called with"
75
+ }
76
+ ],
77
+ "NotInRenounceOwnershipInterval(uint256,uint256)": [
78
+ {
79
+ "details": "reverts when trying to renounce ownership before the initial confirmation delay"
80
+ }
81
+ ]
82
+ },
83
+ "kind": "dev",
84
+ "methods": {
85
+ "acceptOwnership()": {
86
+ "details": "same as ILSP14.acceptOwnership with the additional requirement: Requirements: - when notifying the previous owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferred_SenderNotification') - when notifying the new owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferred_RecipientNotification')"
87
+ },
88
+ "batchCalls(bytes[])": {
89
+ "details": "Receives and executes a batch of function calls on this contract."
90
+ },
91
+ "constructor": {
92
+ "params": {
93
+ "newOwner": "the owner of the contract"
94
+ }
95
+ },
96
+ "execute(uint256,address,uint256,bytes)": {
97
+ "details": "Executes any other smart contract. SHOULD only be callable by the owner of the contract set via ERC173 Emits a {Executed} event, when a call is executed under `operationType` 0 and 3 Emits a {ContractCreated} event, when a contract is created under `operationType` 1 and 2 Emits a {ValueReceived} event, when receives native token",
98
+ "params": {
99
+ "operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3"
100
+ }
101
+ },
102
+ "executeBatch(uint256[],address[],uint256[],bytes[])": {
103
+ "details": "Emits a {ValueReceived} event when receiving native tokens.",
104
+ "params": {
105
+ "datas": "The list of call data, or the creation bytecode of the contract to deploy",
106
+ "operationsType": "The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
107
+ "targets": "The list of addresses to call. `targets` will be unused if a contract is created (operation types 1 and 2).",
108
+ "values": "The list of native token amounts to transfer (in Wei)"
109
+ }
110
+ },
111
+ "getData(bytes32)": {
112
+ "params": {
113
+ "dataKey": "The key which value to retrieve"
114
+ },
115
+ "returns": {
116
+ "dataValue": "The data stored at the key"
117
+ }
118
+ },
119
+ "getDataBatch(bytes32[])": {
120
+ "params": {
121
+ "dataKeys": "The array of keys which values to retrieve"
122
+ },
123
+ "returns": {
124
+ "dataValues": "The array of data stored at multiple keys"
125
+ }
126
+ },
127
+ "owner()": {
128
+ "details": "Returns the address of the current owner."
129
+ },
130
+ "pendingOwner()": {
131
+ "details": "The address that ownership of the contract is transferred to. This address may use `acceptOwnership()` to gain ownership of the contract."
132
+ },
133
+ "renounceOwnership()": {
134
+ "details": "Renounce ownership of the contract in a 2-step process. 1. the first call will initiate the process of renouncing ownership. 2. the second is used as a confirmation and will leave the contract without an owner. WARNING: once ownership of the contract has been renounced, any functions that are restricted to be called by the owner will be permanently inaccessible, making these functions not callable anymore and unusable."
135
+ },
136
+ "setData(bytes32,bytes)": {
137
+ "details": "Sets data as bytes in the vault storage for a single key. SHOULD only be callable by the owner of the contract set via ERC173 and the UniversalReceiverDelegate Emits a {DataChanged} event.",
138
+ "params": {
139
+ "dataKey": "The key to retrieve stored value",
140
+ "dataValue": "The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event."
141
+ }
142
+ },
143
+ "setDataBatch(bytes32[],bytes[])": {
144
+ "details": "Sets array of data at multiple given `key` SHOULD only be callable by the owner of the contract set via ERC173 and the UniversalReceiverDelegate Emits a {DataChanged} event.",
145
+ "params": {
146
+ "dataKeys": "The array of data keys for values to set",
147
+ "dataValues": "The array of values to set"
148
+ }
149
+ },
150
+ "supportsInterface(bytes4)": {
151
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. If the contract doesn't support the `interfaceId`, it forwards the call to the `supportsInterface` extension according to LSP17, and checks if the extension implements the interface defined by `interfaceId`."
152
+ },
153
+ "transferOwnership(address)": {
154
+ "details": "same as ILSP14.transferOwnership with the additional requirement: Requirements: - when notifying the new owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferStarted')",
155
+ "params": {
156
+ "newOwner": "the address of the new owner. Requirements: - `newOwner` MUST NOT accept ownership of the contract in the same transaction."
157
+ }
158
+ },
159
+ "universalReceiver(bytes32,bytes)": {
160
+ "params": {
161
+ "receivedData": "The data received.",
162
+ "typeId": "The type of call received."
163
+ },
164
+ "returns": {
165
+ "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
166
+ }
167
+ }
168
+ },
169
+ "title": "Implementation of LSP9Vault built on top of ERC725, LSP1UniversalReceiver",
170
+ "version": 1
171
+ }