@lukso/lsp-smart-contracts 0.11.0-rc.0 → 0.11.1

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 (199) hide show
  1. package/README.md +1 -0
  2. package/artifacts/LSP0ERC725Account.json +7 -2
  3. package/artifacts/LSP0ERC725AccountInit.json +7 -2
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateUP.json +3 -79
  7. package/artifacts/LSP1UniversalReceiverDelegateVault.json +3 -41
  8. package/artifacts/LSP23LinkedContractsFactory.json +544 -0
  9. package/artifacts/LSP6KeyManager.json +24 -19
  10. package/artifacts/LSP6KeyManagerInit.json +24 -19
  11. package/artifacts/LSP7CappedSupply.json +88 -0
  12. package/artifacts/LSP7CappedSupplyInitAbstract.json +88 -0
  13. package/artifacts/LSP7CompatibleERC20.json +88 -0
  14. package/artifacts/LSP7CompatibleERC20InitAbstract.json +88 -0
  15. package/artifacts/LSP7CompatibleERC20Mintable.json +90 -2
  16. package/artifacts/LSP7CompatibleERC20MintableInit.json +90 -2
  17. package/artifacts/LSP7DigitalAsset.json +88 -0
  18. package/artifacts/LSP7DigitalAssetInitAbstract.json +88 -0
  19. package/artifacts/LSP7Mintable.json +90 -2
  20. package/artifacts/LSP7MintableInit.json +90 -2
  21. package/artifacts/LSP8CappedSupply.json +59 -0
  22. package/artifacts/LSP8CappedSupplyInitAbstract.json +59 -0
  23. package/artifacts/LSP8CompatibleERC721.json +60 -1
  24. package/artifacts/LSP8CompatibleERC721InitAbstract.json +60 -1
  25. package/artifacts/LSP8CompatibleERC721Mintable.json +62 -3
  26. package/artifacts/LSP8CompatibleERC721MintableInit.json +62 -3
  27. package/artifacts/LSP8IdentifiableDigitalAsset.json +59 -0
  28. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +59 -0
  29. package/artifacts/LSP8Mintable.json +61 -2
  30. package/artifacts/LSP8MintableInit.json +61 -2
  31. package/artifacts/LSP9Vault.json +7 -2
  32. package/artifacts/LSP9VaultInit.json +7 -2
  33. package/artifacts/UniversalProfile.json +7 -2
  34. package/artifacts/UniversalProfileInit.json +7 -2
  35. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +8 -36
  36. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  37. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +15 -30
  38. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +122 -206
  39. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +18 -36
  40. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +8 -34
  41. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +148 -177
  42. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +21 -20
  43. package/contracts/LSP14Ownable2Step/LSP14Errors.sol +13 -2
  44. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +50 -20
  45. package/contracts/LSP17ContractExtension/LSP17Errors.sol +10 -0
  46. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +16 -34
  47. package/contracts/LSP17ContractExtension/LSP17Utils.sol +1 -1
  48. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +16 -11
  49. package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +5 -10
  50. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +192 -177
  51. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +150 -88
  52. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +66 -48
  53. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +1 -1
  54. package/contracts/LSP23LinkedContractsDeployment/ILSP23LinkedContractsFactory.sol +192 -0
  55. package/contracts/LSP23LinkedContractsDeployment/IPostDeploymentModule.sol +18 -0
  56. package/contracts/LSP23LinkedContractsDeployment/LSP23Errors.sol +24 -0
  57. package/contracts/LSP23LinkedContractsDeployment/LSP23LinkedContractsFactory.sol +392 -0
  58. package/contracts/{LSP23MultiChainDeployment → LSP23LinkedContractsDeployment}/modules/UniversalProfileInitPostDeploymentModule.sol +5 -1
  59. package/contracts/LSP23LinkedContractsDeployment/modules/UniversalProfilePostDeploymentModule.sol +61 -0
  60. package/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol +68 -0
  61. package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +8 -0
  62. package/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol +17 -0
  63. package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +143 -0
  64. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +256 -61
  65. package/contracts/{LSP3UniversalProfile → LSP3ProfileMetadata}/LSP3Constants.sol +3 -3
  66. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +9 -8
  67. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +13 -6
  68. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +4 -4
  69. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +148 -189
  70. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +26 -54
  71. package/contracts/LSP6KeyManager/LSP6Constants.sol +1 -3
  72. package/contracts/LSP6KeyManager/LSP6Errors.sol +142 -63
  73. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +7 -4
  74. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +125 -80
  75. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +8 -4
  76. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +1 -1
  77. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +52 -84
  78. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +59 -10
  79. package/contracts/LSP6KeyManager/LSP6Utils.sol +67 -46
  80. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +116 -78
  81. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +4 -1
  82. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +128 -6
  83. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +212 -80
  84. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +126 -3
  85. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +7 -5
  86. package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +27 -14
  87. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +2 -4
  88. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +2 -4
  89. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +29 -11
  90. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +30 -9
  91. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +46 -14
  92. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +43 -12
  93. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +14 -0
  94. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +9 -4
  95. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +7 -1
  96. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +8 -8
  97. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +7 -6
  98. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +10 -2
  99. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +120 -92
  100. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +4 -1
  101. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +135 -6
  102. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +128 -38
  103. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +134 -5
  104. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +83 -41
  105. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +13 -5
  106. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +24 -0
  107. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +30 -12
  108. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +31 -10
  109. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +96 -31
  110. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +98 -23
  111. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +21 -4
  112. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +12 -2
  113. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +21 -0
  114. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +9 -4
  115. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +13 -0
  116. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +15 -6
  117. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +7 -5
  118. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +17 -2
  119. package/contracts/LSP9Vault/ILSP9Vault.sol +10 -5
  120. package/contracts/LSP9Vault/LSP9Errors.sol +3 -2
  121. package/contracts/LSP9Vault/LSP9Vault.sol +12 -4
  122. package/contracts/LSP9Vault/LSP9VaultCore.sol +245 -182
  123. package/contracts/LSP9Vault/LSP9VaultInit.sol +10 -3
  124. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -6
  125. package/contracts/UniversalProfile.sol +8 -6
  126. package/contracts/UniversalProfileInit.sol +6 -6
  127. package/contracts/UniversalProfileInitAbstract.sol +10 -3
  128. package/devdocs/LSP0ERC725Account.json +54 -37
  129. package/devdocs/LSP0ERC725AccountInit.json +56 -38
  130. package/devdocs/LSP1UniversalReceiverDelegateUP.json +14 -55
  131. package/devdocs/LSP1UniversalReceiverDelegateVault.json +9 -33
  132. package/devdocs/LSP23LinkedContractsFactory.json +81 -0
  133. package/devdocs/LSP4DigitalAssetMetadata.json +5 -5
  134. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +4 -4
  135. package/devdocs/LSP6KeyManager.json +109 -70
  136. package/devdocs/LSP6KeyManagerInit.json +109 -70
  137. package/devdocs/LSP7CappedSupply.json +90 -42
  138. package/devdocs/LSP7CappedSupplyInitAbstract.json +86 -40
  139. package/devdocs/LSP7CompatibleERC20.json +79 -43
  140. package/devdocs/LSP7CompatibleERC20InitAbstract.json +75 -39
  141. package/devdocs/LSP7CompatibleERC20Mintable.json +87 -40
  142. package/devdocs/LSP7CompatibleERC20MintableInit.json +82 -42
  143. package/devdocs/LSP7DigitalAsset.json +76 -40
  144. package/devdocs/LSP7DigitalAssetInitAbstract.json +73 -37
  145. package/devdocs/LSP7Mintable.json +79 -51
  146. package/devdocs/LSP7MintableInit.json +78 -49
  147. package/devdocs/LSP8CappedSupply.json +72 -43
  148. package/devdocs/LSP8CappedSupplyInitAbstract.json +68 -41
  149. package/devdocs/LSP8CompatibleERC721.json +85 -64
  150. package/devdocs/LSP8CompatibleERC721InitAbstract.json +81 -60
  151. package/devdocs/LSP8CompatibleERC721Mintable.json +98 -60
  152. package/devdocs/LSP8CompatibleERC721MintableInit.json +93 -62
  153. package/devdocs/LSP8IdentifiableDigitalAsset.json +58 -41
  154. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +57 -40
  155. package/devdocs/LSP8Mintable.json +65 -48
  156. package/devdocs/LSP8MintableInit.json +64 -47
  157. package/devdocs/LSP9Vault.json +61 -18
  158. package/devdocs/LSP9VaultInit.json +59 -17
  159. package/devdocs/UniversalProfile.json +53 -35
  160. package/devdocs/UniversalProfileInit.json +53 -35
  161. package/dist/constants.cjs.js +6236 -2587
  162. package/dist/constants.d.ts +3851 -1129
  163. package/dist/constants.es.js +6236 -2587
  164. package/package.json +6 -4
  165. package/userdocs/LSP0ERC725Account.json +40 -8
  166. package/userdocs/LSP0ERC725AccountInit.json +40 -8
  167. package/userdocs/LSP1UniversalReceiverDelegateUP.json +18 -2
  168. package/userdocs/LSP1UniversalReceiverDelegateVault.json +18 -2
  169. package/userdocs/LSP23LinkedContractsFactory.json +29 -0
  170. package/userdocs/LSP4DigitalAssetMetadata.json +1 -1
  171. package/userdocs/LSP6KeyManager.json +144 -6
  172. package/userdocs/LSP6KeyManagerInit.json +147 -6
  173. package/userdocs/LSP7CappedSupply.json +18 -3
  174. package/userdocs/LSP7CappedSupplyInitAbstract.json +17 -2
  175. package/userdocs/LSP7CompatibleERC20.json +3 -9
  176. package/userdocs/LSP7CompatibleERC20InitAbstract.json +2 -8
  177. package/userdocs/LSP7CompatibleERC20Mintable.json +5 -8
  178. package/userdocs/LSP7CompatibleERC20MintableInit.json +3 -9
  179. package/userdocs/LSP7DigitalAsset.json +2 -2
  180. package/userdocs/LSP7DigitalAssetInitAbstract.json +2 -2
  181. package/userdocs/LSP7Mintable.json +3 -3
  182. package/userdocs/LSP7MintableInit.json +3 -3
  183. package/userdocs/LSP8CappedSupply.json +16 -1
  184. package/userdocs/LSP8CappedSupplyInitAbstract.json +15 -0
  185. package/userdocs/LSP8CompatibleERC721.json +24 -3
  186. package/userdocs/LSP8CompatibleERC721InitAbstract.json +23 -2
  187. package/userdocs/LSP8CompatibleERC721Mintable.json +29 -2
  188. package/userdocs/LSP8CompatibleERC721MintableInit.json +27 -3
  189. package/userdocs/LSP8Mintable.json +4 -1
  190. package/userdocs/LSP8MintableInit.json +4 -1
  191. package/userdocs/LSP9Vault.json +50 -4
  192. package/userdocs/LSP9VaultInit.json +50 -4
  193. package/userdocs/UniversalProfile.json +40 -8
  194. package/userdocs/UniversalProfileInit.json +40 -8
  195. package/contracts/LSP0ERC725Account/LSP0Utils.sol +0 -47
  196. package/contracts/LSP23MultiChainDeployment/IOwnerControlledContractDeployer.sol +0 -174
  197. package/contracts/LSP23MultiChainDeployment/IPostDeploymentModule.sol +0 -10
  198. package/contracts/LSP23MultiChainDeployment/LSP23Errors.sol +0 -24
  199. package/contracts/LSP23MultiChainDeployment/OwnerControlledContractDeployer.sol +0 -388
