@lukso/lsp-smart-contracts 0.13.0 → 0.15.0-rc.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 (300) hide show
  1. package/README.md +2 -191
  2. package/artifacts/LSP0ERC725Account.json +3 -3
  3. package/artifacts/LSP0ERC725AccountInit.json +3 -3
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateUP.json +3 -3
  7. package/artifacts/LSP1UniversalReceiverDelegateVault.json +3 -3
  8. package/artifacts/LSP23LinkedContractsFactory.json +3 -3
  9. package/artifacts/LSP4DigitalAssetMetadata.json +1 -1
  10. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +1 -1
  11. package/artifacts/LSP6KeyManager.json +3 -3
  12. package/artifacts/LSP6KeyManagerInit.json +3 -3
  13. package/artifacts/LSP7CappedSupply.json +53 -6
  14. package/artifacts/LSP7CappedSupplyInitAbstract.json +53 -6
  15. package/artifacts/LSP7DigitalAsset.json +52 -5
  16. package/artifacts/LSP7DigitalAssetInitAbstract.json +52 -5
  17. package/artifacts/LSP7Mintable.json +54 -7
  18. package/artifacts/LSP7MintableInit.json +54 -7
  19. package/artifacts/LSP8CappedSupply.json +85 -48
  20. package/artifacts/LSP8CappedSupplyInitAbstract.json +85 -48
  21. package/artifacts/LSP8IdentifiableDigitalAsset.json +85 -48
  22. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +85 -48
  23. package/artifacts/LSP8Mintable.json +88 -51
  24. package/artifacts/LSP8MintableInit.json +88 -51
  25. package/artifacts/LSP9Vault.json +3 -3
  26. package/artifacts/LSP9VaultInit.json +3 -3
  27. package/artifacts/UniversalProfile.json +3 -3
  28. package/artifacts/UniversalProfileInit.json +3 -3
  29. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +1 -17
  30. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -23
  31. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +1 -53
  32. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +1 -873
  33. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -47
  34. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +1 -49
  35. package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +1 -7
  36. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +1 -208
  37. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +4 -2
  38. package/contracts/LSP12IssuedAssets/LSP12Constants.sol +4 -0
  39. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +1 -75
  40. package/contracts/LSP14Ownable2Step/LSP14Constants.sol +1 -12
  41. package/contracts/LSP14Ownable2Step/LSP14Errors.sol +1 -29
  42. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +1 -212
  43. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +1 -417
  44. package/contracts/LSP17ContractExtension/LSP17Constants.sol +1 -14
  45. package/contracts/LSP17ContractExtension/LSP17Errors.sol +1 -14
  46. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +1 -117
  47. package/contracts/LSP17ContractExtension/LSP17Extension.sol +1 -55
  48. package/contracts/LSP17ContractExtension/LSP17Utils.sol +1 -16
  49. package/contracts/LSP17Extensions/Extension4337.sol +1 -123
  50. package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +1 -13
  51. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +1 -37
  52. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +1 -21
  53. package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -11
  54. package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +1 -7
  55. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +1 -292
  56. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +1 -217
  57. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +1 -84
  58. package/contracts/LSP20CallVerification/ILSP20CallVerifier.sol +1 -36
  59. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +1 -117
  60. package/contracts/LSP20CallVerification/LSP20Constants.sol +1 -14
  61. package/contracts/LSP20CallVerification/LSP20Errors.sol +1 -18
  62. package/contracts/LSP23LinkedContractsFactory/ILSP23LinkedContractsFactory.sol +1 -189
  63. package/contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol +1 -15
  64. package/contracts/LSP23LinkedContractsFactory/LSP23Errors.sol +1 -21
  65. package/contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol +1 -393
  66. package/contracts/LSP23LinkedContractsFactory/modules/README.md +23 -0
  67. package/contracts/LSP23LinkedContractsFactory/modules/UniversalProfileInitPostDeploymentModule.sol +1 -60
  68. package/contracts/LSP23LinkedContractsFactory/modules/UniversalProfilePostDeploymentModule.sol +1 -58
  69. package/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol +1 -65
  70. package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +1 -5
  71. package/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol +1 -14
  72. package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +1 -141
  73. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +1 -445
  74. package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -8
  75. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -31
  76. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +1 -59
  77. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol +1 -44
  78. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +1 -65
  79. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +1 -20
  80. package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +1 -7
  81. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +1 -206
  82. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +1 -60
  83. package/contracts/LSP6KeyManager/LSP6Constants.sol +1 -61
  84. package/contracts/LSP6KeyManager/LSP6Errors.sol +1 -222
  85. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +1 -23
  86. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +1 -694
  87. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +1 -29
  88. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +1 -21
  89. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +1 -411
  90. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol +1 -24
  91. package/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol +1 -27
  92. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +1 -848
  93. package/contracts/LSP6KeyManager/LSP6Utils.sol +1 -293
  94. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +1 -302
  95. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -13
  96. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +1 -193
  97. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +1 -728
  98. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +1 -189
  99. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +1 -87
  100. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +1 -23
  101. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +1 -24
  102. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +1 -80
  103. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +1 -83
  104. package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +1 -29
  105. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +1 -50
  106. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +1 -41
  107. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +1 -54
  108. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +1 -326
  109. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +1 -38
  110. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +1 -102
  111. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +1 -236
  112. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +1 -787
  113. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +1 -243
  114. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +2 -28
  115. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +2 -22
  116. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +2 -84
  117. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +2 -87
  118. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +2 -68
  119. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +2 -63
  120. package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +1 -31
  121. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +2 -59
  122. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +2 -42
  123. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +2 -61
  124. package/contracts/LSP9Vault/ILSP9Vault.sol +1 -16
  125. package/contracts/LSP9Vault/LSP9Constants.sol +1 -26
  126. package/contracts/LSP9Vault/LSP9Errors.sol +1 -6
  127. package/contracts/LSP9Vault/LSP9Vault.sol +1 -63
  128. package/contracts/LSP9Vault/LSP9VaultCore.sol +1 -684
  129. package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -33
  130. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +1 -65
  131. package/contracts/UniversalProfile.sol +1 -37
  132. package/contracts/UniversalProfileInit.sol +1 -39
  133. package/contracts/UniversalProfileInitAbstract.sol +1 -44
  134. package/dist/constants.cjs +75 -0
  135. package/dist/constants.d.cts +121 -0
  136. package/dist/constants.d.mts +121 -0
  137. package/dist/constants.d.ts +107 -40105
  138. package/dist/constants.mjs +70 -0
  139. package/package.json +58 -116
  140. package/types/@lukso/lsp0-contracts/contracts/LSP0ERC725Account.ts +694 -0
  141. package/types/@lukso/lsp0-contracts/contracts/LSP0ERC725AccountInit.ts +740 -0
  142. package/types/@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateUP.ts +139 -0
  143. package/types/@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateVault.ts +139 -0
  144. package/types/@lukso/lsp23-contracts/contracts/LSP23LinkedContractsFactory.ts +448 -0
  145. package/types/@lukso/lsp4-contracts/contracts/LSP4DigitalAssetMetadata.ts +274 -0
  146. package/types/@lukso/lsp4-contracts/contracts/LSP4DigitalAssetMetadataInitAbstract.ts +309 -0
  147. package/types/@lukso/lsp6-contracts/contracts/LSP6KeyManager.ts +355 -0
  148. package/types/@lukso/lsp6-contracts/contracts/LSP6KeyManagerInit.ts +398 -0
  149. package/types/@lukso/lsp7-contracts/contracts/LSP7DigitalAsset.ts +698 -0
  150. package/types/@lukso/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.ts +729 -0
  151. package/types/@lukso/lsp7-contracts/contracts/extensions/LSP7CappedSupply.ts +712 -0
  152. package/types/@lukso/lsp7-contracts/contracts/extensions/LSP7CappedSupplyInitAbstract.ts +743 -0
  153. package/types/@lukso/lsp7-contracts/contracts/presets/LSP7Mintable.ts +717 -0
  154. package/types/@lukso/lsp7-contracts/contracts/presets/LSP7MintableInit.ts +779 -0
  155. package/types/@lukso/lsp8-contracts/contracts/LSP8IdentifiableDigitalAsset.ts +778 -0
  156. package/types/@lukso/lsp8-contracts/contracts/LSP8IdentifiableDigitalAssetInitAbstract.ts +813 -0
  157. package/types/@lukso/lsp8-contracts/contracts/extensions/LSP8CappedSupply.ts +792 -0
  158. package/types/@lukso/lsp8-contracts/contracts/extensions/LSP8CappedSupplyInitAbstract.ts +824 -0
  159. package/types/@lukso/lsp8-contracts/contracts/presets/LSP8Mintable.ts +797 -0
  160. package/types/@lukso/lsp8-contracts/contracts/presets/LSP8MintableInit.ts +860 -0
  161. package/types/@lukso/lsp9-contracts/contracts/LSP9Vault.ts +672 -0
  162. package/types/@lukso/lsp9-contracts/contracts/LSP9VaultInit.ts +714 -0
  163. package/types/@lukso/universalprofile-contracts/contracts/UniversalProfile.ts +694 -0
  164. package/types/@lukso/universalprofile-contracts/contracts/UniversalProfileInit.ts +740 -0
  165. package/types/LSP0ERC725Account.ts +694 -0
  166. package/types/LSP0ERC725AccountInit.ts +740 -0
  167. package/types/LSP11BasicSocialRecovery.ts +596 -0
  168. package/types/LSP11BasicSocialRecoveryInit.ts +646 -0
  169. package/types/LSP1UniversalReceiverDelegateUP.ts +139 -0
  170. package/types/LSP1UniversalReceiverDelegateVault.ts +139 -0
  171. package/types/LSP23LinkedContractsFactory.ts +448 -0
  172. package/types/LSP4DigitalAssetMetadata.ts +274 -0
  173. package/types/LSP4DigitalAssetMetadataInitAbstract.ts +309 -0
  174. package/types/LSP6KeyManager.ts +355 -0
  175. package/types/LSP6KeyManagerInit.ts +398 -0
  176. package/types/LSP7CappedSupply.ts +712 -0
  177. package/types/LSP7CappedSupplyInitAbstract.ts +743 -0
  178. package/types/LSP7DigitalAsset.ts +698 -0
  179. package/types/LSP7DigitalAssetInitAbstract.ts +729 -0
  180. package/types/LSP7Mintable.ts +717 -0
  181. package/types/LSP7MintableInit.ts +779 -0
  182. package/types/LSP8CappedSupply.ts +792 -0
  183. package/types/LSP8CappedSupplyInitAbstract.ts +824 -0
  184. package/types/LSP8IdentifiableDigitalAsset.ts +778 -0
  185. package/types/LSP8IdentifiableDigitalAssetInitAbstract.ts +813 -0
  186. package/types/LSP8Mintable.ts +797 -0
  187. package/types/LSP8MintableInit.ts +860 -0
  188. package/types/LSP9Vault.ts +672 -0
  189. package/types/LSP9VaultInit.ts +714 -0
  190. package/types/UniversalProfile.ts +694 -0
  191. package/types/UniversalProfileInit.ts +740 -0
  192. package/types/common.ts +131 -0
  193. package/types/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.ts +596 -0
  194. package/types/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.ts +646 -0
  195. package/types/index.ts +58 -0
  196. package/LICENSE +0 -201
  197. package/artifacts/Create2Factory.json +0 -107
  198. package/artifacts/LSP16UniversalFactory.json +0 -271
  199. package/artifacts/LSP7CompatibleERC20.json +0 -935
  200. package/artifacts/LSP7CompatibleERC20InitAbstract.json +0 -948
  201. package/artifacts/LSP7CompatibleERC20Mintable.json +0 -989
  202. package/artifacts/LSP7CompatibleERC20MintableInit.json +0 -1009
  203. package/artifacts/LSP8CompatibleERC721.json +0 -1191
  204. package/artifacts/LSP8CompatibleERC721InitAbstract.json +0 -1204
  205. package/artifacts/LSP8CompatibleERC721Mintable.json +0 -1261
  206. package/artifacts/LSP8CompatibleERC721MintableInit.json +0 -1281
  207. package/artifacts/UniversalReceiverAddressStore.json +0 -209
  208. package/contracts/Factories/Create2Factory.sol +0 -88
  209. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +0 -260
  210. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +0 -273
  211. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +0 -37
  212. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +0 -44
  213. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +0 -43
  214. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +0 -512
  215. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +0 -514
  216. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +0 -54
  217. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +0 -47
  218. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +0 -52
  219. package/contracts/Legacy/Registries/AddressRegistry.sol +0 -52
  220. package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +0 -37
  221. package/contracts/Legacy/UniversalReceiverAddressStore.sol +0 -64
  222. package/contracts/Version.sol +0 -17
  223. package/devdocs/Create2Factory.json +0 -16
  224. package/devdocs/LSP0ERC725Account.json +0 -260
  225. package/devdocs/LSP0ERC725AccountInit.json +0 -263
  226. package/devdocs/LSP11BasicSocialRecovery.json +0 -159
  227. package/devdocs/LSP11BasicSocialRecoveryInit.json +0 -159
  228. package/devdocs/LSP16UniversalFactory.json +0 -116
  229. package/devdocs/LSP1UniversalReceiverDelegateUP.json +0 -34
  230. package/devdocs/LSP1UniversalReceiverDelegateVault.json +0 -33
  231. package/devdocs/LSP23LinkedContractsFactory.json +0 -81
  232. package/devdocs/LSP4DigitalAssetMetadata.json +0 -112
  233. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +0 -104
  234. package/devdocs/LSP6KeyManager.json +0 -305
  235. package/devdocs/LSP6KeyManagerInit.json +0 -308
  236. package/devdocs/LSP7CappedSupply.json +0 -306
  237. package/devdocs/LSP7CappedSupplyInitAbstract.json +0 -299
  238. package/devdocs/LSP7CompatibleERC20.json +0 -346
  239. package/devdocs/LSP7CompatibleERC20InitAbstract.json +0 -338
  240. package/devdocs/LSP7CompatibleERC20Mintable.json +0 -349
  241. package/devdocs/LSP7CompatibleERC20MintableInit.json +0 -352
  242. package/devdocs/LSP7DigitalAsset.json +0 -294
  243. package/devdocs/LSP7DigitalAssetInitAbstract.json +0 -285
  244. package/devdocs/LSP7Mintable.json +0 -296
  245. package/devdocs/LSP7MintableInit.json +0 -298
  246. package/devdocs/LSP8CappedSupply.json +0 -356
  247. package/devdocs/LSP8CappedSupplyInitAbstract.json +0 -349
  248. package/devdocs/LSP8CompatibleERC721.json +0 -437
  249. package/devdocs/LSP8CompatibleERC721InitAbstract.json +0 -428
  250. package/devdocs/LSP8CompatibleERC721Mintable.json +0 -446
  251. package/devdocs/LSP8CompatibleERC721MintableInit.json +0 -449
  252. package/devdocs/LSP8IdentifiableDigitalAsset.json +0 -346
  253. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -335
  254. package/devdocs/LSP8Mintable.json +0 -356
  255. package/devdocs/LSP8MintableInit.json +0 -359
  256. package/devdocs/LSP9Vault.json +0 -236
  257. package/devdocs/LSP9VaultInit.json +0 -239
  258. package/devdocs/UniversalProfile.json +0 -260
  259. package/devdocs/UniversalProfileInit.json +0 -263
  260. package/devdocs/UniversalReceiverAddressStore.json +0 -9
  261. package/dist/constants.cjs.js +0 -40758
  262. package/dist/constants.es.js +0 -40737
  263. package/userdocs/Create2Factory.json +0 -5
  264. package/userdocs/LSP0ERC725Account.json +0 -91
  265. package/userdocs/LSP0ERC725AccountInit.json +0 -94
  266. package/userdocs/LSP11BasicSocialRecovery.json +0 -29
  267. package/userdocs/LSP11BasicSocialRecoveryInit.json +0 -29
  268. package/userdocs/LSP16UniversalFactory.json +0 -30
  269. package/userdocs/LSP1UniversalReceiverDelegateUP.json +0 -19
  270. package/userdocs/LSP1UniversalReceiverDelegateVault.json +0 -19
  271. package/userdocs/LSP23LinkedContractsFactory.json +0 -29
  272. package/userdocs/LSP4DigitalAssetMetadata.json +0 -26
  273. package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +0 -23
  274. package/userdocs/LSP6KeyManager.json +0 -154
  275. package/userdocs/LSP6KeyManagerInit.json +0 -157
  276. package/userdocs/LSP7CappedSupply.json +0 -60
  277. package/userdocs/LSP7CappedSupplyInitAbstract.json +0 -57
  278. package/userdocs/LSP7CompatibleERC20.json +0 -47
  279. package/userdocs/LSP7CompatibleERC20InitAbstract.json +0 -44
  280. package/userdocs/LSP7CompatibleERC20Mintable.json +0 -47
  281. package/userdocs/LSP7CompatibleERC20MintableInit.json +0 -47
  282. package/userdocs/LSP7DigitalAsset.json +0 -47
  283. package/userdocs/LSP7DigitalAssetInitAbstract.json +0 -44
  284. package/userdocs/LSP7Mintable.json +0 -47
  285. package/userdocs/LSP7MintableInit.json +0 -47
  286. package/userdocs/LSP8CappedSupply.json +0 -66
  287. package/userdocs/LSP8CappedSupplyInitAbstract.json +0 -63
  288. package/userdocs/LSP8CompatibleERC721.json +0 -80
  289. package/userdocs/LSP8CompatibleERC721InitAbstract.json +0 -77
  290. package/userdocs/LSP8CompatibleERC721Mintable.json +0 -83
  291. package/userdocs/LSP8CompatibleERC721MintableInit.json +0 -83
  292. package/userdocs/LSP8IdentifiableDigitalAsset.json +0 -53
  293. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -50
  294. package/userdocs/LSP8Mintable.json +0 -56
  295. package/userdocs/LSP8MintableInit.json +0 -56
  296. package/userdocs/LSP9Vault.json +0 -93
  297. package/userdocs/LSP9VaultInit.json +0 -93
  298. package/userdocs/UniversalProfile.json +0 -91
  299. package/userdocs/UniversalProfileInit.json +0 -94
  300. package/userdocs/UniversalReceiverAddressStore.json +0 -5
