@lukso/lsp-smart-contracts 0.8.0 → 0.9.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 (81) hide show
  1. package/CONTRIBUTING.md +8 -0
  2. package/README.md +34 -21
  3. package/artifacts/LSP0ERC725Account.json +51 -5
  4. package/artifacts/LSP0ERC725AccountInit.json +51 -5
  5. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  6. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  7. package/artifacts/LSP16UniversalFactory.json +31 -2
  8. package/artifacts/LSP1UniversalReceiverDelegateUP.json +19 -35
  9. package/artifacts/LSP1UniversalReceiverDelegateVault.json +13 -13
  10. package/artifacts/LSP4Compatibility.json +7 -2
  11. package/artifacts/LSP4DigitalAssetMetadata.json +7 -2
  12. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +7 -2
  13. package/artifacts/LSP6KeyManager.json +91 -6
  14. package/artifacts/LSP6KeyManagerInit.json +103 -18
  15. package/artifacts/LSP7CappedSupply.json +12 -2
  16. package/artifacts/LSP7CappedSupplyInitAbstract.json +12 -2
  17. package/artifacts/LSP7CompatibleERC20.json +12 -2
  18. package/artifacts/LSP7CompatibleERC20InitAbstract.json +12 -2
  19. package/artifacts/LSP7CompatibleERC20Mintable.json +14 -4
  20. package/artifacts/LSP7CompatibleERC20MintableInit.json +14 -4
  21. package/artifacts/LSP7DigitalAsset.json +12 -2
  22. package/artifacts/LSP7DigitalAssetInitAbstract.json +12 -2
  23. package/artifacts/LSP7Mintable.json +14 -4
  24. package/artifacts/LSP7MintableInit.json +14 -4
  25. package/artifacts/LSP8CappedSupply.json +12 -2
  26. package/artifacts/LSP8CappedSupplyInitAbstract.json +12 -2
  27. package/artifacts/LSP8CompatibleERC721.json +12 -2
  28. package/artifacts/LSP8CompatibleERC721InitAbstract.json +12 -2
  29. package/artifacts/LSP8CompatibleERC721Mintable.json +14 -4
  30. package/artifacts/LSP8CompatibleERC721MintableInit.json +14 -4
  31. package/artifacts/LSP8IdentifiableDigitalAsset.json +12 -2
  32. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +12 -2
  33. package/artifacts/LSP8Mintable.json +14 -4
  34. package/artifacts/LSP8MintableInit.json +14 -4
  35. package/artifacts/LSP9Vault.json +29 -5
  36. package/artifacts/LSP9VaultInit.json +29 -5
  37. package/artifacts/UniversalProfile.json +51 -5
  38. package/artifacts/UniversalProfileInit.json +51 -5
  39. package/common/constants.d.ts +461 -0
  40. package/common/constants.js +789 -0
  41. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +27 -0
  42. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  43. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +353 -145
  44. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
  45. package/contracts/LSP0ERC725Account/LSP0Utils.sol +50 -0
  46. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +48 -54
  47. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +5 -6
  48. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +27 -4
  49. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +36 -77
  50. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +8 -8
  51. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +50 -57
  52. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +18 -8
  53. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +12 -0
  54. package/contracts/LSP20CallVerification/ILSP20CallVerification.sol +30 -0
  55. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +74 -0
  56. package/contracts/LSP20CallVerification/LSP20Errors.sol +15 -0
  57. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +7 -7
  58. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +50 -56
  59. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +1 -1
  60. package/contracts/LSP6KeyManager/LSP6Constants.sol +8 -2
  61. package/contracts/LSP6KeyManager/LSP6Errors.sol +18 -1
  62. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +126 -745
  63. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +407 -0
  64. package/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol +25 -0
  65. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +633 -0
  66. package/contracts/LSP6KeyManager/LSP6Utils.sol +60 -15
  67. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +14 -23
  68. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
  69. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +5 -0
  70. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +19 -30
  71. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +1 -3
  72. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +1 -3
  73. package/contracts/LSP9Vault/ILSP9Vault.sol +19 -0
  74. package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
  75. package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
  76. package/contracts/LSP9Vault/LSP9VaultCore.sol +166 -83
  77. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
  78. package/module/constants.d.ts +461 -0
  79. package/module/constants.js +786 -0
  80. package/package.json +30 -6
  81. package/constants.js +0 -856