@@ -1,5 +1,5 @@
1
1
  {
2
- "details": "LSP8 extension.",
2
+ "details": "LSP8IdentifiableDigitalAsset deployable preset contract (proxy version) with a public {mint} function callable only by the contract {owner}.",
3
3
  "errors": {
4
4
  "ERC725Y_DataKeysValuesEmptyArray()": [
5
5
  {
@@ -16,14 +16,24 @@
16
16
  "details": "reverts when sending value to the `setData(..)` functions"
17
17
  }
18
18
  ],
19
+ "InvalidExtensionAddress(bytes)": [
20
+ {
21
+ "details": "reverts when the bytes retrieved from the LSP17 data key is not a valid address (not 20 bytes)"
22
+ }
23
+ ],
24
+ "InvalidFunctionSelector(bytes)": [
25
+ {
26
+ "details": "reverts when the contract is called with a function selector not valid (less than 4 bytes of data)"
27
+ }
28
+ ],
19
29
  "LSP4TokenNameNotEditable()": [
20
30
  {
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."
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."
22
32
  }
23
33
  ],
24
34
  "LSP4TokenSymbolNotEditable()": [
25
35
  {
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."
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."
27
37
  }
28
38
  ],
29
39
  "LSP8CannotSendToAddressZero()": [
@@ -90,24 +100,30 @@
90
100
  {
91
101
  "details": "reverts when trying to authorize or revoke the token's owner as an operator."
92
102
  }
103
+ ],
104
+ "NoExtensionFoundForFunctionSelector(bytes4)": [
105
+ {
106
+ "details": "reverts when there is no extension for the function selector being called with"
107
+ }
93
108
  ]
94
109
  },
95
110
  "kind": "dev",
96
111
  "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.",
112
+ "authorizeOperator(address,bytes32,bytes)": {
113
+ "details": "Allow an `operator` address to transfer or burn a specific `tokenId` on behalf of its token owner. See {isOperatorFor}.",
99
114
  "params": {
100
115
  "operator": "The address to authorize as an operator.",
101
- "tokenId": "The tokenId operator has access to."
116
+ "operatorNotificationData": "The data to notify the operator about via LSP1.",
117
+ "tokenId": "The token ID operator has access to."
102
118
  }
103
119
  },
104
120
  "balanceOf(address)": {
105
- "details": "Returns the number of tokens owned by `tokenOwner`.",
121
+ "details": "Get the number of token IDs owned by `tokenOwner`.",
106
122
  "params": {
107
- "tokenOwner": "The address to query"
123
+ "tokenOwner": "The address to query *"
108
124
  },
109
125
  "returns": {
110
- "_0": "The number of tokens owned by this address"
126
+ "_0": "The total number of token IDs that `tokenOwner` owns."
111
127
  }
112
128
  },
113
129
  "constructor": {
@@ -130,38 +146,38 @@
130
146
  }
131
147
  },
