@lukso/lsp-smart-contracts 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CONTRIBUTING.md +8 -0
  2. package/README.md +21 -21
  3. package/artifacts/LSP0ERC725Account.json +2 -2
  4. package/artifacts/LSP0ERC725AccountInit.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  6. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  7. package/artifacts/LSP1UniversalReceiverDelegateUP.json +2 -2
  8. package/artifacts/LSP1UniversalReceiverDelegateVault.json +2 -2
  9. package/artifacts/LSP6KeyManager.json +2 -2
  10. package/artifacts/LSP6KeyManagerInit.json +2 -2
  11. package/artifacts/LSP7CappedSupply.json +5 -0
  12. package/artifacts/LSP7CappedSupplyInitAbstract.json +5 -0
  13. package/artifacts/LSP7CompatibleERC20.json +5 -0
  14. package/artifacts/LSP7CompatibleERC20InitAbstract.json +5 -0
  15. package/artifacts/LSP7CompatibleERC20Mintable.json +7 -2
  16. package/artifacts/LSP7CompatibleERC20MintableInit.json +7 -2
  17. package/artifacts/LSP7DigitalAsset.json +5 -0
  18. package/artifacts/LSP7DigitalAssetInitAbstract.json +5 -0
  19. package/artifacts/LSP7Mintable.json +7 -2
  20. package/artifacts/LSP7MintableInit.json +7 -2
  21. package/artifacts/LSP8CappedSupply.json +5 -0
  22. package/artifacts/LSP8CappedSupplyInitAbstract.json +5 -0
  23. package/artifacts/LSP8CompatibleERC721.json +5 -0
  24. package/artifacts/LSP8CompatibleERC721InitAbstract.json +5 -0
  25. package/artifacts/LSP8CompatibleERC721Mintable.json +7 -2
  26. package/artifacts/LSP8CompatibleERC721MintableInit.json +7 -2
  27. package/artifacts/LSP8IdentifiableDigitalAsset.json +5 -0
  28. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +5 -0
  29. package/artifacts/LSP8Mintable.json +7 -2
  30. package/artifacts/LSP8MintableInit.json +7 -2
  31. package/artifacts/LSP9Vault.json +2 -2
  32. package/artifacts/LSP9VaultInit.json +2 -2
  33. package/artifacts/UniversalProfile.json +2 -2
  34. package/artifacts/UniversalProfileInit.json +2 -2
  35. package/common/constants.d.ts +738 -0
  36. package/common/constants.js +785 -0
  37. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +87 -28
  38. package/contracts/LSP0ERC725Account/LSP0Utils.sol +50 -0
  39. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +3 -5
  40. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +2 -4
  41. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +7 -7
  42. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +44 -734
  43. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +229 -0
  44. package/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol +25 -0
  45. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +606 -0
  46. package/contracts/LSP6KeyManager/LSP6Utils.sol +31 -1
  47. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +2 -6
  48. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
  49. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +5 -0
  50. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +7 -13
  51. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +1 -3
  52. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +1 -3
  53. package/contracts/LSP9Vault/LSP9VaultCore.sol +85 -25
  54. package/module/constants.d.ts +738 -0
  55. package/module/constants.js +782 -0
  56. package/package.json +26 -4
  57. package/constants.js +0 -856