@@ -1,32 +1,4 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.5;
3
3
 
4
- // modules
5
- import {Version} from "../Version.sol";
6
- import {LSP6KeyManagerInitAbstract} from "./LSP6KeyManagerInitAbstract.sol";
7
-
8
- /**
9
- * @title Proxy implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage
10
- * @author Fabian Vogelsteller <frozeman>, Jean Cavallera (CJ42), Yamen Merhi (YamenMerhi)
11
- * @dev All the permissions can be set on the ERC725 Account using `setData(...)` with the keys constants below
12
- */
13
- contract LSP6KeyManagerInit is LSP6KeyManagerInitAbstract, Version {
14
- /**
15
- * @notice Deploying a LSP6KeyManagerInit to be used as base contract behind proxy.
16
- * @dev Initialize (= lock) base implementation contract on deployment.
17
- */
18
- constructor() {
19
- _disableInitializers();
20
- }
21
-
22
- /**
23
- * @notice Initializing a LSP6KeyManagerInit linked to contract at address `target_`.
24
- * @dev Initialise a LSP6KeyManager and set the `target_` address in the contract storage,
25
- * making this Key Manager linked to this `target_` contract.
26
- *
27
- * @param target_ The address of the contract to control and forward calldata payloads to.
28
- */
29
- function initialize(address target_) external virtual initializer {
30
- LSP6KeyManagerInitAbstract._initialize(target_);
31
- }
32
- }
4
+ import "@lukso/lsp6-contracts/contracts/LSP6KeyManagerInit.sol";
@@ -1,24 +1,4 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.5;
3
3
 