132
148
  "getOperatorsOf(bytes32)": {
133
- "details": "Returns all `operator` addresses of `tokenId`. Requirements - `tokenId` must exist.",
149
+ "details": "Returns all `operator` addresses that are allowed to transfer or burn a specific `tokenId` on behalf of its owner.",
134
150
  "params": {
135
- "tokenId": "The tokenId to query"
151
+ "tokenId": "The token ID to get the operators for."
136
152
  },
137
153
  "returns": {
138
- "_0": "The list of operators for the `tokenId`"
154
+ "_0": "An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist."
139
155
  }
140
156
  },
141
157
  "initialize(string,string,address)": {
142
158
  "params": {
143
- "name_": "The name of the token",
144
- "newOwner_": "The owner of the the token-Metadata",
145
- "symbol_": "The symbol of the token"
159
+ "name_": "The name of the token.",
160
+ "newOwner_": "The owner of the token contract.",
161
+ "symbol_": "The symbol of the token."
146
162
  }
147
163
  },
148
164
  "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.",
165
+ "details": "Returns whether `operator` address is an operator for a given `tokenId`.",
150
166
  "params": {
151
- "operator": "The address to query",
152
- "tokenId": "The tokenId to query"
167
+ "operator": "The address to query operator status for.",
168
+ "tokenId": "The token ID to check if `operator` is allowed to operate on."
153
169
  },
