@lukso/lsp-smart-contracts 0.6.2 → 0.8.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 (175) hide show
  1. package/CONTRIBUTING.md +31 -0
  2. package/README.md +73 -28
  3. package/artifacts/Create2Factory.json +2 -2
  4. package/artifacts/LSP0ERC725Account.json +227 -15
  5. package/artifacts/LSP0ERC725AccountInit.json +227 -41
  6. package/artifacts/LSP11BasicSocialRecovery.json +493 -0
  7. package/artifacts/LSP11BasicSocialRecoveryInit.json +513 -0
  8. package/artifacts/LSP16UniversalFactory.json +236 -0
  9. package/artifacts/LSP1UniversalReceiverDelegateUP.json +134 -15
  10. package/artifacts/LSP1UniversalReceiverDelegateVault.json +80 -15
  11. package/artifacts/LSP4Compatibility.json +22 -0
  12. package/artifacts/LSP4DigitalAssetMetadata.json +22 -0
  13. package/artifacts/{LSP4DigitalAssetMetadataInit.json → LSP4DigitalAssetMetadataInitAbstract.json} +24 -51
  14. package/artifacts/LSP6KeyManager.json +188 -33
  15. package/artifacts/LSP6KeyManagerInit.json +188 -33
  16. package/artifacts/LSP7CappedSupply.json +58 -31
  17. package/artifacts/{LSP7CappedSupplyInit.json → LSP7CappedSupplyInitAbstract.json} +60 -72
  18. package/artifacts/LSP7CompatibleERC20.json +52 -46
  19. package/artifacts/LSP7CompatibleERC20InitAbstract.json +733 -0
  20. package/artifacts/LSP7CompatibleERC20Mintable.json +61 -34
  21. package/artifacts/LSP7CompatibleERC20MintableInit.json +66 -60
  22. package/artifacts/LSP7DigitalAsset.json +52 -51
  23. package/artifacts/LSP7DigitalAssetInitAbstract.json +556 -0
  24. package/artifacts/LSP7Mintable.json +62 -35
  25. package/artifacts/LSP7MintableInit.json +62 -61
  26. package/artifacts/LSP8CappedSupply.json +64 -5
  27. package/artifacts/LSP8CappedSupplyInitAbstract.json +667 -0
  28. package/artifacts/LSP8CompatibleERC721.json +102 -21
  29. package/artifacts/LSP8CompatibleERC721InitAbstract.json +936 -0
  30. package/artifacts/LSP8CompatibleERC721Mintable.json +111 -9
  31. package/artifacts/LSP8CompatibleERC721MintableInit.json +116 -35
  32. package/artifacts/LSP8IdentifiableDigitalAsset.json +58 -20
  33. package/artifacts/{LSP8CappedSupplyInit.json → LSP8IdentifiableDigitalAssetInitAbstract.json} +62 -65
  34. package/artifacts/LSP8Mintable.json +67 -8
  35. package/artifacts/LSP8MintableInit.json +67 -34
  36. package/artifacts/LSP9Vault.json +235 -17
  37. package/artifacts/LSP9VaultInit.json +235 -43
  38. package/artifacts/UniversalProfile.json +227 -15
  39. package/artifacts/UniversalProfileInit.json +227 -41
  40. package/artifacts/UniversalReceiverAddressStore.json +3 -3
  41. package/constants.js +416 -95
  42. package/contracts/Custom/EIP191Signer.sol +12 -0
  43. package/contracts/Factories/Create2Factory.sol +1 -3
  44. package/contracts/LSP0ERC725Account/LSP0Constants.sol +13 -2
  45. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +2 -1
  46. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +274 -74
  47. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +2 -2
  48. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +3 -2
  49. package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +4 -4
  50. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +214 -0
  51. package/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol +177 -0
  52. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol +23 -0
  53. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +258 -0
  54. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +26 -0
  55. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol +19 -0
  56. package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +6 -0
  57. package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +60 -0
  58. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +53 -0
  59. package/contracts/LSP14Ownable2Step/LSP14Constants.sol +15 -0
  60. package/contracts/LSP14Ownable2Step/LSP14Errors.sol +12 -0
  61. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +212 -0
  62. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +246 -0
  63. package/contracts/LSP17ContractExtension/LSP17Constants.sol +17 -0
  64. package/contracts/LSP17ContractExtension/LSP17Errors.sol +7 -0
  65. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +104 -0
  66. package/contracts/LSP17ContractExtension/LSP17Extension.sol +45 -0
  67. package/contracts/LSP17ContractExtension/LSP17Utils.sol +20 -0
  68. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +5 -5
  69. package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +5 -3
  70. package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +21 -0
  71. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +156 -42
  72. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +64 -31
  73. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +54 -41
  74. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +136 -28
  75. package/contracts/LSP3UniversalProfile/LSP3Constants.sol +1 -1
  76. package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +1 -1
  77. package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +1 -1
  78. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
  79. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +16 -7
  80. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +16 -7
  81. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +3 -3
  82. package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +4 -4
  83. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +103 -115
  84. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +26 -8
  85. package/contracts/LSP6KeyManager/LSP6Constants.sol +45 -45
  86. package/contracts/LSP6KeyManager/LSP6Errors.sol +97 -20
  87. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +3 -2
  88. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +786 -359
  89. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +2 -2
  90. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +4 -3
  91. package/contracts/LSP6KeyManager/LSP6Utils.sol +127 -35
  92. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +26 -13
  93. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +6 -6
  94. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +5 -5
  95. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +65 -52
  96. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +3 -3
  97. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +30 -1
  98. package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +1 -1
  99. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +24 -0
  100. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +28 -8
  101. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +28 -11
  102. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +87 -20
  103. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +97 -19
  104. package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
  105. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +3 -4
  106. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +9 -2
  107. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +3 -3
  108. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +12 -12
  109. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +5 -5
  110. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +11 -10
  111. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +10 -8
  112. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +11 -11
  113. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +45 -1
  114. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +3 -3
  115. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +75 -71
  116. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +1 -1
  117. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +20 -3
  118. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +20 -0
  119. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +27 -7
  120. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +27 -10
  121. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +236 -30
  122. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +240 -30
  123. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +49 -0
  124. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +51 -0
  125. package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
  126. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +3 -4
  127. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +9 -2
  128. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +3 -3
  129. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +9 -8
  130. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +2 -2
  131. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +8 -7
  132. package/contracts/LSP9Vault/LSP9Constants.sol +11 -8
  133. package/contracts/LSP9Vault/LSP9Errors.sol +8 -0
  134. package/contracts/LSP9Vault/LSP9Vault.sol +6 -4
  135. package/contracts/LSP9Vault/LSP9VaultCore.sol +324 -90
  136. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -2
  137. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +5 -4
  138. package/contracts/Legacy/Registries/AddressRegistry.sol +1 -1
  139. package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +1 -1
  140. package/contracts/Legacy/UniversalReceiverAddressStore.sol +4 -13
  141. package/contracts/UniversalProfile.sol +2 -2
  142. package/contracts/UniversalProfileInit.sol +2 -2
  143. package/contracts/UniversalProfileInitAbstract.sol +1 -1
  144. package/contracts/Utils/GasLib.sol +17 -0
  145. package/package.json +37 -32
  146. package/artifacts/LSP7CompatibleERC20Init.json +0 -760
  147. package/artifacts/LSP7DigitalAssetInit.json +0 -588
  148. package/artifacts/LSP8CompatibleERC721Init.json +0 -883
  149. package/artifacts/LSP8IdentifiableDigitalAssetInit.json +0 -639
  150. package/artifacts/UniversalFactory.json +0 -127
  151. package/contracts/Custom/ClaimOwnership.sol +0 -34
  152. package/contracts/Custom/ERC165Checker.sol +0 -130
  153. package/contracts/Custom/IClaimOwnership.sol +0 -10
  154. package/contracts/Factories/UniversalFactory.sol +0 -164
  155. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +0 -24
  156. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/Handling/TokenAndVaultHandling.sol +0 -85
  157. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +0 -76
  158. package/contracts/LSP2ERC725YJSONSchema/LSP2Errors.sol +0 -9
  159. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInit.sol +0 -26
  160. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +0 -39
  161. package/contracts/LSP7DigitalAsset/extensions/ILSP7CappedSupply.sol +0 -17
  162. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +0 -57
  163. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInit.sol +0 -19
  164. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Core.sol +0 -112
  165. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Init.sol +0 -29
  166. package/contracts/LSP7DigitalAsset/presets/LSP7MintableCore.sol +0 -26
  167. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +0 -35
  168. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CappedSupply.sol +0 -17
  169. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyCore.sol +0 -58
  170. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInit.sol +0 -19
  171. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleConstants.sol +0 -6
  172. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721Core.sol +0 -187
  173. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721Init.sol +0 -25
  174. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableCore.sol +0 -26
  175. package/contracts/Utils/UtilsLib.sol +0 -31