@@ -0,0 +1,782 @@
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
+ // ERC165
6
+ // ---------
7
+ /**
8
+ * @dev ERC165 interface IDs for the LSP interface standards + some backward compatible ERC token standards.
9
+ * These `bytes4` values can be used to detect if a contract implements a specific interface
10
+ * with `supportsInterface(interfaceId)`.
11
+ */
12
+ export const INTERFACE_IDS = {
13
+ ERC165: "0x01ffc9a7",
14
+ ERC1271: "0x1626ba7e",
15
+ ERC20: "0x36372b07",
16
+ ERC223: "0x87d43052",
17
+ ERC721: "0x80ac58cd",
18
+ ERC721Metadata: "0x5b5e139f",
19
+ ERC777: "0xe58e113c",
20
+ ERC1155: "0xd9b67a26",
21
+ ERC725X: "0x570ef073",
22
+ ERC725Y: "0x714df77c",
23
+ LSP0ERC725Account: "0x66767497",
24
+ LSP1UniversalReceiver: "0x6bb56a14",
25
+ LSP6KeyManager: "0xfb437414",
26
+ LSP7DigitalAsset: "0xda1f85e4",
27
+ LSP8IdentifiableDigitalAsset: "0x622e7a01",
28
+ LSP9Vault: "0x7050cee9",
29
+ LSP11BasicSocialRecovery: "0x049a28f1",
30
+ LSP14Ownable2Step: "0x94be5999",
31
+ LSP17Extendable: "0xa918fa6b",
32
+ LSP17Extension: "0xcee78b40",
33
+ };
34
+ // ERC1271
35
+ // ----------
36
+ /**
37
+ * @dev values returned by the `isValidSignature` function of the ERC1271 standard.
38
+ * Can be used to check if a signature is valid or not.
39
+ */
40
+ export const ERC1271_VALUES = {
41
+ MAGIC_VALUE: "0x1626ba7e",
42
+ FAIL_VALUE: "0xffffffff",
43
+ };
44
+ // ERC725X
45
+ // ----------
46
+ /**
47
+ * @dev list of ERC725X operation types.
48
+ * @see https://github.com/ERC725Alliance/ERC725/blob/develop/docs/ERC-725.md#execute
49
+ */
50
+ export const OPERATION_TYPES = {
51
+ CALL: 0,
52
+ CREATE: 1,
53
+ CREATE2: 2,
54
+ STATICCALL: 3,
55
+ DELEGATECALL: 4,
56
+ };
57
+ // ERC725Y
58
+ // ----------
59
+ /**
60
+ * @dev list of ERC725Y keys from the LSP standards.
61
+ * Can be used to detect if a contract implements a specific LSP Metadata standard
62
+ * and contain a set of pre-defined ERC725Y Data Keys.
63
+ */
64
+ export const SupportedStandards = {
65
+ LSP3UniversalProfile: {
66
+ key: "0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38",
67
+ value: "0xabe425d6",
68
+ },
69
+ LSP4DigitalAsset: {
70
+ key: "0xeafec4d89fa9619884b60000a4d96624a38f7ac2d8d9a604ecf07c12c77e480c",
71
+ value: "0xa4d96624",
72
+ },
73
+ LSP9Vault: {
74
+ key: "0xeafec4d89fa9619884b600007c0334a14085fefa8b51ae5a40895018882bdb90",
75
+ value: "0x7c0334a1",
76
+ },
77
+ };
78
+ /**
79
+ * @dev list of ERC725Y Metadata keys from the LSP standards.
80
+ * @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
81
+ */
82
+ export const ERC725YDataKeys = {
83
+ LSP1: {
84
+ // bytes10(keccak256('LSP1UniversalReceiverDelegate')) + bytes2(0)
85
+ LSP1UniversalReceiverDelegatePrefix: "0x0cfc51aec37c55a4d0b10000",
86
+ // keccak256('LSP1UniversalReceiverDelegate')
87
+ LSP1UniversalReceiverDelegate: "0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47",
88
+ },
89
+ LSP3: {
90
+ SupportedStandards_LSP3: SupportedStandards.LSP3UniversalProfile.key,
91
+ // keccak256('LSP3Profile')
92
+ LSP3Profile: "0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5",
93
+ },
94
+ LSP4: {
95
+ SupportedStandards_LSP4: SupportedStandards.LSP4DigitalAsset.key,
96
+ // keccak256('LSP4TokenName')
97
+ LSP4TokenName: "0xdeba1e292f8ba88238e10ab3c7f88bd4be4fac56cad5194b6ecceaf653468af1",
98
+ // keccak256('LSP4TokenSymbol')
99
+ LSP4TokenSymbol: "0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756",
100
+ // keccak256('LSP4Metadata')
101
+ LSP4Metadata: "0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e",
102
+ // LSP4CreatorsMap:<address> + bytes2(0)
103
+ LSP4CreatorsMap: "0x6de85eaf5d982b4e5da00000",
104
+ // keccak256('"LSP4Creators[]')
105
+ "LSP4Creators[]": {
106
+ length: "0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7",
107
+ index: "0x114bd03b3a46d48759680d81ebb2b414",
108
+ },
109
+ },
110
+ LSP5: {
111
+ // LSP5ReceivedAssetsMap:<address> + bytes2(0)
112
+ LSP5ReceivedAssetsMap: "0x812c4334633eb816c80d0000",
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
+ AddressPermissionsPrefix: "0x4b80742de2bf",
126
+ // AddressPermissions:Permissions:<address> + bytes2(0)
127
+ "AddressPermissions:Permissions": "0x4b80742de2bf82acb3630000",
128
+ // AddressPermissions:AllowedERC725YDataKeys:<address> + bytes2(0)
129
+ "AddressPermissions:AllowedERC725YDataKeys": "0x4b80742de2bf866c29110000",
130
+ // AddressPermissions:AllowedCalls:<address> + bytes2(0)
131
+ "AddressPermissions:AllowedCalls": "0x4b80742de2bf393a64c70000",
132
+ },
133
+ LSP9: {
134
+ SupportedStandards_LSP9: SupportedStandards.LSP9Vault.key,
135
+ },
136
+ LSP10: {
137
+ // keccak256('LSP10VaultsMap') + bytes2(0)
138
+ LSP10VaultsMap: "0x192448c3c0f88c7f238c0000",
139
+ // keccak256('LSP10Vaults[]')
140
+ "LSP10Vaults[]": {
141
+ length: "0x55482936e01da86729a45d2b87a6b1d3bc582bea0ec00e38bdb340e3af6f9f06",
142
+ index: "0x55482936e01da86729a45d2b87a6b1d3",
143
+ },
144
+ },
145
+ LSP12: {
146
+ // LSP12IssuedAssetsMap:<address> + bytes2(0)
147
+ LSP12IssuedAssetsMap: "0x74ac2555c10b9349e78f0000",
148
+ // keccak256('LSP12IssuedAssets[]')
149
+ "LSP12IssuedAssets[]": {
150
+ length: "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
151
+ index: "0x7c8c3416d6cda87cd42c71ea1843df28",
152
+ },
153
+ },
154
+ LSP17: {
155
+ // bytes10(keccak256('LSP17Extension')) + bytes2(0)
156
+ LSP17ExtensionPrefix: "0xcee78b4094da860110960000",
157
+ },
158
+ };
159
+ // LSP6
160
+ // ----------
161
+ /**
162
+ * @dev LSP6 version number for signing `executeRelayCall(...)` transaction using EIP191
163
+ * @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-6-KeyManager.md#executerelaycall
164
+ */
165
+ export const LSP6_VERSION = 6;
166
+ /**
167
+ * @dev `bytes32` hex value for all the LSP6 permissions excluding REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security (these should be set manually)
168
+ */
169
+ export const ALL_PERMISSIONS = "0x00000000000000000000000000000000000000000000000000000000003f3f7f";
170
+ /**
171
+ * @dev List of `bytes32` permissions from LSP6 Key Manager Standard
172
+ */
173
+ // prettier-ignore
174
+ export const PERMISSIONS = {
175
+ CHANGEOWNER: "0x0000000000000000000000000000000000000000000000000000000000000001",
176
+ ADDCONTROLLER: "0x0000000000000000000000000000000000000000000000000000000000000002",
177
+ CHANGEPERMISSIONS: "0x0000000000000000000000000000000000000000000000000000000000000004",
178
+ ADDEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000008",
179
+ CHANGEEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000010",
180
+ ADDUNIVERSALRECEIVERDELEGATE: "0x0000000000000000000000000000000000000000000000000000000000000020",
181
+ CHANGEUNIVERSALRECEIVERDELEGATE: "0x0000000000000000000000000000000000000000000000000000000000000040",
182
+ REENTRANCY: "0x0000000000000000000000000000000000000000000000000000000000000080",
183
+ SUPER_TRANSFERVALUE: "0x0000000000000000000000000000000000000000000000000000000000000100",
184
+ TRANSFERVALUE: "0x0000000000000000000000000000000000000000000000000000000000000200",
185
+ SUPER_CALL: "0x0000000000000000000000000000000000000000000000000000000000000400",
186
+ CALL: "0x0000000000000000000000000000000000000000000000000000000000000800",
187
+ SUPER_STATICCALL: "0x0000000000000000000000000000000000000000000000000000000000001000",
188
+ STATICCALL: "0x0000000000000000000000000000000000000000000000000000000000002000",
189
+ SUPER_DELEGATECALL: "0x0000000000000000000000000000000000000000000000000000000000004000",
190
+ DELEGATECALL: "0x0000000000000000000000000000000000000000000000000000000000008000",
191
+ DEPLOY: "0x0000000000000000000000000000000000000000000000000000000000010000",
192
+ SUPER_SETDATA: "0x0000000000000000000000000000000000000000000000000000000000020000",
193
+ SETDATA: "0x0000000000000000000000000000000000000000000000000000000000040000",
194
+ ENCRYPT: "0x0000000000000000000000000000000000000000000000000000000000080000",
195
+ DECRYPT: "0x0000000000000000000000000000000000000000000000000000000000100000",
196
+ SIGN: "0x0000000000000000000000000000000000000000000000000000000000200000",
197
+ };
198
+ /**
199
+ * @dev list of standard type IDs ("hooks") defined in the LSPs that can be used to notify
200
+ * a LSP1 compliant contract about certain type of transactions or information
201
+ * (e.g: token transfer, vault transfer, ownership transfer, etc...)
202
+ */
203
+ export const LSP1_TYPE_IDS = {
204
+ // keccak256('LSP0OwnershipTransferStarted')
205
+ LSP0OwnershipTransferStarted: "0xe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac6926",
206
+ // keccak256('LSP0OwnershipTransferred_SenderNotification')
207
+ LSP0OwnershipTransferred_SenderNotification: "0xa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f814",
208
+ // keccak256('LSP0OwnershipTransferred_RecipientNotification')
209
+ LSP0OwnershipTransferred_RecipientNotification: "0xceca317f109c43507871523e82dc2a3cc64dfa18f12da0b6db14f6e23f995538",
210
+ // keccak256('LSP7Tokens_SenderNotification')
211
+ LSP7Tokens_SenderNotification: "0x429ac7a06903dbc9c13dfcb3c9d11df8194581fa047c96d7a4171fc7402958ea",
212
+ // keccak256('LSP7Tokens_RecipientNotification')
213
+ LSP7Tokens_RecipientNotification: "0x20804611b3e2ea21c480dc465142210acf4a2485947541770ec1fb87dee4a55c",
214
+ // keccak256('LSP8Tokens_SenderNotification')
215
+ LSP8Tokens_SenderNotification: "0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00",
216
+ // keccak256('LSP8Tokens_RecipientNotification')
217
+ LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d",
218
+ // keccak256('LSP9OwnershipTransferStarted')
219
+ LSP9OwnershipTransferStarted: "0xaefd43f45fed1bcd8992f23c803b6f4ec45cf6b62b0d404d565f290a471e763f",
220
+ // keccak256('LSP9OwnershipTransferred_SenderNotification')
221
+ LSP9OwnershipTransferred_SenderNotification: "0x0c622e58e6b7089ae35f1af1c86d997be92fcdd8c9509652022d41aa65169471",
222
+ // keccak256('LSP9OwnershipTransferred_RecipientNotification')
223
+ LSP9OwnershipTransferred_RecipientNotification: "0x79855c97dbc259ce395421d933d7bc0699b0f1561f988f09a9e8633fd542fe5c",
224
+ // keccak256('LSP14OwnershipTransferStarted')
225
+ LSP14OwnershipTransferStarted: "0xee9a7c0924f740a2ca33d59b7f0c2929821ea9837ce043ce91c1823e9c4e52c0",
226
+ // keccak256('LSP14OwnershipTransferred_SenderNotification')
227
+ LSP14OwnershipTransferred_SenderNotification: "0xa124442e1cc7b52d8e2ede2787d43527dc1f3ae0de87f50dd03e27a71834f74c",
228
+ // keccak256('LSP14OwnershipTransferred_RecipientNotification')
229
+ LSP14OwnershipTransferred_RecipientNotification: "0xe32c7debcb817925ba4883fdbfc52797187f28f73f860641dab1a68d9b32902c",
230
+ };
231
+ export const Errors = {
232
+ LSP1: {
233
+ "0xa5295345": {
234
+ error: "CannotRegisterEOAsAsAssets(address)",
235
+ message: "LSP1: EOAs cannot call the UniversalReceiverDelegate with asset/vault typeIds",
236
+ },
237
+ "0x4c5e815a": {
238
+ error: "CallerNotLSP6LinkedTarget(address,address)",
239
+ message: "LSP1: Cannot write received vaults/assets on address other than the caller",
240
+ },
241
+ "0x114b721a": {
242
+ error: "NativeTokensNotAccepted()",
243
+ message: "LSP1: Cannot send native tokens to the UniversalReceiverDelegate",
244
+ },
245
+ },
246
+ LSP4: {
247
+ "0x85c169bd": {
248
+ error: "LSP4TokenNameNotEditable()",
249
+ message: "LSP4: Token name cannot be edited",
250
+ },
251
+ "0x76755b38": {
252
+ error: "LSP4TokenSymbolNotEditable()",
253
+ message: "LSP4: Token symbol cannot be edited",
254
+ },
255
+ },
256
+ LSP5: {
257
+ "0xecba7af8": {
258
+ error: "InvalidLSP5ReceivedAssetsArrayLength(bytes,uint256)",
259
+ message: "LSP5: Invalid value for `LSP5ReceivedAssets[]` (array length)",
260
+ },
261
+ "0x1c458e39": {
262
+ error: "ReceivedAssetsIndexSuperiorToUint64(uint256)",
263
+ message: "LSP5: The index of the received assets cannot be registered if superior to uint64",
264
+ },
265
+ "0xe8a4fba": {
266
+ error: "ReceivedAssetsIndexSuperiorToUint128(uint256)",
267
+ message: "LSP5: The index of the received assets cannot be registered if superior to uint128",
268
+ },
269
+ },
270
+ LSP6: {
271
+ "0xf292052a": {
272
+ error: "NoPermissionsSet(address)",
273
+ message: "LSP6: No permissions are set for this address.",
274
+ },
275
+ "0x3bdad6e6": {
276
+ error: "NotAuthorised(address,string)",
277
+ message: "LSP6: Not authorized (missing permission).",
278
+ },
279
+ "0x45147bce": {
280
+ error: "NotAllowedCall(address,address,bytes4)",
281
+ message: "LSP6: not authorised to interact with `to` with the provided data payload (standard, address or function of `to` not authorised).",
282
+ },
283
+ "0x557ae079": {
284
+ error: "NotAllowedERC725YDataKey(address,bytes32)",
285
+ message: "LSP6: not allowed to set the ERC725Y data key.",
286
+ },
287
+ "0x0f7d735b": {
288
+ error: "NotRecognisedPermissionKey(bytes32)",
289
+ message: "LSP6: could not recognise the permission data key being set.",
290
+ },
291
+ "0xfc854579": {
292
+ error: "InvalidLSP6Target()",
293
+ message: "LSP6: cannot linked the Key Manager to address(0).",
294
+ },
295
+ "0xc9bd9eb9": {
296
+ error: "InvalidRelayNonce(address,uint256,bytes)",
297
+ message: "LSP6: invalid nonce provided for signer address",
298
+ },
299
+ "0x2ba8851c": {
300
+ error: "InvalidERC725Function(bytes4)",
301
+ message: "LSP6: unknown or invalid ERC725 function selector",
302
+ },
303
+ "0xed7fa509": {
304
+ error: "NoERC725YDataKeysAllowed(address)",
305
+ message: "LSP6: caller has no AllowedERC725YDataKeys",
306
+ },
307
+ "0x4f0dfdda": {
308
+ error: "InvalidEncodedAllowedERC725YDataKeys(bytes)",
309
+ message: "LSP6: Invalid Encoding for the Compact Bytes Array of Allowed ERC725Y Data Keys.",
310
+ },
311
+ "0x8f4afa38": {
312
+ error: "AddressPermissionArrayIndexValueNotAnAddress(bytes32,bytes)",
313
+ message: "LSP6: value provided for AddressPermission[index] is not an address.",
314
+ },
315
+ "0x55a187db": {
316
+ error: "BatchExecuteParamsLengthMismatch()",
317
+ message: "LSP6: different number of elements for each array parameters in batch `execute(uint256[],bytes[])`",
318
+ },
319
+ "0xb4d50d21": {
320
+ error: "BatchExecuteRelayCallParamsLengthMismatch()",
321
+ message: "LSP6: different number of elements for each array parameters in batch `executeRelayCall(bytes[],uint256[],bytes[])`",
322
+ },
323
+ "0x30a324ac": {
324
+ error: "LSP6BatchInsufficientValueSent(uint256,uint256)",
325
+ message: "LSP6: `msg.value` sent is not enough to cover all the combined `values[]`.",
326
+ },
327
+ "0xa51868b6": {
328
+ error: "LSP6BatchExcessiveValueSent(uint256,uint256)",
329
+ message: "LSP6: cannot send more `msg.value` than all the combined `values[]`.",
330
+ },
331
+ "0x6cb60587": {
332
+ error: "NoCallsAllowed(address)",
333
+ message: "LSP6: No calls allowed for the provided address",
334
+ },
335
+ "0x6fd203c5": {
336
+ error: "InvalidWhitelistedCall(address)",
337
+ message: "LSP6: LSP6: Not allowed to whitelist all calls in AllowedCalls.",
338
+ },
339
+ "0x80d6ebae": {
340
+ error: "DelegateCallDisallowedViaKeyManager()",
341
+ message: "LSP6: DelegateCall is disallowed via the Key Manager",
342
+ },
343
+ "0x3621bbcc": {
344
+ error: "InvalidPayload(bytes)",
345
+ message: "LSP6: Invalid Payload",
346
+ },
347
+ },
348
+ LSP7: {
349
+ "0x08d47949": {
350
+ error: "LSP7AmountExceedsBalance(uint256,address,uint256)",
351
+ message: "LSP7: token amount exceeds sender's balance.",
352
+ },
353
+ "0xf3a6b691": {
354
+ error: "LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)",
355
+ message: "LSP7: token amount exceeds operator's allowance.",
356
+ },
357
+ "0x6355e766": {
358
+ error: "LSP7CannotUseAddressZeroAsOperator()",
359
+ message: "LSP7: cannot authorize address(0) as operator for LSP7 token.",
360
+ },
361
+ "0xd2d5ec30": {
362
+ error: "LSP7CannotSendWithAddressZero()",
363
+ message: "LSP7: cannot send token with address(0).",
364
+ },
365
+ "0xb9afb000": {
366
+ error: "LSP7CannotSendToSelf()",
367
+ message: "LSP7: `from` and `to` address cannot be the same",
368
+ },
369
+ "0x263eee8d": {
370
+ error: "LSP7InvalidTransferBatch()",
371
+ message: "LSP7: invalid transfer batch.",
372
+ },
373
+ "0xa608fbb6": {
374
+ error: "LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)",
375
+ message: "LSP7: token recipient does not implement LSP1 standard.",
376
+ },
377
+ "0x26c247f4": {
378
+ error: "LSP7NotifyTokenReceiverIsEOA(address)",
379
+ message: "LSP7: token recipient is an Externally Owned Account.",
380
+ },
381
+ dab75047: {
382
+ error: "LSP7TokenOwnerCannotBeOperator()",
383
+ message: "LSP7: token owner cannot be an operator.",
384
+ },
385
+ },
386
+ LSP7CappedSupply: {
387
+ "0xacf1d8c5": {
388
+ error: "LSP7CappedSupplyRequired()",
389
+ message: "LSP7CappedSupply: cap supply number required",
390
+ },
391
+ "0xeacbf0d1": {
392
+ error: "LSP7CappedSupplyCannotMintOverCap()",
393
+ message: "LSP7CappedSupply: cannot mint over the max cap supply",
394
+ },
395
+ },
396
+ LSP8: {
397
+ "0xae8f9a36": {
398
+ error: "LSP8NonExistentTokenId(bytes32)",
399
+ message: "LSP8: token id does not exist.",
400
+ },
401
+ "0x5b271ea2": {
402
+ error: "LSP8NotTokenOwner(address,bytes32,address)",
403
+ message: "LSP8: tokenOwner given as parameter does not own this token id.",
404
+ },
405
+ "0x1294d2a9": {
406
+ error: "LSP8NotTokenOperator(bytes32,address)",
407
+ message: "LSP8: caller is not an operator for this token id.",
408
+ },
409
+ "0x9577b8b3": {
410
+ error: "LSP8CannotUseAddressZeroAsOperator()",
411
+ message: "LSP8: cannot use address(0) as an operator for token id.",
412
+ },
413
+ "0x24ecef4d": {
414
+ error: "LSP8CannotSendToAddressZero()",
415
+ message: "LSP8: cannot send to address(0).",
416
+ },
417
+ "0x5d67d6c1": {
418
+ error: "LSP8CannotSendToSelf()",
419
+ message: "LSP8: the `from` and `to` address cannot be the same on transfer.",
420
+ },
421
+ "0x34c7b511": {
422
+ error: "LSP8TokenIdAlreadyMinted(bytes32)",
423
+ message: "LSP8: tokenId already exist (= already minted).",
424
+ },
425
+ "0x93a83119": {
426
+ error: "LSP8InvalidTransferBatch()",
427
+ message: "LSP8: invalid transfer batch.",
428
+ },
429
+ "0x4349776d": {
430
+ error: "LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)",
431
+ message: "LSP8: token recipient does not implement LSP1 standard.",
432
+ },
433
+ "0x03173137": {
434
+ error: "LSP8NotifyTokenReceiverIsEOA(address)",
435
+ message: "LSP8: token recipient is an Externally Owned Account.",
436
+ },
437
+ "0x4aa31a8c": {
438
+ error: "LSP8NonExistingOperator(address,bytes32)",
439
+ message: "LSP8: Cannot remove a non existing operator.",
440
+ },
441
+ "0xa7626b68": {
442
+ error: "LSP8OperatorAlreadyAuthorized(address,bytes32)",
443
+ message: "LSP8: Cannot authorize an existing operator twice for the same tokenId.",
444
+ },
445
+ "0x89fdad62": {
446
+ error: "LSP8TokenOwnerCannotBeOperator()",
447
+ message: "LSP8: Cannot authorize the token owner as an operator.",
448
+ },
449
+ },
450
+ LSP8CappedSupply: {
451
+ "0x38d9fc30": {
452
+ error: "LSP8CappedSupplyRequired()",
453
+ message: "LSP8CappedSupply: cap supply number required",
454
+ },
455
+ "0xe8ba2291": {
456
+ error: "LSP8CappedSupplyCannotMintOverCap()",
457
+ message: "LSP8CappedSupply: cannot mint over the max cap supply",
458
+ },
459
+ },
460
+ LSP9: {
461
+ "0x199611f": {
462
+ error: "LSP1DelegateNotAllowedToSetDataKey(bytes32)",
463
+ message: "The UniversalReceiverDelegate is not allowed to set this data key",
464
+ },
465
+ },
466
+ LSP11: {
467
+ "0x5560e16": {
468
+ error: "CallerIsNotGuardian(address)",
469
+ message: "LSP11: The caller is not a guardian",
470
+ },
471
+ "0xd52858db": {
472
+ error: "GuardianAlreadyExist(address)",
473
+ message: "LSP11: The address provided is already a guardian",
474
+ },
475
+ "0x3d8e524e": {
476
+ error: "GuardianDoNotExist(address)",
477
+ message: "LSP11: The address provided is not an existing guardian",
478
+ },
479
+ "0x27113777": {
480
+ error: "GuardiansNumberCannotGoBelowThreshold(uint256)",
481
+ message: "LSP11: The guardian number cannot go below the guardians threshold",
482
+ },
483
+ "0xe3db80bd": {
484
+ error: "ThresholdCannotBeHigherThanGuardiansNumber(uint256,uint256)",
485
+ message: "LSP11: The guardian threshold cannot be higher than the guardians number",
486
+ },
487
+ "0x7f617002": {
488
+ error: "SecretHashCannotBeZero()",
489
+ message: "LSP11: The secret hash cannot be bytes32(0)",
490
+ },
491
+ "0xf78f0507": {
492
+ error: "ThresholdNotReachedForRecoverer(address,uint256,uint256)",
493
+ message: "LSP11: The caller cannot recover as he didn't reach the guardians threshold",
494
+ },
495
+ "0x6fa723c3": {
496
+ error: "WrongPlainSecret()",
497
+ message: "LSP11: The plain secret provided do not produce the secret hash set by the owner",
498
+ },
499
+ "0x0855380c": {
500
+ error: "AddressZeroNotAllowed()",
501
+ message: "LSP11: The address zero is not allowed to call recoverOwnership function",
502
+ },
503
+ },
504
+ LSP14Ownable2Step: {
505
+ "0x8b9bf507": {
506
+ error: "NotInRenounceOwnershipInterval(uint256,uint256)",
507
+ message: "LSP14: Second renounce ownership call available after 100 block delay from the first call",
508
+ },
509
+ "0x43b248cd": {
510
+ error: "CannotTransferOwnershipToSelf()",
511
+ message: "LSP14: Cannot transfer ownership to address(this)",
512
+ },
513
+ },
514
+ LSP17ContractExtension: {
515
+ "0xbb370b2b": {
516
+ error: "NoExtensionFoundForFunctionSelector(bytes4)",
517
+ message: "The function being called on the contract is not supported and there is no extension for it",
518
+ },
519
+ },
520
+ };
521
+ export const EventSignatures = {
522
+ ERC173: {
523
+ /**
524
+ * event OwnershipTransferred(
525
+ * address indexed previousOwner,
526
+ * address indexed newOwner,
527
+ * );
528
+ *
529
+ * signature = keccak256('OwnershipTransferred(address,address)')
530
+ */
531
+ OwnershipTransfered: "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
532
+ },
533
+ ERC725X: {
534
+ /**
535
+ * event ContractCreated(
536
+ * uint256 indexed _operation,
537
+ * address indexed _contractAddress,
538
+ * uint256 indexed _value
539
+ * bytes32 _salt
540
+ * );
541
+ *
542
+ * signature = keccak256('ContractCreated(uint256,address,uint256,bytes32)')
543
+ */
544
+ ContractCreated: "0xa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3",
545
+ /**
546
+ * event Executed(
547
+ * uint256 indexed _operation,
548
+ * address indexed _to,
549
+ * uint256 indexed _value,
550
+ * bytes4 _data
551
+ * );
552
+ *
553
+ * signature = keccak256('Executed(uint256,address,uint256,bytes4)')
554
+ */
555
+ Executed: "0x4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e",
556
+ },
557
+ ERC725Y: {
558
+ /**
559
+ * event DataChanged(
560
+ * bytes32 indexed dataKey,
561
+ * bytes dataValue
562
+ * );
563
+ *
564
+ * signature = keccak256('DataChanged(bytes32,bytes)')
565
+ */
566
+ DataChanged: "0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2",
567
+ },
568
+ // ERC725Account
569
+ LSP0: {
570
+ /**
571
+ * event ValueReceived(
572
+ * address indexed sender,
573
+ * uint256 indexed value
574
+ * );
575
+ *
576
+ * signature = keccak256('ValueReceived(address,uint256)')
577
+ */
578
+ ValueReceived: "0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493",
579
+ },
580
+ LSP1: {
581
+ /**
582
+ * event UniversalReceiver(
583
+ * address indexed from,
584
+ * uint256 indexed value,
585
+ * bytes32 indexed typeId,
586
+ * bytes receivedData,
587
+ * bytes returnedValue
588
+ * );
589
+ *
590
+ * signature = keccak256('UniversalReceiver(address,uint256,bytes32,bytes,bytes)')
591
+ */
592
+ UniversalReceiver: "0x9c3ba68eb5742b8e3961aea0afc7371a71bf433c8a67a831803b64c064a178c2",
593
+ },
594
+ LSP6: {
595
+ /**
596
+ * event Executed(
597
+ * bytes4 indexed selector,
598
+ * uint256 indexed value
599
+ * );
600
+ *
601
+ * signature = keccak256('Executed(bytes4,uint256)')
602
+ */
603
+ Executed: "0x4004d18dc05f04c061c306cbb394d4083af494786ab828142d6118ab2c43a492",
604
+ },
605
+ LSP7: {
606
+ /**
607
+ * event Transfer(
608
+ * address indexed operator,
609
+ * address indexed from,
610
+ * address indexed to,
611
+ * uint256 amount,
612
+ * bool allowNonLSP1Recipient,
613
+ * bytes data
614
+ * );
615
+ *
616
+ * signature = keccak256('Transfer(address,address,address,uint256,bool,bytes)')
617
+ */
618
+ Transfer: "0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6",
619
+ /**
620
+ * event AuthorizedOperator(
621
+ * address indexed operator,
622
+ * address indexed tokenOwner,
623
+ * uint256 indexed amount
624
+ * );
625
+ *
626
+ * signature = keccak256('AuthorizedOperator(address,address,uint256)')
627
+ */
628
+ AuthorizedOperator: "0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c",
629
+ /**
630
+ * event RevokedOperator(
631
+ * address indexed operator,
632
+ * address indexed tokenOwner
633
+ * );
634
+ *
635
+ * signature = keccak256('RevokedOperator(address,address)')
636
+ */
637
+ RevokedOperator: "0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1",
638
+ },
639
+ LSP8: {
640
+ /**
641
+ * event Transfer(
642
+ * address operator,
643
+ * address indexed from,
644
+ * address indexed to,
645
+ * bytes32 indexed tokenId,
646
+ * bool allowNonLSP1Recipient,
647
+ * bytes data
648
+ * );
649
+ *
650
+ * signature = keccak256('Transfer(address,address,address,bytes32,bool,bytes)')
651
+ */
652
+ Transfer: "b333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf",
653
+ /**
654
+ * event AuthorizedOperator(
655
+ * address indexed operator,
656
+ * address indexed tokenOwner,
657
+ * bytes32 indexed tokenId
658
+ * );
659
+ *
660
+ * signature = keccak256('AuthorizedOperator(address,address,bytes32)')
661
+ */
662
+ AuthorizedOperator: "34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988",
663
+ /**
664
+ * event RevokedOperator(
665
+ * address indexed operator,
666
+ * address indexed tokenOwner,
667
+ * bytes32 indexed tokenId
668
+ * );
669
+ *
670
+ * signature = keccak256('RevokedOperator(address,address,bytes32)')
671
+ */
672
+ RevokedOperator: "17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5",
673
+ },
674
+ LSP9: {
675
+ /**
676
+ * event ValueReceived(
677
+ * address indexed sender,
678
+ * uint256 indexed value
679
+ * );
680
+ *
681
+ * signature = keccak256('ValueReceived(address,uint256)')
682
+ */
683
+ ValueReceived: "0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493",
684
+ },
685
+ LSP11: {
686
+ /**
687
+ * event GuardianAdded(address indexed newGuardian);
688
+ *
689
+ * signature = keccak256('GuardianAdded(address)')
690
+ */
691
+ GuardianAdded: "0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969",
692
+ /**
693
+ * event GuardianRemoved(address indexed removedGuardian);
694
+ *
695
+ * signature = keccak256('GuardianRemoved(address)')
696
+ */
697
+ GuardianRemoved: "0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52",
698
+ /**
699
+ * event GuardiansThresholdChanged(uint256 indexed guardianThreshold);
700
+ *
701
+ * signature = keccak256('GuardiansThresholdChanged(uint256)')
702
+ */
703
+ GuardiansThresholdChanged: "0x7146d20a2c7b7c75c203774c9f241b61698fac43a4a81ccd828f0d8162392790",
704
+ /**
705
+ * event SecretHashChanged(bytes32 indexed secretHash);
706
+ *
707
+ * signature = keccak256('SecretHashChanged(bytes32)')
708
+ */
709
+ SecretHashChanged: "0x2e8c5419a62207ade549fe0b66c1c85c16f5e1ed654815dee3a3f3ac41770df3",
710
+ /**
711
+ * event SelectedNewController(
712
+ * uint256 indexed recoveryCounter,
713
+ * address indexed guardian,
714
+ * address indexed addressSelected
715
+ * );
716
+ *
717
+ * signature = keccak256('SelectedNewController(uint256,address,address)')
718
+ */
719
+ SelectedNewController: "0xe43f3c1093c69ab76b2cf6246090acb2f8eab7f19ba9942dfc8b8ec446e3a3de",
720
+ /**
721
+ * event RecoveryProcessSuccessful(
722
+ * uint256 indexed recoveryCounter,
723
+ * address indexed newController,
724
+ * bytes32 indexed newSecretHash,
725
+ * address[] guardians
726
+ * );
727
+ *
728
+ * signature = keccak256('RecoveryProcessSuccessful(uint256,address,bytes32,address[])')
729
+ */
730
+ RecoveryProcessSuccessful: "0xf4ff8803d6b43af46d48c200977209829c2f42f19f27eda1c89dbf26a28009cd",
731
+ },
732
+ Helpers: {
733
+ /**
734
+ * event ReceivedERC777(
735
+ * address indexed token,
736
+ * address indexed _operator,
737
+ * address indexed _from,
738
+ * address _to,
739
+ * uint256 _amount
740
+ * );
741
+ *
742
+ * signature = keccak256('ReceivedERC777(address,address,address,address,uint256)')
743
+ */
744
+ ReceivedERC777: "0xdc38539587ea4d67f9f649ad9269646bab26927bad175bdcdfdab5dd297d5e1c",
745
+ },
746
+ LSP14Ownable2Step: {
747
+ /**
748
+ * event OwnershipTransferStarted(
749
+ * address indexed previousOwner,
750
+ * address indexed newOwner
751
+ * );
752
+ *
753
+ * signature = keccak256('OwnershipTransferStarted(address,address)')
754
+ */
755
+ OwnershipTransferStarted: "0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700",
756
+ /**
757
+ * event RenounceOwnershipStarted();
758
+ *
759
+ * signature = keccak256('RenounceOwnershipStarted()')
760
+ */
761
+ RenounceOwnershipStarted: "0x81b7f830f1f0084db6497c486cbe6974c86488dcc4e3738eab94ab6d6b1653e7",
762
+ /**
763
+ * event OwnershipRenounced();
764
+ *
765
+ * signature = keccak256('OwnershipRenounced()')
766
+ */
767
+ OwnershipRenounced: "0xd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce",
768
+ },
769
+ LSP16UniversalFactory: {
770
+ /**
771
+ * event ContractCreated(
772
+ * address indexed contractCreated,
773
+ * bytes32 indexed providedSalt,
774
+ * bool indexed initializable,
775
+ * bytes initializeCalldata
776
+ * );
777
+ *
778
+ * signature = keccak256('ContractCreated(address,bytes32,bool,bytes)')
779
+ */
780
+ ContractCreated: "0xc587425c92859c27d4383bf2eb0ab8ea1670c48039f8d6375b9947b82a20f746",
781
+ },
782
+ };