154
170
  "returns": {
155
- "_0": "True if the owner of `tokenId` is `operator` address, false otherwise"
171
+ "_0": "`true` if `operator` is an operator for `tokenId`, `false` otherwise."
156
172
  }
157
173
  },
158
174
  "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.",
175
+ "details": "Public {_mint} function only callable by the {owner}.",
160
176
  "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"
177
+ "allowNonLSP1Recipient": "Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting.",
178
+ "data": "Any addition data to be sent alongside the minting.",
179
+ "to": "The address that will receive the minted `tokenId`.",
180
+ "tokenId": "The tokenId to mint."
165
181
  }
166
182
  },
167
183
  "owner()": {
@@ -170,11 +186,12 @@
170
186
  "renounceOwnership()": {
171
187
  "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
188
  },
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.",
189
+ "revokeOperator(address,bytes32,bytes)": {
190
+ "details": "Remove access of `operator` for a given `tokenId`, disallowing it to transfer `tokenId` on behalf of its owner. See also {isOperatorFor}.",
175
191
  "params": {
176
192
  "operator": "The address to revoke as an operator.",
177
- "tokenId": "The tokenId `operator` is revoked from operating"
193
+ "operatorNotificationData": "The data to notify the operator about via LSP1.",
194
+ "tokenId": "The tokenId `operator` is revoked from operating on."
178
195
  }
179
196
  },
180
197
  "setData(bytes32,bytes)": {
@@ -194,47 +211,47 @@
194
211
  "details": "See {IERC165-supportsInterface}."
195
212
  },
196
213
  "tokenIdsOf(address)": {
197
- "details": "Returns the list of `tokenIds` for the `tokenOwner` address.",
214
+ "details": "Returns the list of token IDs that the `tokenOwner` address owns.",
198
215
  "params": {
199
- "tokenOwner": "The address to query owned tokens"
216
+ "tokenOwner": "The address that we want to get the list of token IDs for."
200
217
  },
201
218
  "returns": {
202
- "_0": "List of owned tokens by `tokenOwner` address"
219
+ "_0": "An array of `bytes32[] tokenIds` owned by `tokenOwner`."
203
220
  }
204
221
  },
205
222
  "tokenOwnerOf(bytes32)": {
206
- "details": "Returns the `tokenOwner` address of the `tokenId` token. Requirements: - `tokenId` must exist.",
223
+ "details": "Returns the list of `tokenIds` for the `tokenOwner` address.",
207
224
  "params": {
208
- "tokenId": "The tokenId to query"
225
+ "tokenId": "tokenOwner The address to query owned tokens"
209
226
  },
210
227
  "returns": {
211
- "_0": "The address owning the `tokenId`"
228
+ "_0": "The owner address of the given `tokenId`."
212
229
  }
213
230
  },
214
231
  "totalSupply()": {
215
- "details": "Returns the number of existing tokens.",
232
+ "details": "Returns the number of existing tokens that have been minted in this contract.",
216
233
  "returns": {
217
- "_0": "The number of existing tokens"
234
+ "_0": "The number of existing tokens."
218
235
  }
219
236
  },
220
237
  "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.",
238
+ "details": "Transfer a given `tokenId` token from the `from` address to the `to` address. If operators are set for a specific `tokenId`, all the operators are revoked after the tokenId have been transferred. The `allowNonLSP1Recipient` parameter MUST be set to `true` when transferring tokens to Externally Owned Accounts (EOAs) or contracts that do not implement the LSP1 standard.",
222
239
  "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."
240
+ "allowNonLSP1Recipient": "When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard.",
241
+ "data": "Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses.",
242
+ "from": "The address that owns the given `tokenId`.",
243
+ "to": "The address that will receive the `tokenId`.",
244
+ "tokenId": "The token ID to transfer."
228
245
  }