package/constants.js DELETED
@@ -1,856 +0,0 @@
1
- /**
2
- * Set of constants values as defined in each LUKSO Standards Proposals (LSPs).
3
- * @see https://github.com/lukso-network/LIPs/tree/main/LSPs
4
- */
5
-
6
- // ERC165
7
- // ---------
8
-
9
- const INTERFACE_IDS = {
10
- ERC165: '0x01ffc9a7',
11
- ERC1271: '0x1626ba7e',
12
- ERC20: '0x36372b07',
13
- ERC223: '0x87d43052',
14
- ERC721: '0x80ac58cd',
15
- ERC721Metadata: '0x5b5e139f',
16
- ERC777: '0xe58e113c',
17
- ERC1155: '0xd9b67a26',
18
- ERC725X: '0x570ef073',
19
- ERC725Y: '0x714df77c',
20
- LSP0ERC725Account: '0x66767497',
21
- LSP1UniversalReceiver: '0x6bb56a14',
22
- LSP6KeyManager: '0xfb437414',
23
- LSP7DigitalAsset: '0xda1f85e4',
24
- LSP8IdentifiableDigitalAsset: '0x622e7a01',
25
- LSP9Vault: '0x7050cee9',
26
- LSP11BasicSocialRecovery: '0x049a28f1',
27
- LSP14Ownable2Step: '0x94be5999',
28
- LSP17Extendable: '0xa918fa6b',
29
- LSP17Extension: '0xcee78b40',
30
- };
31
-
32
- // ERC1271
33
- // ----------
34
-
35
- const ERC1271_VALUES = {
36
- MAGIC_VALUE: '0x1626ba7e',
37
- FAIL_VALUE: '0xffffffff',
38
- };
39
-
40
- // ERC725X
41
- // ----------
42
-
43
- const OPERATION_TYPES = {
44
- CALL: 0,
45
- CREATE: 1,
46
- CREATE2: 2,
47
- STATICCALL: 3,
48
- DELEGATECALL: 4,
49
- };
50
-
51
- // ERC725Y
52
- // ----------
53
-
54
- const SupportedStandards = {
55
- LSP3UniversalProfile: {
56
- key: '0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38',
57
- value: '0xabe425d6',
58
- },
59
- LSP4DigitalAsset: {
60
- key: '0xeafec4d89fa9619884b60000a4d96624a38f7ac2d8d9a604ecf07c12c77e480c',
61
- value: '0xa4d96624',
62
- },
63
- LSP9Vault: {
64
- key: '0xeafec4d89fa9619884b600007c0334a14085fefa8b51ae5a40895018882bdb90',
65
- value: '0x7c0334a1',
66
- },
67
- };
68
-
69
- /**
70
- * For more infos on the type of each keys
71
- * @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
72
- */
73
- const ERC725YDataKeys = {
74
- LSP1: {
75
- // bytes10(keccak256('LSP1UniversalReceiverDelegate')) + bytes2(0)
76
- LSP1UniversalReceiverDelegatePrefix: '0x0cfc51aec37c55a4d0b10000',
77
-
78
- // keccak256('LSP1UniversalReceiverDelegate')
79
- LSP1UniversalReceiverDelegate:
80
- '0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
81
- },
82
- LSP3: {
83
- SupportedStandards_LSP3: SupportedStandards.LSP3UniversalProfile.key,
84
-
85
- // keccak256('LSP3Profile')
86
- LSP3Profile: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
87
- },
88
- LSP4: {
89
- SupportedStandards_LSP4: SupportedStandards.LSP4DigitalAsset.key,
90
-
91
- // keccak256('LSP4TokenName')
92
- LSP4TokenName: '0xdeba1e292f8ba88238e10ab3c7f88bd4be4fac56cad5194b6ecceaf653468af1',
93
-
94
- // keccak256('LSP4TokenSymbol')
95
- LSP4TokenSymbol: '0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756',
96
-
97
- // keccak256('LSP4Metadata')
98
- LSP4Metadata: '0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e',
99
-
100
- // LSP4CreatorsMap:<address> + bytes2(0)
101
- LSP4CreatorsMap: '0x6de85eaf5d982b4e5da00000',
102
-
103
- // keccak256('"LSP4Creators[]')
104
- 'LSP4Creators[]': {
105
- length: '0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7',
106
- index: '0x114bd03b3a46d48759680d81ebb2b414',
107
- },
108
- },
109
- LSP5: {
110
- // LSP5ReceivedAssetsMap:<address> + bytes2(0)
111
- LSP5ReceivedAssetsMap: '0x812c4334633eb816c80d0000',
112
-
113
- // keccak256('LSP5ReceivedAssets[]')
114
- 'LSP5ReceivedAssets[]': {
115
- length: '0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b',
116
- index: '0x6460ee3c0aac563ccbf76d6e1d07bada',
117
- },
118
- },
119
- LSP6: {
120
- // keccak256('AddressPermissions[]')
121
- 'AddressPermissions[]': {
122
- length: '0xdf30dba06db6a30e65354d9a64c609861f089545ca58c6b4dbe31a5f338cb0e3',
123
- index: '0xdf30dba06db6a30e65354d9a64c60986',
124
- },
125
-
126
- AddressPermissionsPrefix: '0x4b80742de2bf',
127
-
128
- // AddressPermissions:Permissions:<address> + bytes2(0)
129
- 'AddressPermissions:Permissions': '0x4b80742de2bf82acb3630000',
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,
139
- },
140
- LSP10: {
141
- // keccak256('LSP10VaultsMap') + bytes2(0)
142
- LSP10VaultsMap: '0x192448c3c0f88c7f238c0000',
143
-
144
- // keccak256('LSP10Vaults[]')
145
- 'LSP10Vaults[]': {
146
- length: '0x55482936e01da86729a45d2b87a6b1d3bc582bea0ec00e38bdb340e3af6f9f06',
147
- index: '0x55482936e01da86729a45d2b87a6b1d3',
148
- },
149
- },
150
- LSP12: {
151
- // LSP12IssuedAssetsMap:<address> + bytes2(0)
152
- LSP12IssuedAssetsMap: '0x74ac2555c10b9349e78f0000',
153
-
154
- // keccak256('LSP12IssuedAssets[]')
155
- 'LSP12IssuedAssets[]': {
156
- length: '0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd',
157
- index: '0x7c8c3416d6cda87cd42c71ea1843df28',
158
- },
159
- },
160
- LSP17: {
161
- // bytes10(keccak256('LSP17Extension')) + bytes2(0)
162
- LSP17ExtensionPrefix: '0xcee78b4094da860110960000',
163
- },
164
- };
165
-
166
- const BasicUPSetup_Schema = [
167
- {
168
- name: 'LSP3Profile',
169
- key: ERC725YDataKeys.LSP3['LSP3Profile'],
170
- keyType: 'Singleton',
171
- valueContent: 'JSONURL',
172
- valueType: 'bytes',
173
- },
174
- {
175
- name: 'LSP1UniversalReceiverDelegate',
176
- key: ERC725YDataKeys.LSP1.LSP1UniversalReceiverDelegate,
177
- keyType: 'Singleton',
178
- valueContent: 'Address',
179
- valueType: 'address',
180
- },
181
- {
182
- name: 'LSP12IssuedAssets[]',
183
- key: ERC725YDataKeys.LSP12['LSP12IssuedAssets[]'].length,
184
- keyType: 'Array',
185
- valueContent: 'Number',
186
- valueType: 'uint256',
187
- },
188
- ];
189
-
190
- // LSP6
191
- // ----------
192
-
193
- const LSP6_VERSION = 6;
194
-
195
- // All Permissions currently exclude REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security
196
- const ALL_PERMISSIONS = '0x00000000000000000000000000000000000000000000000000000000003f3f7f';
197
-
198
- // prettier-ignore
199
- const PERMISSIONS = {
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",
222
- }
223
-
224
- const LSP1_TYPE_IDS = {
225
- // keccak256('LSP0OwnershipTransferStarted')
226
- LSP0OwnershipTransferStarted:
227
- '0xe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac6926',
228
-
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
- };
277
-
278
- const Errors = {
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',
292
- },
293
- },
294
- LSP4: {
295
- '0x85c169bd': {
296
- error: 'LSP4TokenNameNotEditable()',
297
- message: 'LSP4: Token name cannot be edited',
298
- },
299
- '0x76755b38': {
300
- error: 'LSP4TokenSymbolNotEditable()',
301
- message: 'LSP4: Token symbol cannot be edited',
302
- },
303
- },
304
- LSP5: {
305
- '0xecba7af8': {
306
- error: 'InvalidLSP5ReceivedAssetsArrayLength(bytes,uint256)',
307
- message: 'LSP5: Invalid value for `LSP5ReceivedAssets[]` (array length)',
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
- },
319
- },
320
- LSP6: {
321
- '0xf292052a': {
322
- error: 'NoPermissionsSet(address)',
323
- message: 'LSP6: No permissions are set for this address.',
324
- },
325
- '0x3bdad6e6': {
326
- error: 'NotAuthorised(address,string)',
327
- message: 'LSP6: Not authorized (missing permission).',
328
- },
329
- '0x45147bce': {
330
- error: 'NotAllowedCall(address,address,bytes4)',
331
- message:
332
- 'LSP6: not authorised to interact with `to` with the provided data payload (standard, address or function of `to` not authorised).',
333
- },
334
- '0x557ae079': {
335
- error: 'NotAllowedERC725YDataKey(address,bytes32)',
336
- message: 'LSP6: not allowed to set the ERC725Y data key.',
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
- },
346
- '0xc9bd9eb9': {
347
- error: 'InvalidRelayNonce(address,uint256,bytes)',
348
- message: 'LSP6: invalid nonce provided for signer address',
349
- },
350
- '0x2ba8851c': {
351
- error: 'InvalidERC725Function(bytes4)',
352
- message: 'LSP6: unknown or invalid ERC725 function selector',
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
- },
401
- },
402
- LSP7: {
403
- '0x08d47949': {
404
- error: 'LSP7AmountExceedsBalance(uint256,address,uint256)',
405
- message: "LSP7: token amount exceeds sender's balance.",
406
- },
407
- '0xf3a6b691': {
408
- error: 'LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)',
409
- message: "LSP7: token amount exceeds operator's allowance.",
410
- },
411
- '0x6355e766': {
412
- error: 'LSP7CannotUseAddressZeroAsOperator()',
413
- message: 'LSP7: cannot authorize address(0) as operator for LSP7 token.',
414
- },
415
- '0xd2d5ec30': {
416
- error: 'LSP7CannotSendWithAddressZero()',
417
- message: 'LSP7: cannot send token with address(0).',
418
- },
419
- '0xb9afb000': {
420
- error: 'LSP7CannotSendToSelf()',
421
- message: 'LSP7: `from` and `to` address cannot be the same',
422
- },
423
- '0x263eee8d': {
424
- error: 'LSP7InvalidTransferBatch()',
425
- message: 'LSP7: invalid transfer batch.',
426
- },
427
- '0xa608fbb6': {
428
- error: 'LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)',
429
- message: 'LSP7: token recipient does not implement LSP1 standard.',
430
- },
431
- '0x26c247f4': {
432
- error: 'LSP7NotifyTokenReceiverIsEOA(address)',
433
- message: 'LSP7: token recipient is an Externally Owned Account.',
434
- },
435
- },
436
- LSP7CappedSupply: {
437
- '0xacf1d8c5': {
438
- error: 'LSP7CappedSupplyRequired()',
439
- message: 'LSP7CappedSupply: cap supply number required',
440
- },
441
- '0xeacbf0d1': {
442
- error: 'LSP7CappedSupplyCannotMintOverCap()',
443
- message: 'LSP7CappedSupply: cannot mint over the max cap supply',
444
- },
445
- },
446
- LSP8: {
447
- '0xae8f9a36': {
448
- error: 'LSP8NonExistentTokenId(bytes32)',
449
- message: 'LSP8: token id does not exist.',
450
- },
451
- '0x5b271ea2': {
452
- error: 'LSP8NotTokenOwner(address,bytes32,address)',
453
- message: 'LSP8: tokenOwner given as parameter does not own this token id.',
454
- },
455
- '0x1294d2a9': {
456
- error: 'LSP8NotTokenOperator(bytes32,address)',
457
- message: 'LSP8: caller is not an operator for this token id.',
458
- },
459
- '0x9577b8b3': {
460
- error: 'LSP8CannotUseAddressZeroAsOperator()',
461
- message: 'LSP8: cannot use address(0) as an operator for token id.',
462
- },
463
- '0x24ecef4d': {
464
- error: 'LSP8CannotSendToAddressZero()',
465
- message: 'LSP8: cannot send to address(0).',
466
- },
467
- '0x5d67d6c1': {
468
- error: 'LSP8CannotSendToSelf()',
469
- message: 'LSP8: the `from` and `to` address cannot be the same on transfer.',
470
- },
471
- '0x34c7b511': {
472
- error: 'LSP8TokenIdAlreadyMinted(bytes32)',
473
- message: 'LSP8: tokenId already exist (= already minted).',
474
- },
475
- '0x93a83119': {
476
- error: 'LSP8InvalidTransferBatch()',
477
- message: 'LSP8: invalid transfer batch.',
478
- },
479
- '0x4349776d': {
480
- error: 'LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)',
481
- message: 'LSP8: token recipient does not implement LSP1 standard.',
482
- },
483
- '0x03173137': {
484
- error: 'LSP8NotifyTokenReceiverIsEOA(address)',
485
- message: 'LSP8: token recipient is an Externally Owned Account.',
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
- },
495
- },
496
- LSP8CappedSupply: {
497
- '0x38d9fc30': {
498
- error: 'LSP8CappedSupplyRequired()',
499
- message: 'LSP8CappedSupply: cap supply number required',
500
- },
501
- '0xe8ba2291': {
502
- error: 'LSP8CappedSupplyCannotMintOverCap()',
503
- message: 'LSP8CappedSupply: cannot mint over the max cap supply',
504
- },
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
- },
569
- };
570
-
571
- const EventSignatures = {
572
- ERC173: {
573
- /**
574
- * event OwnershipTransferred(
575
- * address indexed previousOwner,
576
- * address indexed newOwner,
577
- * );
578
- *
579
- * signature = keccak256('OwnershipTransferred(address,address)')
580
- */
581
- OwnershipTransfered: '0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0',
582
- },
583
- ERC725X: {
584
- /**
585
- * event ContractCreated(
586
- * uint256 indexed _operation,
587
- * address indexed _contractAddress,
588
- * uint256 indexed _value
589
- * bytes32 _salt
590
- * );
591
- *
592
- * signature = keccak256('ContractCreated(uint256,address,uint256,bytes32)')
593
- */
594
- ContractCreated: '0xa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3',
595
- /**
596
- * event Executed(
597
- * uint256 indexed _operation,
598
- * address indexed _to,
599
- * uint256 indexed _value,
600
- * bytes4 _data
601
- * );
602
- *
603
- * signature = keccak256('Executed(uint256,address,uint256,bytes4)')
604
- */
605
- Executed: '0x4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e',
606
- },
607
- ERC725Y: {
608
- /**
609
- * event DataChanged(
610
- * bytes32 indexed dataKey,
611
- * bytes dataValue
612
- * );
613
- *
614
- * signature = keccak256('DataChanged(bytes32,bytes)')
615
- */
616
- DataChanged: '0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2',
617
- },
618
- // ERC725Account
619
- LSP0: {
620
- /**
621
- * event ValueReceived(
622
- * address indexed sender,
623
- * uint256 indexed value
624
- * );
625
- *
626
- * signature = keccak256('ValueReceived(address,uint256)')
627
- */
628
- ValueReceived: '0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493',
629
- },
630
- LSP1: {
631
- /**
632
- * event UniversalReceiver(
633
- * address indexed from,
634
- * uint256 indexed value,
635
- * bytes32 indexed typeId,
636
- * bytes receivedData,
637
- * bytes returnedValue
638
- * );
639
- *
640
- * signature = keccak256('UniversalReceiver(address,uint256,bytes32,bytes,bytes)')
641
- */
642
- UniversalReceiver: '0x9c3ba68eb5742b8e3961aea0afc7371a71bf433c8a67a831803b64c064a178c2',
643
- },
644
- LSP6: {
645
- /**
646
- * event Executed(
647
- * bytes4 indexed selector,
648
- * uint256 indexed value
649
- * );
650
- *
651
- * signature = keccak256('Executed(bytes4,uint256)')
652
- */
653
- Executed: '0x4004d18dc05f04c061c306cbb394d4083af494786ab828142d6118ab2c43a492',
654
- },
655
- LSP7: {
656
- /**
657
- * event Transfer(
658
- * address indexed operator,
659
- * address indexed from,
660
- * address indexed to,
661
- * uint256 amount,
662
- * bool allowNonLSP1Recipient,
663
- * bytes data
664
- * );
665
- *
666
- * signature = keccak256('Transfer(address,address,address,uint256,bool,bytes)')
667
- */
668
- Transfer: '0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6',
669
- /**
670
- * event AuthorizedOperator(
671
- * address indexed operator,
672
- * address indexed tokenOwner,
673
- * uint256 indexed amount
674
- * );
675
- *
676
- * signature = keccak256('AuthorizedOperator(address,address,uint256)')
677
- */
678
- AuthorizedOperator: '0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c',
679
- /**
680
- * event RevokedOperator(
681
- * address indexed operator,
682
- * address indexed tokenOwner
683
- * );
684
- *
685
- * signature = keccak256('RevokedOperator(address,address)')
686
- */
687
- RevokedOperator: '0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1',
688
- },
689
- LSP8: {
690
- /**
691
- * event Transfer(
692
- * address operator,
693
- * address indexed from,
694
- * address indexed to,
695
- * bytes32 indexed tokenId,
696
- * bool allowNonLSP1Recipient,
697
- * bytes data
698
- * );
699
- *
700
- * signature = keccak256('Transfer(address,address,address,bytes32,bool,bytes)')
701
- */
702
- Transfer: 'b333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf',
703
- /**
704
- * event AuthorizedOperator(
705
- * address indexed operator,
706
- * address indexed tokenOwner,
707
- * bytes32 indexed tokenId
708
- * );
709
- *
710
- * signature = keccak256('AuthorizedOperator(address,address,bytes32)')
711
- */
712
- AuthorizedOperator: '34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988',
713
- /**
714
- * event RevokedOperator(
715
- * address indexed operator,
716
- * address indexed tokenOwner,
717
- * bytes32 indexed tokenId
718
- * );
719
- *
720
- * signature = keccak256('RevokedOperator(address,address,bytes32)')
721
- */
722
- RevokedOperator: '17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5',
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
- },
789
- Helpers: {
790
- /**
791
- * event ReceivedERC777(
792
- * address indexed token,
793
- * address indexed _operator,
794
- * address indexed _from,
795
- * address _to,
796
- * uint256 _amount
797
- * );
798
- *
799
- * signature = keccak256('ReceivedERC777(address,address,address,address,uint256)')
800
- */
801
- ReceivedERC777: '0xdc38539587ea4d67f9f649ad9269646bab26927bad175bdcdfdab5dd297d5e1c',
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
- },
841
- };
842
-
843
- module.exports = {
844
- INTERFACE_IDS,
845
- ERC1271_VALUES,
846
- OPERATION_TYPES,
847
- SupportedStandards,
848
- ERC725YDataKeys,
849
- BasicUPSetup_Schema,
850
- LSP6_VERSION,
851
- ALL_PERMISSIONS,
852
- PERMISSIONS,
853
- LSP1_TYPE_IDS,
854
- Errors,
855
- EventSignatures,
856
- };