4
- // modules
5
- import {
6
- Initializable
7
- } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
8
- import {LSP6KeyManagerCore} from "./LSP6KeyManagerCore.sol";
9
- import {InvalidLSP6Target} from "./LSP6Errors.sol";
10
-
11
- /**
12
- * @title Proxy implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage
13
- * @author Fabian Vogelsteller <frozeman>, Jean Cavallera (CJ42), Yamen Merhi (YamenMerhi)
14
- * @dev All the permissions can be set on the ERC725 Account using `setData(...)` with the keys constants below
15
- */
16
- abstract contract LSP6KeyManagerInitAbstract is
17
- Initializable,
18
- LSP6KeyManagerCore
19
- {
20
- function _initialize(address target_) internal virtual onlyInitializing {
21
- if (target_ == address(0)) revert InvalidLSP6Target();
22
- _target = target_;
23
- }
24
- }
4
+ import "@lukso/lsp6-contracts/contracts/LSP6KeyManagerInitAbstract.sol";
@@ -1,414 +1,4 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.5;
3
3
 
4
- // modules
5
- import {ERC725Y} from "@erc725/smart-contracts/contracts/ERC725Y.sol";
6
-
7
- // libraries
8
- import {LSP6Utils} from "../LSP6Utils.sol";
9
- import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol";
10
- import {
11
- ERC165Checker
12
- } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
13
-
14
- // constants
15
- import {
16
- _PERMISSION_TRANSFERVALUE,
17
- _PERMISSION_SUPER_TRANSFERVALUE,
18
- _PERMISSION_DEPLOY,
19
- _PERMISSION_CALL,
20
- _PERMISSION_SUPER_CALL,
21
- _PERMISSION_STATICCALL,
22
- _PERMISSION_SUPER_STATICCALL,
23
- _ALLOWEDCALLS_TRANSFERVALUE,
24
- _ALLOWEDCALLS_CALL,
25
- _ALLOWEDCALLS_STATICCALL,
26
- _ALLOWEDCALLS_DELEGATECALL
27
- } from "../LSP6Constants.sol";
28
- import {
29
- OPERATION_0_CALL,
30
- OPERATION_1_CREATE,
31
- OPERATION_2_CREATE2,
32
- OPERATION_3_STATICCALL,
33
- OPERATION_4_DELEGATECALL
34
- } from "@erc725/smart-contracts/contracts/constants.sol";
35
-
36
- // errors
37
- import {
38
- DelegateCallDisallowedViaKeyManager,
39
- NoCallsAllowed,
40
- NotAllowedCall,
41
- InvalidEncodedAllowedCalls,
42
- InvalidWhitelistedCall,
43
- NotAuthorised,
44
- CallingKeyManagerNotAllowed
45
- } from "../LSP6Errors.sol";
46
-
47
- abstract contract LSP6ExecuteModule {
48
- using ERC165Checker for address;
49
- using LSP6Utils for *;
50
-
51
- /**
52
- * @dev verify if `controllerAddress` has the required permissions to interact with other addresses using the controlledContract.
53
- * @param controlledContract the address of the ERC725 contract where the payload is executed and where the permissions are verified.
54
- * @param controller the address who want to run the execute function on the ERC725Account.
55
- * @param permissions the permissions of the controller address.
56
- */
57
- function _verifyCanExecute(
58
- address controlledContract,
59
- address controller,
60
- bytes32 permissions,
61
- uint256 operationType,
62
- address to,
63
- uint256 value,
64
- bytes memory data
65
- ) internal view virtual {
66
- // if to is the KeyManager address revert
67
- if (to == address(this)) {
68
- revert CallingKeyManagerNotAllowed();
69
- }
70
-
71
- // Future versions of the KeyManager willing to allow LSP0 to call the KeyManager
72
- // may need to implement this check to avoid inconsistent state of reentrancy
73
- // that may lead to lock the use of the KeyManager
74
-
75
- // Check to restrict controllers with execute permissions to call lsp20 functions
76
- // to avoid setting the reentrancy guard to a non-valid state
77
-
78
- // if (data.length >= 4 && to == address(this)) {
79
- // if (
80
- // bytes4(data) == ILSP20.lsp20VerifyCall.selector ||
81
- // bytes4(data) == ILSP20.lsp20VerifyCallResult.selector
82
- // ) {
83
- // revert CallingLSP20FunctionsOnLSP6NotAllowed();
84
- // }
85
- // }
86
-
87
- // if it is a message call
88
- if (operationType == OPERATION_0_CALL) {
89
- return
90
- _verifyCanCall(
91
- controlledContract,
92
- controller,
93
- permissions,
94
- to,
95
- value,
96
- data
97
- );
98
- }
99
-
100
- // if it is a contract creation
101
- if (
102
- operationType == OPERATION_1_CREATE ||
103
- operationType == OPERATION_2_CREATE2
104
- ) {
105
- // required to check for permission TRANSFERVALUE if we are funding
106
- // the contract on deployment via a payable constructor
107
- bool isFundingContract = value != 0;
108
-
109
- return
110
- _verifyCanDeployContract(
111
- controller,
112
- permissions,
113
- isFundingContract
114
- );
115
- }
116
-
117
- // if it is a STATICALL
118
- // we do not check for TRANSFERVALUE permission,
119
- // as ERC725X will revert if a value is provided with operation type STATICCALL.
120
- if (operationType == OPERATION_3_STATICCALL) {
121
- return
122
- _verifyCanStaticCall(
123
- controlledContract,
124
- controller,
125
- permissions,
126
- to,
127
- value,
128
- data
129
- );
130
- }
131
-
132
- // DELEGATECALL is disallowed by default on the Key Manager.
133
- if (operationType == OPERATION_4_DELEGATECALL) {
134
- revert DelegateCallDisallowedViaKeyManager();
135
- }
136
- }
137
-
138
- function _verifyCanDeployContract(
139
- address controller,
140
- bytes32 permissions,
141
- bool isFundingContract
142
- ) internal view virtual {
143
- _requirePermissions(controller, permissions, _PERMISSION_DEPLOY);
144
-
145
- bool hasSuperTransferValue = permissions.hasPermission(
146
- _PERMISSION_SUPER_TRANSFERVALUE
147
- );
148
-
149
- // CHECK if we are funding the contract
150
- if (isFundingContract && !hasSuperTransferValue) {
151
- revert NotAuthorised(controller, "SUPER_TRANSFERVALUE");
152
- }
153
- }
154
-
155
- function _verifyCanStaticCall(
156
- address controlledContract,
157
- address controller,
158
- bytes32 permissions,
159
- address to,
160
- uint256 value,
161
- bytes memory data
162
- ) internal view virtual {
163
- bool hasSuperStaticCall = permissions.hasPermission(
164
- _PERMISSION_SUPER_STATICCALL
165
- );
166
-
167
- // Skip if caller has SUPER permission for static calls
168
- if (hasSuperStaticCall) return;
169
-
170
- _requirePermissions(controller, permissions, _PERMISSION_STATICCALL);
171
-
172
- _verifyAllowedCall(
173
- controlledContract,
174
- controller,
175
- OPERATION_3_STATICCALL,
176
- to,
177
- value,
178
- data
179
- );
180
- }
181
-
182
- function _verifyCanCall(
183
- address controlledContract,
184
- address controller,
185
- bytes32 permissions,
186
- address to,
187
- uint256 value,
188
- bytes memory data
189
- ) internal view virtual {
190
- bool isValueTransfer = value != 0;
191
-
192
- bool hasSuperTransferValue = permissions.hasPermission(
193
- _PERMISSION_SUPER_TRANSFERVALUE
194
- );
195
-
196
- bool isEmptyCall = data.length == 0;
197
-
198
- bool hasSuperCall = permissions.hasPermission(_PERMISSION_SUPER_CALL);
199
-
200
- if (isValueTransfer && !hasSuperTransferValue) {
201
- _requirePermissions(
202
- controller,
203
- permissions,
204
- _PERMISSION_TRANSFERVALUE
205
- );
206
- }
207
-
208
- // CHECK if we are doing an empty call, as the receive() or fallback() function
209
- // of the controlledContract could run some code.
210
- if (isEmptyCall && !isValueTransfer && !hasSuperCall) {
211
- _requirePermissions(controller, permissions, _PERMISSION_CALL);
212
- }
213
-
214
- if (!isEmptyCall && !hasSuperCall) {
215
- _requirePermissions(controller, permissions, _PERMISSION_CALL);
216
- }
217
-
218
- // Skip if caller has SUPER permissions for external calls, with or without calldata (empty calls)
219
- if (!isValueTransfer && hasSuperCall) return;
220
-
221
- // Skip if caller has SUPER permission for value transfers
222
- if (isEmptyCall && isValueTransfer && hasSuperTransferValue) return;
223
-
224
- // Skip if both SUPER permissions are present
225
- if (hasSuperCall && hasSuperTransferValue) return;
226
-
227
- _verifyAllowedCall(
228
- controlledContract,
229
- controller,
230
- OPERATION_0_CALL,
231
- to,
232
- value,
233
- data
234
- );
235
- }
236
-
237
- function _verifyAllowedCall(
238
- address controlledContract,
239
- address controllerAddress,
240
- uint256 operationType,
241
- address to,
242
- uint256 value,
243
- bytes memory data
244
- ) internal view virtual {
245
- // CHECK for ALLOWED CALLS
246
- bytes memory allowedCalls = ERC725Y(controlledContract)
247
- .getAllowedCallsFor(controllerAddress);
248
-
249
- if (allowedCalls.length == 0) {
250
- revert NoCallsAllowed(controllerAddress);
251
- }
252
-
253
- bytes4 requiredCallTypes = _extractCallType(operationType, value, data);
254
-
255
- for (uint256 ii; ii < allowedCalls.length; ii += 34) {
256
- /// @dev structure of an AllowedCall
257
- //
258
- /// AllowedCall = 0x00200000000ncafecafecafecafecafecafecafecafecafecafe5a5a5a5af1f1f1f1
259
- ///
260
- /// 0020 = hex for '32' bytes long
261
- /// 0000000n = call type(s)
262
- /// cafecafecafecafecafecafecafecafecafecafe = address
263
- /// 5a5a5a5a = standard
264
- /// f1f1f1f1 = function
265
-
266
- // CHECK that we can extract an AllowedCall
267
- if (ii + 34 > allowedCalls.length) {
268
- revert InvalidEncodedAllowedCalls(allowedCalls);
269
- }
270
-
271
- // extract one AllowedCall at a time
272
- bytes memory allowedCall = BytesLib.slice(allowedCalls, ii + 2, 32);
273
-
274
- // 0xxxxxxxxxffffffffffffffffffffffffffffffffffffffffffffffffffffffff
275
- // (excluding the callTypes) not allowed
276
- // as equivalent to whitelisting any call (= SUPER permission)
277
- if (
278
- bytes28(bytes32(allowedCall) << 32) ==
279
- bytes28(type(uint224).max)
280
- ) {
281
- revert InvalidWhitelistedCall(controllerAddress);
282
- }
283
-
284
- if (
285
- _isAllowedCallType(allowedCall, requiredCallTypes) &&
286
- _isAllowedAddress(allowedCall, to) &&
287
- _isAllowedStandard(allowedCall, to) &&
288
- _isAllowedFunction(allowedCall, data)
289
- ) return;
290
- }
291
-
292
- revert NotAllowedCall(controllerAddress, to, bytes4(data));
293
- }
294
-
295
- /**
296
- * @dev extract the bytes4 representation of a single bit for the type of call according to the `operationType`
297
- * @param operationType 0 = CALL, 3 = STATICCALL or 3 = DELEGATECALL
298
- * @return requiredCallTypes a bytes4 value containing a single 1 bit for the callType
299
- */
300
- function _extractCallType(
301
- uint256 operationType,
302
- uint256 value,
303
- bytes memory data
304
- ) internal pure returns (bytes4 requiredCallTypes) {
305
- // if there is value being transferred, add the extra bit
306
- // for the first bit for Value Transfer in the `requiredCallTypes`
307
- if (value != 0) {
308
- requiredCallTypes |= _ALLOWEDCALLS_TRANSFERVALUE;
309
- }
310
-
311
- bool isCallDataPresent = data.length != 0;
312
- bool isEmptyCallWithoutValue = !isCallDataPresent && value == 0;
313
-
314
- // if we are doing a message call with some data
315
- // or if we are doing an empty call without value
316
- if (isCallDataPresent || isEmptyCallWithoutValue) {
317
- if (operationType == OPERATION_0_CALL) {
318
- requiredCallTypes |= _ALLOWEDCALLS_CALL;
319
- } else if (operationType == OPERATION_3_STATICCALL) {
320
- requiredCallTypes |= _ALLOWEDCALLS_STATICCALL;
321
- } else if (operationType == OPERATION_4_DELEGATECALL) {
322
- requiredCallTypes |= _ALLOWEDCALLS_DELEGATECALL;
323
- }
324
- }
325
- }
326
-
327
- function _isAllowedAddress(
328
- bytes memory allowedCall,
329
- address to
330
- ) internal pure virtual returns (bool) {
331
- // <offset> = 4 bytes x 8 bits = 32 bits
332
- //
333
- // <offset>v----------------address---------------v
334
- // 0000000ncafecafecafecafecafecafecafecafecafecafe5a5a5a5af1f1f1f1
335
- address allowedAddress = address(bytes20(bytes32(allowedCall) << 32));
336
-
337
- // ANY address = 0xffffffffffffffffffffffffffffffffffffffff
338
- return
339
- allowedAddress == address(bytes20(type(uint160).max)) ||
340
- to == allowedAddress;
341
- }
342
-
343
- function _isAllowedStandard(
344
- bytes memory allowedCall,
345
- address to
346
- ) internal view virtual returns (bool) {
347
- // <offset> = 24 bytes x 8 bits = 192 bits
348
- //
349
- // standard
350
- // <----------------<offset>---------------------->v------v
351
- // 0000000ncafecafecafecafecafecafecafecafecafecafe5a5a5a5af1f1f1f1
352
- bytes4 allowedStandard = bytes4(bytes32(allowedCall) << 192);
353
-
354
- // ANY Standard = 0xffffffff
355
- return
356
- allowedStandard == bytes4(type(uint32).max) ||
357
- to.supportsERC165InterfaceUnchecked(allowedStandard);
358
- }
359
-
360
- function _isAllowedFunction(
361
- bytes memory allowedCall,
362
- bytes memory data
363
- ) internal pure virtual returns (bool) {
364
- // <offset> = 28 bytes x 8 bits = 224 bits
365
- //
366
- // function
367
- // <------------------------<offset>---------------------->v------v
368
- // 0000000ncafecafecafecafecafecafecafecafecafecafe5a5a5a5af1f1f1f1
369
- bytes4 allowedFunction = bytes4(bytes32(allowedCall) << 224);
370
-
371
- bool isFunctionCall = data.length >= 4;
372
-
373
- bytes4 requiredFunction = bytes4(data);
374
-
375
- // ANY function = 0xffffffff
376
- return
377
- allowedFunction == bytes4(type(uint32).max) ||
378
- (isFunctionCall && (requiredFunction == allowedFunction));
379
- }
380
-
381
- function _isAllowedCallType(
382
- bytes memory allowedCall,
383
- bytes4 requiredCallTypes
384
- ) internal pure virtual returns (bool) {
385
- // extract callType
386
- //
387
- // <offset> = 0
388
- //
389
- // callType
390
- // v------v
391
- // 0000000ncafecafecafecafecafecafecafecafecafecafe5a5a5a5af1f1f1f1
392
- bytes4 allowedCallType = bytes4(allowedCall);
393
- return (allowedCallType & requiredCallTypes == requiredCallTypes);
394
- }
395
-
396
- /**
397
- * @dev revert if `controller`'s `addressPermissions` doesn't contain `permissionsRequired`
398
- * @param controller the caller address
399
- * @param addressPermissions the caller's permissions BitArray
400
- * @param permissionRequired the required permission
401
- */
402
- function _requirePermissions(
403
- address controller,
404
- bytes32 addressPermissions,
405
- bytes32 permissionRequired
406
- ) internal pure virtual {
407
- if (!LSP6Utils.hasPermission(addressPermissions, permissionRequired)) {
408
- string memory permissionErrorString = LSP6Utils.getPermissionName(
409
- permissionRequired
410
- );
411
- revert NotAuthorised(controller, permissionErrorString);
412
- }
413
- }
414
- }
4
+ import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6ExecuteModule.sol";
@@ -1,27 +1,4 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.5;
3
3
 