229
246
  },
230
247
  "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.",
248
+ "details": "Transfers multiple tokens at once based on the arrays of `from`, `to` and `tokenId`. If any transfer fails, the whole call will revert.",
232
249
  "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."
250
+ "allowNonLSP1Recipient": "When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert.",
251
+ "data": "Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses.",
252
+ "from": "An array of sending addresses.",
253
+ "to": "An array of recipient addresses.",
254
+ "tokenId": "An array of token IDs to transfer."
238
255
  }
239
256
  },
240
257
  "transferOwnership(address)": {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "author": "Fabian Vogelsteller, Yamen Merhi, Jean Cavallera",
3
- "details": "Could be owned by a UniversalProfile and able to register received asset with UniversalReceiverDelegateVault",
3
+ "details": "Could be owned by an EOA or by a contract and is able to receive and send assets. Also allows for registering received assets by leveraging the key-value storage.",
4
4
  "errors": {
5
5
  "CannotTransferOwnershipToSelf()": [
6
6
  {
7
- "details": "reverts when trying to transfer ownership to the address(this)"
7
+ "details": "Reverts when trying to transfer ownership to the `address(this)`."
8
8
  }
9
9
  ],
10
10
  "ERC725X_ContractDeploymentFailed()": [
@@ -61,11 +61,16 @@
61
61
  "details": "reverts when sending value to the `setData(..)` functions"
62
62
  }
63
63
  ],
64
+ "LSP14MustAcceptOwnershipInSeparateTransaction()": [
65
+ {
66
+ "details": "Reverts when pending owner accept ownership in the same transaction of transferring ownership."
67
+ }
68
+ ],
64
69
  "LSP1DelegateNotAllowedToSetDataKey(bytes32)": [
65
70
  {
66
- "details": "reverts when the UniversalReceiverDelegates of the Vault sets LSP1/6/17 Data Keys",
71
+ "details": "Reverts when the Vault version of [LSP1UniversalReceiverDelegate] sets LSP1/6/17 Data Keys.",
67
72
  "params": {
68
- "dataKey": "The data key that the UniversalReceiverDelegate is not allowed to set"
73
+ "dataKey": "The data key that the Vault version of [LSP1UniversalReceiverDelegate] is not allowed to set."
69
74
  }
70
75
  }
71
76
  ],
@@ -76,31 +81,54 @@
76
81
  ],
77
82
  "NotInRenounceOwnershipInterval(uint256,uint256)": [
78
83
  {
79
- "details": "reverts when trying to renounce ownership before the initial confirmation delay"
84
+ "details": "Reverts when trying to renounce ownership before the initial confirmation delay.",
85
+ "params": {
86
+ "renounceOwnershipEnd": "The end timestamp when one can confirm the renouncement of ownership.",
87
+ "renounceOwnershipStart": "The start timestamp when one can confirm the renouncement of ownership."
88
+ }
80
89
  }
81
90
  ]
82
91
  },
83
92
  "kind": "dev",
84
93
  "methods": {
85
94
  "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')"
95
+ "custom:requirements": "- Only the {pendingOwner} can call this function. - When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification]. - When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification].",
96
+ "details": "Transfer ownership of the contract from the current {owner()} to the {pendingOwner()}. Once this function is called: - The current {owner()} will loose access to the functions restricted to the {owner()} only. - The {pendingOwner()} will gain access to the functions restricted to the {owner()} only."
87
97
  },
88
98
  "batchCalls(bytes[])": {
89
- "details": "Receives and executes a batch of function calls on this contract."
99
+ "custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
100
+ "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.",
101
+ "params": {
102
+ "data": "An array of ABI encoded function calls to be called on the contract."
103
+ },
104
+ "returns": {
105
+ "results": "An array of abi-encoded data returned by the functions executed."
106
+ }
90
107
  },