package/constants.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  // ERC165
7
- // ----------
7
+ // ---------
8
8
 
9
9
  const INTERFACE_IDS = {
10
10
  ERC165: '0x01ffc9a7',
@@ -15,16 +15,18 @@ const INTERFACE_IDS = {
15
15
  ERC721Metadata: '0x5b5e139f',
16
16
  ERC777: '0xe58e113c',
17
17
  ERC1155: '0xd9b67a26',
18
- ERC725X: '0x44c028fe',
18
+ ERC725X: '0x570ef073',
19
19
  ERC725Y: '0x714df77c',
20
- LSP0ERC725Account: '0x9a3bfe88',
20
+ LSP0ERC725Account: '0x66767497',
21
21
  LSP1UniversalReceiver: '0x6bb56a14',
22
- LSP1UniversalReceiverDelegate: '0xa245bbda',
23
- LSP6KeyManager: '0xc403d48f',
24
- LSP7DigitalAsset: '0xe33f65c3',
25
- LSP8IdentifiableDigitalAsset: '0x49399145',
26
- LSP9Vault: '0x8c1d44f6',
27
- ClaimOwnership: '0xd225f160',
22
+ LSP6KeyManager: '0xfb437414',
23
+ LSP7DigitalAsset: '0xda1f85e4',
24
+ LSP8IdentifiableDigitalAsset: '0x622e7a01',
25
+ LSP9Vault: '0x7050cee9',
26
+ LSP11BasicSocialRecovery: '0x049a28f1',
27
+ LSP14Ownable2Step: '0x94be5999',
28
+ LSP17Extendable: '0xa918fa6b',
29
+ LSP17Extension: '0xcee78b40',
28
30
  };
29
31
 
30
32
  // ERC1271
@@ -68,34 +70,46 @@ const SupportedStandards = {
68
70
  * For more infos on the type of each keys
69
71
  * @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
70
72
  */
71
- const ERC725YKeys = {
72
- LSP0: {
73
+ const ERC725YDataKeys = {
74
+ LSP1: {
75
+ // bytes10(keccak256('LSP1UniversalReceiverDelegate')) + bytes2(0)
76
+ LSP1UniversalReceiverDelegatePrefix: '0x0cfc51aec37c55a4d0b10000',
77
+
73
78
  // keccak256('LSP1UniversalReceiverDelegate')
74
79
  LSP1UniversalReceiverDelegate:
75
80
  '0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
76
81
  },
77
82
  LSP3: {
83
+ SupportedStandards_LSP3: SupportedStandards.LSP3UniversalProfile.key,
84
+
78
85
  // keccak256('LSP3Profile')
79
86
  LSP3Profile: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
80
87
  },
81
88
  LSP4: {
89
+ SupportedStandards_LSP4: SupportedStandards.LSP4DigitalAsset.key,
90
+
82
91
  // keccak256('LSP4TokenName')
83
92
  LSP4TokenName: '0xdeba1e292f8ba88238e10ab3c7f88bd4be4fac56cad5194b6ecceaf653468af1',
93
+
84
94
  // keccak256('LSP4TokenSymbol')
85
95
  LSP4TokenSymbol: '0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756',
96
+
86
97
  // keccak256('LSP4Metadata')
87
98
  LSP4Metadata: '0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e',
99
+
100
+ // LSP4CreatorsMap:<address> + bytes2(0)
101
+ LSP4CreatorsMap: '0x6de85eaf5d982b4e5da00000',
102
+
88
103
  // keccak256('"LSP4Creators[]')
89
104
  'LSP4Creators[]': {
90
- // use this key to get the number of elements in the array
91
105
  length: '0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7',
92
- // use this key + bytes16(index) to access an index in the array
93
106
  index: '0x114bd03b3a46d48759680d81ebb2b414',
94
107
  },
95
108
  },
96
109
  LSP5: {
97
- // LSP5ReceivedAssetsMap:<address>
110
+ // LSP5ReceivedAssetsMap:<address> + bytes2(0)
98
111
  LSP5ReceivedAssetsMap: '0x812c4334633eb816c80d0000',
112
+
99
113
  // keccak256('LSP5ReceivedAssets[]')
100
114
  'LSP5ReceivedAssets[]': {
101
115
  length: '0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b',
@@ -108,20 +122,25 @@ const ERC725YKeys = {
108
122
  length: '0xdf30dba06db6a30e65354d9a64c609861f089545ca58c6b4dbe31a5f338cb0e3',
109
123
  index: '0xdf30dba06db6a30e65354d9a64c60986',
110
124
  },
111
- // AddressPermissions:Permissions:<address>
125
+
126
+ AddressPermissionsPrefix: '0x4b80742de2bf',
127
+
128
+ // AddressPermissions:Permissions:<address> + bytes2(0)
112
129
  'AddressPermissions:Permissions': '0x4b80742de2bf82acb3630000',
113
- // AddressPermissions:AllowedAddresses:<address>
114
- 'AddressPermissions:AllowedAddresses': '0x4b80742de2bfc6dd6b3c0000',
115
- // AddressPermissions:AllowedFunctions:<address>
116
- 'AddressPermissions:AllowedFunctions': '0x4b80742de2bf8efea1e80000',
117
- // AddressPermissions:AllowedStandards:<address>
118
- 'AddressPermissions:AllowedStandards': '0x4b80742de2bf3efa94a30000',
119
- // AddressPermissions:AllowedERC725YKeys:<address>
120
- 'AddressPermissions:AllowedERC725YKeys': '0x4b80742de2bf90b8b4850000',
130
+
131
+ // AddressPermissions:AllowedERC725YDataKeys:<address> + bytes2(0)
132
+ 'AddressPermissions:AllowedERC725YDataKeys': '0x4b80742de2bf866c29110000',
133
+
134
+ // AddressPermissions:AllowedCalls:<address> + bytes2(0)
135
+ 'AddressPermissions:AllowedCalls': '0x4b80742de2bf393a64c70000',
136
+ },
137
+ LSP9: {
138
+ SupportedStandards_LSP9: SupportedStandards.LSP9Vault.key,
121
139
  },
122
140
  LSP10: {
123
- // keccak256('LSP10VaultsMap')
141
+ // keccak256('LSP10VaultsMap') + bytes2(0)
124
142
  LSP10VaultsMap: '0x192448c3c0f88c7f238c0000',
143
+
125
144
  // keccak256('LSP10Vaults[]')
126
145
  'LSP10Vaults[]': {
127
146
  length: '0x55482936e01da86729a45d2b87a6b1d3bc582bea0ec00e38bdb340e3af6f9f06',
@@ -129,34 +148,39 @@ const ERC725YKeys = {
129
148
  },
130
149
  },
131
150
  LSP12: {
132
- // LSP12IssuedAssetsMap:<address>
151
+ // LSP12IssuedAssetsMap:<address> + bytes2(0)
133
152
  LSP12IssuedAssetsMap: '0x74ac2555c10b9349e78f0000',
153
+
134
154
  // keccak256('LSP12IssuedAssets[]')
135
155
  'LSP12IssuedAssets[]': {
136
156
  length: '0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd',
137
157
  index: '0x7c8c3416d6cda87cd42c71ea1843df28',
138
158
  },
139
159
  },
160
+ LSP17: {
161
+ // bytes10(keccak256('LSP17Extension')) + bytes2(0)
162
+ LSP17ExtensionPrefix: '0xcee78b4094da860110960000',
163
+ },
140
164
  };
141
165
 
142
166
  const BasicUPSetup_Schema = [
143
167
  {
144
168
  name: 'LSP3Profile',
145
- key: ERC725YKeys.LSP3['LSP3Profile'],
169
+ key: ERC725YDataKeys.LSP3['LSP3Profile'],
146
170
  keyType: 'Singleton',
147
171
  valueContent: 'JSONURL',
148
172
  valueType: 'bytes',
149
173
  },
150
174
  {
151
175
  name: 'LSP1UniversalReceiverDelegate',
152
- key: ERC725YKeys.LSP0['LSP1UniversalReceiverDelegate'],
176
+ key: ERC725YDataKeys.LSP1.LSP1UniversalReceiverDelegate,
153
177
  keyType: 'Singleton',
154
178
  valueContent: 'Address',
155
179
  valueType: 'address',
156
180
  },
157
181
  {
158
182
  name: 'LSP12IssuedAssets[]',
159
- key: ERC725YKeys.LSP12['LSP12IssuedAssets[]'].length,
183
+ key: ERC725YDataKeys.LSP12['LSP12IssuedAssets[]'].length,
160
184
  keyType: 'Array',
161
185
  valueContent: 'Number',
162
186
  valueType: 'uint256',
@@ -166,50 +190,105 @@ const BasicUPSetup_Schema = [
166
190
  // LSP6
167
191
  // ----------
168
192
 
169
- // All Permissions currently exclude DELEGATECALL for security
170
- const ALL_PERMISSIONS = '0x0000000000000000000000000000000000000000000000000000000000007fbf';
193
+ const LSP6_VERSION = 6;
194
+
195
+ // All Permissions currently exclude REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security
196
+ const ALL_PERMISSIONS = '0x00000000000000000000000000000000000000000000000000000000003f3f7f';
171
197
 
172
198
  // prettier-ignore
173
199
  const PERMISSIONS = {
174
- CHANGEOWNER: "0x0000000000000000000000000000000000000000000000000000000000000001", // .... .... .... 0001
175
- CHANGEPERMISSIONS: "0x0000000000000000000000000000000000000000000000000000000000000002", // .... .... .... 0010
176
- ADDPERMISSIONS: "0x0000000000000000000000000000000000000000000000000000000000000004", // .... .... .... 0100
177
- SETDATA: "0x0000000000000000000000000000000000000000000000000000000000000008", // .... .... .... 1000
178
- CALL: "0x0000000000000000000000000000000000000000000000000000000000000010", // .... .... 0001 ....
179
- STATICCALL: "0x0000000000000000000000000000000000000000000000000000000000000020", // .... .... 0010 ....
180
- DELEGATECALL: "0x0000000000000000000000000000000000000000000000000000000000000040", // .... .... 0100 ....
181
- DEPLOY: "0x0000000000000000000000000000000000000000000000000000000000000080", // .... .... 1000 ....
182
- TRANSFERVALUE: "0x0000000000000000000000000000000000000000000000000000000000000100", // .... 0001 .... ....
183
- SIGN: "0x0000000000000000000000000000000000000000000000000000000000000200", // .... 0010 .... ....
184
- SUPER_SETDATA: "0x0000000000000000000000000000000000000000000000000000000000000400", // .... 0100 .... ....
185
- SUPER_TRANSFERVALUE: "0x0000000000000000000000000000000000000000000000000000000000000800", // .... 1000 .... ....
186
- SUPER_CALL: "0x0000000000000000000000000000000000000000000000000000000000001000", // 0001 .... .... ....
187
- SUPER_STATICCALL: "0x0000000000000000000000000000000000000000000000000000000000002000", // 0010 .... .... ....
188
- SUPER_DELEGATECALL: "0x0000000000000000000000000000000000000000000000000000000000004000", // 0100 .... .... ....
200
+ CHANGEOWNER :"0x0000000000000000000000000000000000000000000000000000000000000001",
201
+ ADDCONTROLLER :"0x0000000000000000000000000000000000000000000000000000000000000002",
202
+ CHANGEPERMISSIONS :"0x0000000000000000000000000000000000000000000000000000000000000004",
203
+ ADDEXTENSIONS :"0x0000000000000000000000000000000000000000000000000000000000000008",
204
+ CHANGEEXTENSIONS :"0x0000000000000000000000000000000000000000000000000000000000000010",
205
+ ADDUNIVERSALRECEIVERDELEGATE :"0x0000000000000000000000000000000000000000000000000000000000000020",
206
+ CHANGEUNIVERSALRECEIVERDELEGATE :"0x0000000000000000000000000000000000000000000000000000000000000040",
207
+ REENTRANCY :"0x0000000000000000000000000000000000000000000000000000000000000080",
208
+ SUPER_TRANSFERVALUE :"0x0000000000000000000000000000000000000000000000000000000000000100",
209
+ TRANSFERVALUE :"0x0000000000000000000000000000000000000000000000000000000000000200",
210
+ SUPER_CALL :"0x0000000000000000000000000000000000000000000000000000000000000400",
211
+ CALL :"0x0000000000000000000000000000000000000000000000000000000000000800",
212
+ SUPER_STATICCALL :"0x0000000000000000000000000000000000000000000000000000000000001000",
213
+ STATICCALL :"0x0000000000000000000000000000000000000000000000000000000000002000",
214
+ SUPER_DELEGATECALL :"0x0000000000000000000000000000000000000000000000000000000000004000",
215
+ DELEGATECALL :"0x0000000000000000000000000000000000000000000000000000000000008000",
216
+ DEPLOY :"0x0000000000000000000000000000000000000000000000000000000000010000",
217
+ SUPER_SETDATA :"0x0000000000000000000000000000000000000000000000000000000000020000",
218
+ SETDATA :"0x0000000000000000000000000000000000000000000000000000000000040000",
219
+ ENCRYPT :"0x0000000000000000000000000000000000000000000000000000000000080000",
220
+ DECRYPT :"0x0000000000000000000000000000000000000000000000000000000000100000",
221
+ SIGN :"0x0000000000000000000000000000000000000000000000000000000000200000",
189
222
  }
190
223
 
191
224
  const LSP1_TYPE_IDS = {
192
- // keccak256('LSP7TokensSender')
193
- LSP7_TOKENSENDER: '0x40b8bec57d7b5ff0dbd9e9acd0a47dfeb0101e1a203766f5ccab00445fbf39e9',
194
- // keccak256('LSP7TokensRecipient')
195
- LSP7_TOKENRECIPIENT: '0xdbe2c314e1aee2970c72666f2ebe8933a8575263ea71e5ff6a9178e95d47a26f',
196
- // keccak256('LSP8TokensSender')
197
- LSP8_TOKENSENDER: '0x3724c94f0815e936299cca424da4140752198e0beb7931a6e0925d11bc97544c',
198
- // keccak256('LSP8TokensRecipient')
199
- LSP8_TOKENRECIPIENT: '0xc7a120a42b6057a0cbed111fbbfbd52fcd96748c04394f77fc2c3adbe0391e01',
200
- // keccak256("LSP9VaultSender")
201
- LSP9_VAULTSENDER: '0x3ca9f769340018257ac15b3a00e502e8fb730d66086f774210f84d0205af31e7',
202
- // keccak256("LSP9VaultRecipient")
203
- LSP9_VAULTRECIPIENT: '0x09aaf55960715d8d86b57af40be36b0bfd469c9a3643445d8c65d39e27b4c56f',
204
- };
225
+ // keccak256('LSP0OwnershipTransferStarted')
226
+ LSP0OwnershipTransferStarted:
227
+ '0xe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac6926',
205
228
 
206
- // ----------
229
+ // keccak256('LSP0OwnershipTransferred_SenderNotification')
230
+ LSP0OwnershipTransferred_SenderNotification:
231
+ '0xa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f814',
232
+
233
+ // keccak256('LSP0OwnershipTransferred_RecipientNotification')
234
+ LSP0OwnershipTransferred_RecipientNotification:
235
+ '0xceca317f109c43507871523e82dc2a3cc64dfa18f12da0b6db14f6e23f995538',
236
+
237
+ // keccak256('LSP7Tokens_SenderNotification')
238
+ LSP7Tokens_SenderNotification:
239
+ '0x429ac7a06903dbc9c13dfcb3c9d11df8194581fa047c96d7a4171fc7402958ea',
240
+
241
+ // keccak256('LSP7Tokens_RecipientNotification')
242
+ LSP7Tokens_RecipientNotification:
243
+ '0x20804611b3e2ea21c480dc465142210acf4a2485947541770ec1fb87dee4a55c',
244
+
245
+ // keccak256('LSP8Tokens_SenderNotification')
246
+ LSP8Tokens_SenderNotification:
247
+ '0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00',
248
+
249
+ // keccak256('LSP8Tokens_RecipientNotification')
250
+ LSP8Tokens_RecipientNotification:
251
+ '0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d',
252
+
253
+ // keccak256('LSP9OwnershipTransferStarted')
254
+ LSP9OwnershipTransferStarted:
255
+ '0xaefd43f45fed1bcd8992f23c803b6f4ec45cf6b62b0d404d565f290a471e763f',
256
+
257
+ // keccak256('LSP9OwnershipTransferred_SenderNotification')
258
+ LSP9OwnershipTransferred_SenderNotification:
259
+ '0x0c622e58e6b7089ae35f1af1c86d997be92fcdd8c9509652022d41aa65169471',
260
+
261
+ // keccak256('LSP9OwnershipTransferred_RecipientNotification')
262
+ LSP9OwnershipTransferred_RecipientNotification:
263
+ '0x79855c97dbc259ce395421d933d7bc0699b0f1561f988f09a9e8633fd542fe5c',
264
+
265
+ // keccak256('LSP14OwnershipTransferStarted')
266
+ LSP14OwnershipTransferStarted:
267
+ '0xee9a7c0924f740a2ca33d59b7f0c2929821ea9837ce043ce91c1823e9c4e52c0',
268
+
269
+ // keccak256('LSP14OwnershipTransferred_SenderNotification')
270
+ LSP14OwnershipTransferred_SenderNotification:
271
+ '0xa124442e1cc7b52d8e2ede2787d43527dc1f3ae0de87f50dd03e27a71834f74c',
272
+
273
+ // keccak256('LSP14OwnershipTransferred_RecipientNotification')
274
+ LSP14OwnershipTransferred_RecipientNotification:
275
+ '0xe32c7debcb817925ba4883fdbfc52797187f28f73f860641dab1a68d9b32902c',
276
+ };
207
277
 
208
278
  const Errors = {
209
- LSP2: {
210
- '0xb614e91e': {
211
- error: 'InvalidABIEncodedArray(bytes,string)',
212
- message: 'LSP2Utils: Invalid ABI encoded array',
279
+ LSP1: {
280
+ '0xa5295345': {
281
+ error: 'CannotRegisterEOAsAsAssets(address)',
282
+ message:
283
+ 'LSP1: EOAs cannot call the UniversalReceiverDelegate with asset/vault typeIds',
284
+ },
285
+ '0x4c5e815a': {
286
+ error: 'CallerNotLSP6LinkedTarget(address,address)',
287
+ message: 'LSP1: Cannot write received vaults/assets on address other than the caller',
288
+ },
289
+ '0x114b721a': {
290
+ error: 'NativeTokensNotAccepted()',
291
+ message: 'LSP1: Cannot send native tokens to the UniversalReceiverDelegate',
213
292
  },
214
293
  },
215
294
  LSP4: {
@@ -227,6 +306,16 @@ const Errors = {
227
306
  error: 'InvalidLSP5ReceivedAssetsArrayLength(bytes,uint256)',
228
307
  message: 'LSP5: Invalid value for `LSP5ReceivedAssets[]` (array length)',
229
308
  },
309
+ '0x1c458e39': {
310
+ error: 'ReceivedAssetsIndexSuperiorToUint64(uint256)',
311
+ message:
312
+ 'LSP5: The index of the received assets cannot be registered if superior to uint64',
313
+ },
314
+ '0xe8a4fba': {
315
+ error: 'ReceivedAssetsIndexSuperiorToUint128(uint256)',
316
+ message:
317
+ 'LSP5: The index of the received assets cannot be registered if superior to uint128',
318
+ },
230
319
  },
231
320
  LSP6: {
232
321
  '0xf292052a': {
@@ -237,23 +326,23 @@ const Errors = {
237
326
  error: 'NotAuthorised(address,string)',
238
327
  message: 'LSP6: Not authorized (missing permission).',
239
328
  },
240
- '0x2879b128': {
241
- error: 'NotAllowedAddress(address,address)',
242
- message: 'LSP6: not allowed to interact with address.',
243
- },
244
- '0x42013ee4': {
245
- error: 'NotAllowedStandard(address,address)',
329
+ '0x45147bce': {
330
+ error: 'NotAllowedCall(address,address,bytes4)',
246
331
  message:
247
- 'LSP6: cannot interact with a contract that does not implement an allowed standard.',
332
+ 'LSP6: not authorised to interact with `to` with the provided data payload (standard, address or function of `to` not authorised).',
248
333
  },
249
- '0x84135110': {
250
- error: 'NotAllowedFunction(address,bytes4)',
251
- message: 'LSP6: not allowed to run the function.',
252
- },
253
- '0x3003e7ae': {
254
- error: 'NotAllowedERC725YKey(address,bytes32)',
334
+ '0x557ae079': {
335
+ error: 'NotAllowedERC725YDataKey(address,bytes32)',
255
336
  message: 'LSP6: not allowed to set the ERC725Y data key.',
256
337
  },
338
+ '0x0f7d735b': {
339
+ error: 'NotRecognisedPermissionKey(bytes32)',
340
+ message: 'LSP6: could not recognise the permission data key being set.',
341
+ },
342
+ '0xfc854579': {
343
+ error: 'InvalidLSP6Target()',
344
+ message: 'LSP6: cannot linked the Key Manager to address(0).',
345
+ },
257
346
  '0xc9bd9eb9': {
258
347
  error: 'InvalidRelayNonce(address,uint256,bytes)',
259
348
  message: 'LSP6: invalid nonce provided for signer address',
@@ -262,10 +351,57 @@ const Errors = {
262
351
  error: 'InvalidERC725Function(bytes4)',
263
352
  message: 'LSP6: unknown or invalid ERC725 function selector',
264
353
  },
354
+ '0xed7fa509': {
355
+ error: 'NoERC725YDataKeysAllowed(address)',
356
+ message: 'LSP6: caller has no AllowedERC725YDataKeys',
357
+ },
358
+ '0x4f0dfdda': {
359
+ error: 'InvalidEncodedAllowedERC725YDataKeys(bytes)',
360
+ message:
361
+ 'LSP6: Invalid Encoding for the Compact Bytes Array of Allowed ERC725Y Data Keys.',
362
+ },
363
+ '0x8f4afa38': {
364
+ error: 'AddressPermissionArrayIndexValueNotAnAddress(bytes32,bytes)',
365
+ message: 'LSP6: value provided for AddressPermission[index] is not an address.',
366
+ },
367
+ '0x55a187db': {
368
+ error: 'BatchExecuteParamsLengthMismatch()',
369
+ message:
370
+ 'LSP6: different number of elements for each array parameters in batch `execute(uint256[],bytes[])`',
371
+ },
372
+ '0xb4d50d21': {
373
+ error: 'BatchExecuteRelayCallParamsLengthMismatch()',
374
+ message:
375
+ 'LSP6: different number of elements for each array parameters in batch `executeRelayCall(bytes[],uint256[],bytes[])`',
376
+ },
377
+ '0x30a324ac': {
378
+ error: 'LSP6BatchInsufficientValueSent(uint256,uint256)',
379
+ message: 'LSP6: `msg.value` sent is not enough to cover all the combined `values[]`.',
380
+ },
381
+ '0xa51868b6': {
382
+ error: 'LSP6BatchExcessiveValueSent(uint256,uint256)',
383
+ message: 'LSP6: cannot send more `msg.value` than all the combined `values[]`.',
384
+ },
385
+ '0x6cb60587': {
386
+ error: 'NoCallsAllowed(address)',
387
+ message: 'LSP6: No calls allowed for the provided address',
388
+ },
389
+ '0x6fd203c5': {
390
+ error: 'InvalidWhitelistedCall(address)',
391
+ message: 'LSP6: LSP6: Not allowed to whitelist all calls in AllowedCalls.',
392
+ },
393
+ '0x80d6ebae': {
394
+ error: 'DelegateCallDisallowedViaKeyManager()',
395
+ message: 'LSP6: DelegateCall is disallowed via the Key Manager',
396
+ },
397
+ '0x3621bbcc': {
398
+ error: 'InvalidPayload(bytes)',
399
+ message: 'LSP6: Invalid Payload',
400
+ },
265
401
  },
266
402
  LSP7: {
267
- '0xc5e194ab': {
268
- error: 'LSP7AmountExceedsBalance(address,address,uint256)',
403
+ '0x08d47949': {
404
+ error: 'LSP7AmountExceedsBalance(uint256,address,uint256)',
269
405
  message: "LSP7: token amount exceeds sender's balance.",
270
406
  },
271
407
  '0xf3a6b691': {
@@ -280,6 +416,10 @@ const Errors = {
280
416
  error: 'LSP7CannotSendWithAddressZero()',
281
417
  message: 'LSP7: cannot send token with address(0).',
282
418
  },
419
+ '0xb9afb000': {
420
+ error: 'LSP7CannotSendToSelf()',
421
+ message: 'LSP7: `from` and `to` address cannot be the same',
422
+ },
283
423
  '0x263eee8d': {
284
424
  error: 'LSP7InvalidTransferBatch()',
285
425
  message: 'LSP7: invalid transfer batch.',
@@ -324,6 +464,10 @@ const Errors = {
324
464
  error: 'LSP8CannotSendToAddressZero()',
325
465
  message: 'LSP8: cannot send to address(0).',
326
466
  },
467
+ '0x5d67d6c1': {
468
+ error: 'LSP8CannotSendToSelf()',
469
+ message: 'LSP8: the `from` and `to` address cannot be the same on transfer.',
470
+ },
327
471
  '0x34c7b511': {
328
472
  error: 'LSP8TokenIdAlreadyMinted(bytes32)',
329
473
  message: 'LSP8: tokenId already exist (= already minted).',
@@ -340,6 +484,14 @@ const Errors = {
340
484
  error: 'LSP8NotifyTokenReceiverIsEOA(address)',
341
485
  message: 'LSP8: token recipient is an Externally Owned Account.',
342
486
  },
487
+ '0x4aa31a8c': {
488
+ error: 'LSP8NonExistingOperator(address,bytes32)',
489
+ message: 'LSP8: Cannot remove a non existing operator.',
490
+ },
491
+ '0xa7626b68': {
492
+ error: 'LSP8OperatorAlreadyAuthorized(address,bytes32)',
493
+ message: 'LSP8: Cannot authorize an existing operator twice for the same tokenId.',
494
+ },
343
495
  },
344
496
  LSP8CappedSupply: {
345
497
  '0x38d9fc30': {
@@ -351,10 +503,71 @@ const Errors = {
351
503
  message: 'LSP8CappedSupply: cannot mint over the max cap supply',
352
504
  },
353
505
  },
506
+ LSP9: {
507
+ '0x199611f': {
508
+ error: 'LSP1DelegateNotAllowedToSetDataKey(bytes32)',
509
+ message: 'The UniversalReceiverDelegate is not allowed to set this data key',
510
+ },
511
+ },
512
+ LSP11: {
513
+ '0x5560e16': {
514
+ error: 'CallerIsNotGuardian(address)',
515
+ message: 'LSP11: The caller is not a guardian',
516
+ },
517
+ '0xd52858db': {
518
+ error: 'GuardianAlreadyExist(address)',
519
+ message: 'LSP11: The address provided is already a guardian',
520
+ },
521
+ '0x3d8e524e': {
522
+ error: 'GuardianDoNotExist(address)',
523
+ message: 'LSP11: The address provided is not an existing guardian',
524
+ },
525
+ '0x27113777': {
526
+ error: 'GuardiansNumberCannotGoBelowThreshold(uint256)',
527
+ message: 'LSP11: The guardian number cannot go below the guardians threshold',
528
+ },
529
+ '0xe3db80bd': {
530
+ error: 'ThresholdCannotBeHigherThanGuardiansNumber(uint256,uint256)',
531
+ message: 'LSP11: The guardian threshold cannot be higher than the guardians number',
532
+ },
533
+ '0x7f617002': {
534
+ error: 'SecretHashCannotBeZero()',
535
+ message: 'LSP11: The secret hash cannot be bytes32(0)',
536
+ },
537
+ '0xf78f0507': {
538
+ error: 'ThresholdNotReachedForRecoverer(address,uint256,uint256)',
539
+ message: "LSP11: The caller cannot recover as he didn't reach the guardians threshold",
540
+ },
541
+ '0x6fa723c3': {
542
+ error: 'WrongPlainSecret()',
543
+ message:
544
+ 'LSP11: The plain secret provided do not produce the secret hash set by the owner',
545
+ },
546
+ '0x0855380c': {
547
+ error: 'AddressZeroNotAllowed()',
548
+ message: 'LSP11: The address zero is not allowed to call recoverOwnership function',
549
+ },
550
+ },
551
+ LSP14Ownable2Step: {
552
+ '0x8b9bf507': {
553
+ error: 'NotInRenounceOwnershipInterval(uint256,uint256)',
554
+ message:
555
+ 'LSP14: Second renounce ownership call available after 100 block delay from the first call',
556
+ },
557
+ '0x43b248cd': {
558
+ error: 'CannotTransferOwnershipToSelf()',
559
+ message: 'LSP14: Cannot transfer ownership to address(this)',
560
+ },
561
+ },
562
+ LSP17ContractExtension: {
563
+ '0xbb370b2b': {
564
+ error: 'NoExtensionFoundForFunctionSelector(bytes4)',
565
+ message:
566
+ 'The function being called on the contract is not supported and there is no extension for it',
567
+ },
568
+ },
354
569
  };
355
570
 
356
- // ----------
357
-
358
571
  const EventSignatures = {
359
572
  ERC173: {
360
573
  /**
@@ -373,11 +586,12 @@ const EventSignatures = {
373
586
  * uint256 indexed _operation,
374
587
  * address indexed _contractAddress,
375
588
  * uint256 indexed _value
589
+ * bytes32 _salt
376
590
  * );
377
591
  *
378
- * signature = keccak256('ContractCreated(uint256,address,uint256)')
592
+ * signature = keccak256('ContractCreated(uint256,address,uint256,bytes32)')
379
593
  */
380
- ContractCreated: '0x01c42bd7e97a66166063b02fce6924e6656b6c2c61966630165095c4fb0b7b2f',
594
+ ContractCreated: '0xa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3',
381
595
  /**
382
596
  * event Executed(
383
597
  * uint256 indexed _operation,
@@ -392,11 +606,14 @@ const EventSignatures = {
392
606
  },
393
607
  ERC725Y: {
394
608
  /**
395
- * event DataChanged(bytes32 indexed key);
609
+ * event DataChanged(
610
+ * bytes32 indexed dataKey,
611
+ * bytes dataValue
612
+ * );
396
613
  *
397
- * signature = keccak256('DataChanged(bytes32)')
614
+ * signature = keccak256('DataChanged(bytes32,bytes)')
398
615
  */
399
- DataChanged: '0xcdf4e344c0d23d4cdd0474039d176c55b19d531070dbe17856bfb993a5b5720b',
616
+ DataChanged: '0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2',
400
617
  },
401
618
  // ERC725Account
402
619
  LSP0: {
@@ -414,10 +631,10 @@ const EventSignatures = {
414
631
  /**
415
632
  * event UniversalReceiver(
416
633
  * address indexed from,
417
- * uint256 value,
634
+ * uint256 indexed value,
418
635
  * bytes32 indexed typeId,
419
- * bytes indexed returnedValue,
420
- * bytes receivedData
636
+ * bytes receivedData,
637
+ * bytes returnedValue
421
638
  * );
422
639
  *
423
640
  * signature = keccak256('UniversalReceiver(address,uint256,bytes32,bytes,bytes)')
@@ -427,13 +644,13 @@ const EventSignatures = {
427
644
  LSP6: {
428
645
  /**
429
646
  * event Executed(
430
- * uint256 indexed _value,
431
- * bytes4 _data
647
+ * bytes4 indexed selector,
648
+ * uint256 indexed value
432
649
  * );
433
650
  *
434
- * signature = keccak256('Executed(uint256,bytes4)')
651
+ * signature = keccak256('Executed(bytes4,uint256)')
435
652
  */
436
- Executed: '0x6b9340454526f665e369d7ac17353d0b73774a4a80f746b959ece8130e0f1d72',
653
+ Executed: '0x4004d18dc05f04c061c306cbb394d4083af494786ab828142d6118ab2c43a492',
437
654
  },
438
655
  LSP7: {
439
656
  /**
@@ -442,7 +659,7 @@ const EventSignatures = {
442
659
  * address indexed from,
443
660
  * address indexed to,
444
661
  * uint256 amount,
445
- * bool force,
662
+ * bool allowNonLSP1Recipient,
446
663
  * bytes data
447
664
  * );
448
665
  *
@@ -476,7 +693,7 @@ const EventSignatures = {
476
693
  * address indexed from,
477
694
  * address indexed to,
478
695
  * bytes32 indexed tokenId,
479
- * bool force,
696
+ * bool allowNonLSP1Recipient,
480
697
  * bytes data
481
698
  * );
482
699
  *
@@ -504,6 +721,71 @@ const EventSignatures = {
504
721
  */
505
722
  RevokedOperator: '17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5',
506
723
  },
724
+ LSP9: {
725
+ /**
726
+ * event ValueReceived(
727
+ * address indexed sender,
728
+ * uint256 indexed value
729
+ * );
730
+ *
731
+ * signature = keccak256('ValueReceived(address,uint256)')
732
+ */
733
+ ValueReceived: '0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493',
734
+ },
735
+ LSP11: {
736
+ /**
737
+ * event GuardianAdded(address indexed newGuardian);
738
+ *
739
+ * signature = keccak256('GuardianAdded(address)')
740
+ */
741
+ GuardianAdded: '0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969',
742
+
743
+ /**
744
+ * event GuardianRemoved(address indexed removedGuardian);
745
+ *
746
+ * signature = keccak256('GuardianRemoved(address)')
747
+ */
748
+ GuardianRemoved: '0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52',
749
+
750
+ /**
751
+ * event GuardiansThresholdChanged(uint256 indexed guardianThreshold);
752
+ *
753
+ * signature = keccak256('GuardiansThresholdChanged(uint256)')
754
+ */
755
+ GuardiansThresholdChanged:
756
+ '0x7146d20a2c7b7c75c203774c9f241b61698fac43a4a81ccd828f0d8162392790',
757
+
758
+ /**
759
+ * event SecretHashChanged(bytes32 indexed secretHash);
760
+ *
761
+ * signature = keccak256('SecretHashChanged(bytes32)')
762
+ */
763
+ SecretHashChanged: '0x2e8c5419a62207ade549fe0b66c1c85c16f5e1ed654815dee3a3f3ac41770df3',
764
+
765
+ /**
766
+ * event SelectedNewController(
767
+ * uint256 indexed recoveryCounter,
768
+ * address indexed guardian,
769
+ * address indexed addressSelected
770
+ * );
771
+ *
772
+ * signature = keccak256('SelectedNewController(uint256,address,address)')
773
+ */
774
+ SelectedNewController: '0xe43f3c1093c69ab76b2cf6246090acb2f8eab7f19ba9942dfc8b8ec446e3a3de',
775
+
776
+ /**
777
+ * event RecoveryProcessSuccessful(
778
+ * uint256 indexed recoveryCounter,
779
+ * address indexed newController,
780
+ * bytes32 indexed newSecretHash,
781
+ * address[] guardians
782
+ * );
783
+ *
784
+ * signature = keccak256('RecoveryProcessSuccessful(uint256,address,bytes32,address[])')
785
+ */
786
+ RecoveryProcessSuccessful:
787
+ '0xf4ff8803d6b43af46d48c200977209829c2f42f19f27eda1c89dbf26a28009cd',
788
+ },
507
789
  Helpers: {
508
790
  /**
509
791
  * event ReceivedERC777(
@@ -518,6 +800,44 @@ const EventSignatures = {
518
800
  */
519
801
  ReceivedERC777: '0xdc38539587ea4d67f9f649ad9269646bab26927bad175bdcdfdab5dd297d5e1c',
520
802
  },
803
+ LSP14Ownable2Step: {
804
+ /**
805
+ * event OwnershipTransferStarted(
806
+ * address indexed previousOwner,
807
+ * address indexed newOwner
808
+ * );
809
+ *
810
+ * signature = keccak256('OwnershipTransferStarted(address,address)')
811
+ */
812
+ OwnershipTransferStarted:
813
+ '0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700',
814
+ /**
815
+ * event RenounceOwnershipStarted();
816
+ *
817
+ * signature = keccak256('RenounceOwnershipStarted()')
818
+ */
819
+ RenounceOwnershipStarted:
820
+ '0x81b7f830f1f0084db6497c486cbe6974c86488dcc4e3738eab94ab6d6b1653e7',
821
+ /**
822
+ * event OwnershipRenounced();
823
+ *
824
+ * signature = keccak256('OwnershipRenounced()')
825
+ */
826
+ OwnershipRenounced: '0xd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce',
827
+ },
828
+ LSP16UniversalFactory: {
829
+ /**
830
+ * event ContractCreated(
831
+ * address indexed contractCreated,
832
+ * bytes32 indexed providedSalt,
833
+ * bool indexed initializable,
834
+ * bytes initializeCalldata
835
+ * );
836
+ *
837
+ * signature = keccak256('ContractCreated(address,bytes32,bool,bytes)')
838
+ */
839
+ ContractCreated: '0xc587425c92859c27d4383bf2eb0ab8ea1670c48039f8d6375b9947b82a20f746',
840
+ },
521
841
  };
522
842
 
523
843
  module.exports = {
@@ -525,8 +845,9 @@ module.exports = {
525
845
  ERC1271_VALUES,
526
846
  OPERATION_TYPES,
527
847
  SupportedStandards,
528
- ERC725YKeys,
848
+ ERC725YDataKeys,
529
849
  BasicUPSetup_Schema,
850
+ LSP6_VERSION,
530
851
  ALL_PERMISSIONS,
531
852
  PERMISSIONS,
532
853
  LSP1_TYPE_IDS,