4
- // libraries
5
- import {LSP6Utils} from "../LSP6Utils.sol";
6
-
7
- // constants
8
- import {_PERMISSION_EXECUTE_RELAY_CALL} from "../LSP6Constants.sol";
9
-
10
- // errors
11
- import {NotAuthorised} from "../LSP6Errors.sol";
12
-
13
- abstract contract LSP6ExecuteRelayCallModule {
14
- function _verifyExecuteRelayCallPermission(
15
- address controllerAddress,
16
- bytes32 controllerPermissions
17
- ) internal pure {
18
- if (
19
- !LSP6Utils.hasPermission(
20
- controllerPermissions,
21
- _PERMISSION_EXECUTE_RELAY_CALL
22
- )
23
- ) {
24
- revert NotAuthorised(controllerAddress, "EXECUTE_RELAY_CALL");
25
- }
26
- }
27
- }
4
+ import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6ExecuteRelayCallModule.sol";
@@ -1,30 +1,4 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.5;
3
3
 
4
- // libraries
5
- import {LSP6Utils} from "../LSP6Utils.sol";
6
-
7
- // constants
8
- import {_PERMISSION_CHANGEOWNER} from "../LSP6Constants.sol";
9
-
10
- // errors
11
- import {NotAuthorised} from "../LSP6Errors.sol";
12
-
13
- abstract contract LSP6OwnershipModule {
14
- function _verifyOwnershipPermissions(
15
- address controllerAddress,
16
- bytes32 controllerPermissions
17
- ) internal pure {
18
- if (
19
- !LSP6Utils.hasPermission(
20
- controllerPermissions,
21
- _PERMISSION_CHANGEOWNER
22
- )
23
- ) {
24
- string memory permissionErrorString = LSP6Utils.getPermissionName(
25
- _PERMISSION_CHANGEOWNER
26
- );
27
- revert NotAuthorised(controllerAddress, permissionErrorString);
28
- }
29
- }
30
- }
4
+ import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6OwnershipModule.sol";