91
108
  "constructor": {
109
+ "custom:events": "- {ValueReceived} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}. - {DataChanged} event when setting the {_LSP9_SUPPORTED_STANDARDS_KEY}. - {UniversalReceiver} event when notifying the `initialOwner`.",
110
+ "details": "Sets `initialOwner` as the contract owner and the `SupportedStandards:LSP9Vault` Data Key. The `constructor` also allows funding the contract on deployment.",
92
111
  "params": {
93
- "newOwner": "the owner of the contract"
112
+ "newOwner": "The new owner of the contract."
94
113
  }
95
114
  },
96
115
  "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",
116
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {ValueReceived} event when receiving native tokens.",
117
+ "custom:info": "The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.",
118
+ "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0.",
119
+ "details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter. Requirements: - SHOULD only be callable by the owner of the contract set via ERC173. - if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is STATICCALL or DELEGATECALL, `value` SHOULD be 0. - `target` SHOULD be address(0) when deploying a contract. Emits an {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) Emits a {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2)",
98
120
  "params": {
99
- "operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3"
121
+ "data": "The call data, or the creation bytecode of the contract to deploy",
122
+ "operationType": "The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
123
+ "target": "The address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2)",
124
+ "value": "The amount of native tokens to transfer (in Wei)"
100
125
  }
101
126
  },
102
127
  "executeBatch(uint256[],address[],uint256[],bytes[])": {
103
- "details": "Emits a {ValueReceived} event when receiving native tokens.",
128
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). (each iteration) - {ValueReceived} event when receiving native tokens.",
129
+ "custom:info": "The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.",
130
+ "custom:requirements": "- The length of the parameters provided must be equal. - Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0.",
131
+ "details": "Generic batch executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `datas` parameter. - deploy a contract by providing its creation bytecode in the `datas` parameter. Requirements: - The length of the parameters provided MUST be equal - SHOULD only be callable by the owner of the contract set via ERC173. - if a `values` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is STATICCALL or DELEGATECALL, `values` SHOULD be 0. - `targets` SHOULD be address(0) when deploying a contract. Emits an {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) Emits a {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2)",
104
132
  "params": {
105
133
  "datas": "The list of call data, or the creation bytecode of the contract to deploy",
106
134
  "operationsType": "The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
@@ -128,35 +156,50 @@
128
156
  "details": "Returns the address of the current owner."
129
157
  },
130
158
  "pendingOwner()": {
159
+ "custom:info": "If no ownership transfer is in progress, the pendingOwner will be `address(0).`.",
131
160
  "details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
132
161
  },
133
162
  "renounceOwnership()": {
134
- "details": "Renounce ownership of the contract in a two 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."
163
+ "custom:danger": "Leaves the contract without an owner. 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.",
164
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
165
+ "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 call is used as a confirmation and will leave the contract without an owner."
135
166
  },
136
167
  "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.",
168
+ "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
169
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
138
170
  "params": {
139
171
  "dataKey": "The key to retrieve stored value",
140
172
  "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
173
  }
142
174
  },
143
175
  "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.",
176
+ "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
177
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
178
+ "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.",
145
179
  "params": {
146
180
  "dataKeys": "The array of data keys for values to set",
147
181
  "dataValues": "The array of values to set"
148
182
  }
149
183
  },
150
184
  "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`."
185
+ "details": "Achieves the goal of [ERC-165] to detect supported interfaces and [LSP-17-ContractExtension] by checking if the interfaceId being queried is supported on another linked extension. If the contract doesn't support the `interfaceId`, it forwards the call to the `supportsInterface` extension according to [LSP-17-ContractExtension], and checks if the extension implements the interface defined by `interfaceId`.",
186
+ "params": {
187
+ "interfaceId": "The interface ID to check if the contract supports it."
188
+ },
189
+ "returns": {
190
+ "_0": "`true` if this contract implements the interface defined by `interfaceId`, `false` otherwise."
191
+ }
152
192
  },
153
193
  "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')",
194
+ "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - When notifying the new owner via LSP1, the `typeId` used must be the `keccak256(...)` hash of [LSP0OwnershipTransferStarted]. - Pending owner cannot accept ownership in the same tx via the LSP1 hook.",
195
+ "details": "Initiate the process of transferring ownership of the contract by setting the new owner as the pending owner. If the new owner is a contract that supports + implements LSP1, this will also attempt to notify the new owner that ownership has been transferred to them by calling the {universalReceiver()} function on the `newOwner` contract.",
155
196
  "params": {
156
- "newOwner": "the address of the new owner."
197
+ "newOwner": "The address of the new owner."
157
198
  }
158
199
  },
159
200
  "universalReceiver(bytes32,bytes)": {
201
+ "custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
202
+ "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.",
160
203
  "params": {
161
204
  "receivedData": "The data received.",
162
205
  "typeId": "The type of call received."
@@ -166,6 +209,6 @@
166
209
  }
167
210
  }
168
211
  },
169
- "title": "Implementation of LSP9Vault built on top of ERC725, LSP1UniversalReceiver",
212
+ "title": "Implementation of LSP9Vault built on top of [ERC725], [LSP-1-UniversalReceiver]",
170
213
  "version": 1
171
214
  }
@@ -4,7 +4,7 @@
4
4
  "errors": {
5
5
  "CannotTransferOwnershipToSelf()": [
6
6
  {
7
- "details": "reverts when trying to transfer ownership to the address(this)"
7
+ "details": "Reverts when trying to transfer ownership to the `address(this)`."
8
8
  }
9
9
  ],
10
10
  "ERC725X_ContractDeploymentFailed()": [
@@ -61,11 +61,16 @@
61
61
  "details": "reverts when sending value to the `setData(..)` functions"
62
62
  }
63
63
  ],
64
+ "LSP14MustAcceptOwnershipInSeparateTransaction()": [
65
+ {
66
+ "details": "Reverts when pending owner accept ownership in the same transaction of transferring ownership."
67
+ }
68
+ ],
64
69
  "LSP1DelegateNotAllowedToSetDataKey(bytes32)": [
65
70
  {
66
- "details": "reverts when the UniversalReceiverDelegates of the Vault sets LSP1/6/17 Data Keys",
71
+ "details": "Reverts when the Vault version of [LSP1UniversalReceiverDelegate] sets LSP1/6/17 Data Keys.",
67
72
  "params": {
68
- "dataKey": "The data key that the UniversalReceiverDelegate is not allowed to set"
73
+ "dataKey": "The data key that the Vault version of [LSP1UniversalReceiverDelegate] is not allowed to set."
69
74
  }
70
75
  }
71
76
  ],
@@ -76,29 +81,50 @@
76
81
  ],
77
82
  "NotInRenounceOwnershipInterval(uint256,uint256)": [
78
83
  {
79
- "details": "reverts when trying to renounce ownership before the initial confirmation delay"
84
+ "details": "Reverts when trying to renounce ownership before the initial confirmation delay.",
85
+ "params": {
86
+ "renounceOwnershipEnd": "The end timestamp when one can confirm the renouncement of ownership.",
87
+ "renounceOwnershipStart": "The start timestamp when one can confirm the renouncement of ownership."
88
+ }
80
89
  }
81
90
  ]
82
91
  },
83
92
  "kind": "dev",
84
93
  "methods": {
85
94
  "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')"
95
+ "custom:requirements": "- Only the {pendingOwner} can call this function. - When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification]. - When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification].",
96
+ "details": "Transfer ownership of the contract from the current {owner()} to the {pendingOwner()}. Once this function is called: - The current {owner()} will loose access to the functions restricted to the {owner()} only. - The {pendingOwner()} will gain access to the functions restricted to the {owner()} only."
87
97
  },
88
98
  "batchCalls(bytes[])": {
89
- "details": "Receives and executes a batch of function calls on this contract."
99
+ "custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
100
+ "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.",
101
+ "params": {
102
+ "data": "An array of ABI encoded function calls to be called on the contract."
103
+ },
104
+ "returns": {
105
+ "results": "An array of abi-encoded data returned by the functions executed."
106
+ }
90
107
  },
91
108
  "constructor": {
92
109
  "details": "initialize (= lock) base implementation contract on deployment"
93
110
  },
94
111
  "execute(uint256,address,uint256,bytes)": {
95
- "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",
112
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {ValueReceived} event when receiving native tokens.",
113
+ "custom:info": "The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.",
114
+ "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0.",
115
+ "details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter. Requirements: - SHOULD only be callable by the owner of the contract set via ERC173. - if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is STATICCALL or DELEGATECALL, `value` SHOULD be 0. - `target` SHOULD be address(0) when deploying a contract. Emits an {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) Emits a {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2)",
96
116
  "params": {
97
- "operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3"
117
+ "data": "The call data, or the creation bytecode of the contract to deploy",
118
+ "operationType": "The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
119
+ "target": "The address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2)",
120
+ "value": "The amount of native tokens to transfer (in Wei)"
98
121
  }
99
122
  },
100
123
  "executeBatch(uint256[],address[],uint256[],bytes[])": {
101
- "details": "Emits a {ValueReceived} event when receiving native tokens.",
124
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). (each iteration) - {ValueReceived} event when receiving native tokens.",
125
+ "custom:info": "The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.",
126
+ "custom:requirements": "- The length of the parameters provided must be equal. - Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0.",
127
+ "details": "Generic batch executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `datas` parameter. - deploy a contract by providing its creation bytecode in the `datas` parameter. Requirements: - The length of the parameters provided MUST be equal - SHOULD only be callable by the owner of the contract set via ERC173. - if a `values` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is STATICCALL or DELEGATECALL, `values` SHOULD be 0. - `targets` SHOULD be address(0) when deploying a contract. Emits an {Executed} event, when a call is made with `operationType` 0 (CALL), 3 (STATICCALL) or 4 (DELEGATECALL) Emits a {ContractCreated} event, when deploying a contract with `operationType` 1 (CREATE) or 2 (CREATE2)",
102
128
  "params": {
103
129
  "datas": "The list of call data, or the creation bytecode of the contract to deploy",
104
130
  "operationsType": "The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
@@ -123,44 +149,60 @@
123
149
  }
124
150
  },
125
151
  "initialize(address)": {
126
- "details": "Sets the owner of the contract and sets the SupportedStandards:LSP9Vault key",
152
+ "custom:events": "- {ValueReceived} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}. - {DataChanged} event when updating the {_LSP9_SUPPORTED_STANDARDS_KEY}. - {UniversalReceiver} event when notifying the `initialOwner`.",
153
+ "details": "Sets `initialOwner` as the contract owner and the `SupportedStandards:LSP9Vault` Data Key. The `initialize(address)` also allows funding the contract on deployment.",
127
154
  "params": {
128
- "newOwner": "the owner of the contract"
155
+ "newOwner": "The new owner of the contract."
129
156
  }
130
157
  },
131
158
  "owner()": {
132
159
  "details": "Returns the address of the current owner."
133
160
  },
134
161
  "pendingOwner()": {
162
+ "custom:info": "If no ownership transfer is in progress, the pendingOwner will be `address(0).`.",
135
163
  "details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
136
164
  },
137
165
  "renounceOwnership()": {
138
- "details": "Renounce ownership of the contract in a two 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."
166
+ "custom:danger": "Leaves the contract without an owner. 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.",
167
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
168
+ "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 call is used as a confirmation and will leave the contract without an owner."
139
169
  },
140
170
  "setData(bytes32,bytes)": {
141
- "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.",
171
+ "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
172
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
142
173
  "params": {
143
174
  "dataKey": "The key to retrieve stored value",
144
175
  "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."
145
176
  }
146
177
  },
147
178
  "setDataBatch(bytes32[],bytes[])": {
148
- "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.",
179
+ "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
180
+ "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
181
+ "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.",
149
182
  "params": {
150
183
  "dataKeys": "The array of data keys for values to set",
151
184
  "dataValues": "The array of values to set"
152
185
  }
153
186
  },
154
187
  "supportsInterface(bytes4)": {
155
- "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`."
188
+ "details": "Achieves the goal of [ERC-165] to detect supported interfaces and [LSP-17-ContractExtension] by checking if the interfaceId being queried is supported on another linked extension. If the contract doesn't support the `interfaceId`, it forwards the call to the `supportsInterface` extension according to [LSP-17-ContractExtension], and checks if the extension implements the interface defined by `interfaceId`.",
189
+ "params": {
190
+ "interfaceId": "The interface ID to check if the contract supports it."
191
+ },
192
+ "returns": {
193
+ "_0": "`true` if this contract implements the interface defined by `interfaceId`, `false` otherwise."
194
+ }
156
195
  },
157
196
  "transferOwnership(address)": {
158
- "details": "same as ILSP14.transferOwnership with the additional requirement: Requirements: - when notifying the new owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferStarted')",
197
+ "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - When notifying the new owner via LSP1, the `typeId` used must be the `keccak256(...)` hash of [LSP0OwnershipTransferStarted]. - Pending owner cannot accept ownership in the same tx via the LSP1 hook.",
198
+ "details": "Initiate the process of transferring ownership of the contract by setting the new owner as the pending owner. If the new owner is a contract that supports + implements LSP1, this will also attempt to notify the new owner that ownership has been transferred to them by calling the {universalReceiver()} function on the `newOwner` contract.",
159
199
  "params": {
160
- "newOwner": "the address of the new owner."
200
+ "newOwner": "The address of the new owner."
161
201
  }
162
202
  },
163
203
  "universalReceiver(bytes32,bytes)": {
204
+ "custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
205
+ "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.",
164
206
  "params": {
165
207
  "receivedData": "The data received.",
166
208
  "typeId": "The type of call received."