@lukso/lsp-smart-contracts 0.8.1 → 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.
- package/README.md +14 -1
- package/artifacts/LSP0ERC725Account.json +51 -5
- package/artifacts/LSP0ERC725AccountInit.json +51 -5
- package/artifacts/LSP11BasicSocialRecovery.json +2 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
- package/artifacts/LSP16UniversalFactory.json +31 -2
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +19 -35
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +13 -13
- package/artifacts/LSP4Compatibility.json +7 -2
- package/artifacts/LSP4DigitalAssetMetadata.json +7 -2
- package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +7 -2
- package/artifacts/LSP6KeyManager.json +91 -6
- package/artifacts/LSP6KeyManagerInit.json +103 -18
- package/artifacts/LSP7CappedSupply.json +7 -2
- package/artifacts/LSP7CappedSupplyInitAbstract.json +7 -2
- package/artifacts/LSP7CompatibleERC20.json +7 -2
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +7 -2
- package/artifacts/LSP7CompatibleERC20Mintable.json +9 -4
- package/artifacts/LSP7CompatibleERC20MintableInit.json +9 -4
- package/artifacts/LSP7DigitalAsset.json +7 -2
- package/artifacts/LSP7DigitalAssetInitAbstract.json +7 -2
- package/artifacts/LSP7Mintable.json +9 -4
- package/artifacts/LSP7MintableInit.json +9 -4
- package/artifacts/LSP8CappedSupply.json +7 -2
- package/artifacts/LSP8CappedSupplyInitAbstract.json +7 -2
- package/artifacts/LSP8CompatibleERC721.json +7 -2
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +7 -2
- package/artifacts/LSP8CompatibleERC721Mintable.json +9 -4
- package/artifacts/LSP8CompatibleERC721MintableInit.json +9 -4
- package/artifacts/LSP8IdentifiableDigitalAsset.json +7 -2
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +7 -2
- package/artifacts/LSP8Mintable.json +9 -4
- package/artifacts/LSP8MintableInit.json +9 -4
- package/artifacts/LSP9Vault.json +29 -5
- package/artifacts/LSP9VaultInit.json +29 -5
- package/artifacts/UniversalProfile.json +51 -5
- package/artifacts/UniversalProfileInit.json +51 -5
- package/common/constants.d.ts +50 -327
- package/common/constants.js +21 -17
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +27 -0
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +344 -195
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +47 -51
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +5 -6
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +27 -4
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +36 -77
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +8 -8
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +50 -55
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +18 -8
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +12 -0
- package/contracts/LSP20CallVerification/ILSP20CallVerification.sol +30 -0
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +74 -0
- package/contracts/LSP20CallVerification/LSP20Errors.sol +15 -0
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +50 -56
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +1 -1
- package/contracts/LSP6KeyManager/LSP6Constants.sol +8 -2
- package/contracts/LSP6KeyManager/LSP6Errors.sol +18 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +83 -12
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +277 -99
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +36 -9
- package/contracts/LSP6KeyManager/LSP6Utils.sol +30 -15
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +12 -17
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +12 -17
- package/contracts/LSP9Vault/ILSP9Vault.sol +19 -0
- package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +81 -58
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
- package/module/constants.d.ts +50 -327
- package/module/constants.js +20 -16
- package/package.json +6 -4
package/common/constants.d.ts
CHANGED
|
@@ -48,24 +48,23 @@ export declare const OPERATION_TYPES: {
|
|
|
48
48
|
STATICCALL: number;
|
|
49
49
|
DELEGATECALL: number;
|
|
50
50
|
};
|
|
51
|
+
export type LSP2ArrayKey = {
|
|
52
|
+
length: string;
|
|
53
|
+
index: string;
|
|
54
|
+
};
|
|
55
|
+
export type LSPSupportedStandard = {
|
|
56
|
+
key: string;
|
|
57
|
+
value: string;
|
|
58
|
+
};
|
|
51
59
|
/**
|
|
52
60
|
* @dev list of ERC725Y keys from the LSP standards.
|
|
53
61
|
* Can be used to detect if a contract implements a specific LSP Metadata standard
|
|
54
62
|
* and contain a set of pre-defined ERC725Y Data Keys.
|
|
55
63
|
*/
|
|
56
64
|
export declare const SupportedStandards: {
|
|
57
|
-
LSP3UniversalProfile:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
LSP4DigitalAsset: {
|
|
62
|
-
key: string;
|
|
63
|
-
value: string;
|
|
64
|
-
};
|
|
65
|
-
LSP9Vault: {
|
|
66
|
-
key: string;
|
|
67
|
-
value: string;
|
|
68
|
-
};
|
|
65
|
+
LSP3UniversalProfile: LSPSupportedStandard;
|
|
66
|
+
LSP4DigitalAsset: LSPSupportedStandard;
|
|
67
|
+
LSP9Vault: LSPSupportedStandard;
|
|
69
68
|
};
|
|
70
69
|
/**
|
|
71
70
|
* @dev list of ERC725Y Metadata keys from the LSP standards.
|
|
@@ -86,23 +85,14 @@ export declare const ERC725YDataKeys: {
|
|
|
86
85
|
LSP4TokenSymbol: string;
|
|
87
86
|
LSP4Metadata: string;
|
|
88
87
|
LSP4CreatorsMap: string;
|
|
89
|
-
"LSP4Creators[]":
|
|
90
|
-
length: string;
|
|
91
|
-
index: string;
|
|
92
|
-
};
|
|
88
|
+
"LSP4Creators[]": LSP2ArrayKey;
|
|
93
89
|
};
|
|
94
90
|
LSP5: {
|
|
95
91
|
LSP5ReceivedAssetsMap: string;
|
|
96
|
-
"LSP5ReceivedAssets[]":
|
|
97
|
-
length: string;
|
|
98
|
-
index: string;
|
|
99
|
-
};
|
|
92
|
+
"LSP5ReceivedAssets[]": LSP2ArrayKey;
|
|
100
93
|
};
|
|
101
94
|
LSP6: {
|
|
102
|
-
"AddressPermissions[]":
|
|
103
|
-
length: string;
|
|
104
|
-
index: string;
|
|
105
|
-
};
|
|
95
|
+
"AddressPermissions[]": LSP2ArrayKey;
|
|
106
96
|
AddressPermissionsPrefix: string;
|
|
107
97
|
"AddressPermissions:Permissions": string;
|
|
108
98
|
"AddressPermissions:AllowedERC725YDataKeys": string;
|
|
@@ -113,17 +103,11 @@ export declare const ERC725YDataKeys: {
|
|
|
113
103
|
};
|
|
114
104
|
LSP10: {
|
|
115
105
|
LSP10VaultsMap: string;
|
|
116
|
-
"LSP10Vaults[]":
|
|
117
|
-
length: string;
|
|
118
|
-
index: string;
|
|
119
|
-
};
|
|
106
|
+
"LSP10Vaults[]": LSP2ArrayKey;
|
|
120
107
|
};
|
|
121
108
|
LSP12: {
|
|
122
109
|
LSP12IssuedAssetsMap: string;
|
|
123
|
-
"LSP12IssuedAssets[]":
|
|
124
|
-
length: string;
|
|
125
|
-
index: string;
|
|
126
|
-
};
|
|
110
|
+
"LSP12IssuedAssets[]": LSP2ArrayKey;
|
|
127
111
|
};
|
|
128
112
|
LSP17: {
|
|
129
113
|
LSP17ExtensionPrefix: string;
|
|
@@ -133,18 +117,28 @@ export declare const ERC725YDataKeys: {
|
|
|
133
117
|
* @dev LSP6 version number for signing `executeRelayCall(...)` transaction using EIP191
|
|
134
118
|
* @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-6-KeyManager.md#executerelaycall
|
|
135
119
|
*/
|
|
136
|
-
export declare const LSP6_VERSION
|
|
120
|
+
export declare const LSP6_VERSION: number;
|
|
121
|
+
/**
|
|
122
|
+
* @dev The types of calls for AllowedCalls
|
|
123
|
+
*/
|
|
124
|
+
export declare const CALLTYPE: {
|
|
125
|
+
VALUE: string;
|
|
126
|
+
WRITE: string;
|
|
127
|
+
READ: string;
|
|
128
|
+
EXECUTE: string;
|
|
129
|
+
};
|
|
137
130
|
/**
|
|
138
131
|
* @dev `bytes32` hex value for all the LSP6 permissions excluding REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security (these should be set manually)
|
|
139
132
|
*/
|
|
140
|
-
export declare const ALL_PERMISSIONS
|
|
133
|
+
export declare const ALL_PERMISSIONS: string;
|
|
134
|
+
export type LSP6PermissionName = keyof typeof PERMISSIONS;
|
|
141
135
|
/**
|
|
142
136
|
* @dev List of `bytes32` permissions from LSP6 Key Manager Standard
|
|
143
137
|
*/
|
|
144
138
|
export declare const PERMISSIONS: {
|
|
145
139
|
CHANGEOWNER: string;
|
|
146
140
|
ADDCONTROLLER: string;
|
|
147
|
-
|
|
141
|
+
EDITPERMISSIONS: string;
|
|
148
142
|
ADDEXTENSIONS: string;
|
|
149
143
|
CHANGEEXTENSIONS: string;
|
|
150
144
|
ADDUNIVERSALRECEIVERDELEGATE: string;
|
|
@@ -185,295 +179,23 @@ export declare const LSP1_TYPE_IDS: {
|
|
|
185
179
|
LSP14OwnershipTransferred_SenderNotification: string;
|
|
186
180
|
LSP14OwnershipTransferred_RecipientNotification: string;
|
|
187
181
|
};
|
|
182
|
+
export type LSPErrorInfo = {
|
|
183
|
+
error: string;
|
|
184
|
+
message: string;
|
|
185
|
+
};
|
|
188
186
|
export declare const Errors: {
|
|
189
|
-
LSP1:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
LSP4: {
|
|
204
|
-
"0x85c169bd": {
|
|
205
|
-
error: string;
|
|
206
|
-
message: string;
|
|
207
|
-
};
|
|
208
|
-
"0x76755b38": {
|
|
209
|
-
error: string;
|
|
210
|
-
message: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
LSP5: {
|
|
214
|
-
"0xecba7af8": {
|
|
215
|
-
error: string;
|
|
216
|
-
message: string;
|
|
217
|
-
};
|
|
218
|
-
"0x1c458e39": {
|
|
219
|
-
error: string;
|
|
220
|
-
message: string;
|
|
221
|
-
};
|
|
222
|
-
"0xe8a4fba": {
|
|
223
|
-
error: string;
|
|
224
|
-
message: string;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
LSP6: {
|
|
228
|
-
"0xf292052a": {
|
|
229
|
-
error: string;
|
|
230
|
-
message: string;
|
|
231
|
-
};
|
|
232
|
-
"0x3bdad6e6": {
|
|
233
|
-
error: string;
|
|
234
|
-
message: string;
|
|
235
|
-
};
|
|
236
|
-
"0x45147bce": {
|
|
237
|
-
error: string;
|
|
238
|
-
message: string;
|
|
239
|
-
};
|
|
240
|
-
"0x557ae079": {
|
|
241
|
-
error: string;
|
|
242
|
-
message: string;
|
|
243
|
-
};
|
|
244
|
-
"0x0f7d735b": {
|
|
245
|
-
error: string;
|
|
246
|
-
message: string;
|
|
247
|
-
};
|
|
248
|
-
"0xfc854579": {
|
|
249
|
-
error: string;
|
|
250
|
-
message: string;
|
|
251
|
-
};
|
|
252
|
-
"0xc9bd9eb9": {
|
|
253
|
-
error: string;
|
|
254
|
-
message: string;
|
|
255
|
-
};
|
|
256
|
-
"0x2ba8851c": {
|
|
257
|
-
error: string;
|
|
258
|
-
message: string;
|
|
259
|
-
};
|
|
260
|
-
"0xed7fa509": {
|
|
261
|
-
error: string;
|
|
262
|
-
message: string;
|
|
263
|
-
};
|
|
264
|
-
"0x4f0dfdda": {
|
|
265
|
-
error: string;
|
|
266
|
-
message: string;
|
|
267
|
-
};
|
|
268
|
-
"0x8f4afa38": {
|
|
269
|
-
error: string;
|
|
270
|
-
message: string;
|
|
271
|
-
};
|
|
272
|
-
"0x55a187db": {
|
|
273
|
-
error: string;
|
|
274
|
-
message: string;
|
|
275
|
-
};
|
|
276
|
-
"0xb4d50d21": {
|
|
277
|
-
error: string;
|
|
278
|
-
message: string;
|
|
279
|
-
};
|
|
280
|
-
"0x30a324ac": {
|
|
281
|
-
error: string;
|
|
282
|
-
message: string;
|
|
283
|
-
};
|
|
284
|
-
"0xa51868b6": {
|
|
285
|
-
error: string;
|
|
286
|
-
message: string;
|
|
287
|
-
};
|
|
288
|
-
"0x6cb60587": {
|
|
289
|
-
error: string;
|
|
290
|
-
message: string;
|
|
291
|
-
};
|
|
292
|
-
"0x6fd203c5": {
|
|
293
|
-
error: string;
|
|
294
|
-
message: string;
|
|
295
|
-
};
|
|
296
|
-
"0x80d6ebae": {
|
|
297
|
-
error: string;
|
|
298
|
-
message: string;
|
|
299
|
-
};
|
|
300
|
-
"0x3621bbcc": {
|
|
301
|
-
error: string;
|
|
302
|
-
message: string;
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
|
-
LSP7: {
|
|
306
|
-
"0x08d47949": {
|
|
307
|
-
error: string;
|
|
308
|
-
message: string;
|
|
309
|
-
};
|
|
310
|
-
"0xf3a6b691": {
|
|
311
|
-
error: string;
|
|
312
|
-
message: string;
|
|
313
|
-
};
|
|
314
|
-
"0x6355e766": {
|
|
315
|
-
error: string;
|
|
316
|
-
message: string;
|
|
317
|
-
};
|
|
318
|
-
"0xd2d5ec30": {
|
|
319
|
-
error: string;
|
|
320
|
-
message: string;
|
|
321
|
-
};
|
|
322
|
-
"0xb9afb000": {
|
|
323
|
-
error: string;
|
|
324
|
-
message: string;
|
|
325
|
-
};
|
|
326
|
-
"0x263eee8d": {
|
|
327
|
-
error: string;
|
|
328
|
-
message: string;
|
|
329
|
-
};
|
|
330
|
-
"0xa608fbb6": {
|
|
331
|
-
error: string;
|
|
332
|
-
message: string;
|
|
333
|
-
};
|
|
334
|
-
"0x26c247f4": {
|
|
335
|
-
error: string;
|
|
336
|
-
message: string;
|
|
337
|
-
};
|
|
338
|
-
dab75047: {
|
|
339
|
-
error: string;
|
|
340
|
-
message: string;
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
LSP7CappedSupply: {
|
|
344
|
-
"0xacf1d8c5": {
|
|
345
|
-
error: string;
|
|
346
|
-
message: string;
|
|
347
|
-
};
|
|
348
|
-
"0xeacbf0d1": {
|
|
349
|
-
error: string;
|
|
350
|
-
message: string;
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
LSP8: {
|
|
354
|
-
"0xae8f9a36": {
|
|
355
|
-
error: string;
|
|
356
|
-
message: string;
|
|
357
|
-
};
|
|
358
|
-
"0x5b271ea2": {
|
|
359
|
-
error: string;
|
|
360
|
-
message: string;
|
|
361
|
-
};
|
|
362
|
-
"0x1294d2a9": {
|
|
363
|
-
error: string;
|
|
364
|
-
message: string;
|
|
365
|
-
};
|
|
366
|
-
"0x9577b8b3": {
|
|
367
|
-
error: string;
|
|
368
|
-
message: string;
|
|
369
|
-
};
|
|
370
|
-
"0x24ecef4d": {
|
|
371
|
-
error: string;
|
|
372
|
-
message: string;
|
|
373
|
-
};
|
|
374
|
-
"0x5d67d6c1": {
|
|
375
|
-
error: string;
|
|
376
|
-
message: string;
|
|
377
|
-
};
|
|
378
|
-
"0x34c7b511": {
|
|
379
|
-
error: string;
|
|
380
|
-
message: string;
|
|
381
|
-
};
|
|
382
|
-
"0x93a83119": {
|
|
383
|
-
error: string;
|
|
384
|
-
message: string;
|
|
385
|
-
};
|
|
386
|
-
"0x4349776d": {
|
|
387
|
-
error: string;
|
|
388
|
-
message: string;
|
|
389
|
-
};
|
|
390
|
-
"0x03173137": {
|
|
391
|
-
error: string;
|
|
392
|
-
message: string;
|
|
393
|
-
};
|
|
394
|
-
"0x4aa31a8c": {
|
|
395
|
-
error: string;
|
|
396
|
-
message: string;
|
|
397
|
-
};
|
|
398
|
-
"0xa7626b68": {
|
|
399
|
-
error: string;
|
|
400
|
-
message: string;
|
|
401
|
-
};
|
|
402
|
-
"0x89fdad62": {
|
|
403
|
-
error: string;
|
|
404
|
-
message: string;
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
LSP8CappedSupply: {
|
|
408
|
-
"0x38d9fc30": {
|
|
409
|
-
error: string;
|
|
410
|
-
message: string;
|
|
411
|
-
};
|
|
412
|
-
"0xe8ba2291": {
|
|
413
|
-
error: string;
|
|
414
|
-
message: string;
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
LSP9: {
|
|
418
|
-
"0x199611f": {
|
|
419
|
-
error: string;
|
|
420
|
-
message: string;
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
LSP11: {
|
|
424
|
-
"0x5560e16": {
|
|
425
|
-
error: string;
|
|
426
|
-
message: string;
|
|
427
|
-
};
|
|
428
|
-
"0xd52858db": {
|
|
429
|
-
error: string;
|
|
430
|
-
message: string;
|
|
431
|
-
};
|
|
432
|
-
"0x3d8e524e": {
|
|
433
|
-
error: string;
|
|
434
|
-
message: string;
|
|
435
|
-
};
|
|
436
|
-
"0x27113777": {
|
|
437
|
-
error: string;
|
|
438
|
-
message: string;
|
|
439
|
-
};
|
|
440
|
-
"0xe3db80bd": {
|
|
441
|
-
error: string;
|
|
442
|
-
message: string;
|
|
443
|
-
};
|
|
444
|
-
"0x7f617002": {
|
|
445
|
-
error: string;
|
|
446
|
-
message: string;
|
|
447
|
-
};
|
|
448
|
-
"0xf78f0507": {
|
|
449
|
-
error: string;
|
|
450
|
-
message: string;
|
|
451
|
-
};
|
|
452
|
-
"0x6fa723c3": {
|
|
453
|
-
error: string;
|
|
454
|
-
message: string;
|
|
455
|
-
};
|
|
456
|
-
"0x0855380c": {
|
|
457
|
-
error: string;
|
|
458
|
-
message: string;
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
LSP14Ownable2Step: {
|
|
462
|
-
"0x8b9bf507": {
|
|
463
|
-
error: string;
|
|
464
|
-
message: string;
|
|
465
|
-
};
|
|
466
|
-
"0x43b248cd": {
|
|
467
|
-
error: string;
|
|
468
|
-
message: string;
|
|
469
|
-
};
|
|
470
|
-
};
|
|
471
|
-
LSP17ContractExtension: {
|
|
472
|
-
"0xbb370b2b": {
|
|
473
|
-
error: string;
|
|
474
|
-
message: string;
|
|
475
|
-
};
|
|
476
|
-
};
|
|
187
|
+
LSP1: Record<string, LSPErrorInfo>;
|
|
188
|
+
LSP4: Record<string, LSPErrorInfo>;
|
|
189
|
+
LSP5: Record<string, LSPErrorInfo>;
|
|
190
|
+
LSP6: Record<string, LSPErrorInfo>;
|
|
191
|
+
LSP7: Record<string, LSPErrorInfo>;
|
|
192
|
+
LSP7CappedSupply: Record<string, LSPErrorInfo>;
|
|
193
|
+
LSP8: Record<string, LSPErrorInfo>;
|
|
194
|
+
LSP8CappedSupply: Record<string, LSPErrorInfo>;
|
|
195
|
+
LSP9: Record<string, LSPErrorInfo>;
|
|
196
|
+
LSP11: Record<string, LSPErrorInfo>;
|
|
197
|
+
LSP14Ownable2Step: Record<string, LSPErrorInfo>;
|
|
198
|
+
LSP17ContractExtension: Record<string, LSPErrorInfo>;
|
|
477
199
|
};
|
|
478
200
|
export declare const EventSignatures: {
|
|
479
201
|
ERC173: {
|
|
@@ -549,14 +271,15 @@ export declare const EventSignatures: {
|
|
|
549
271
|
};
|
|
550
272
|
LSP6: {
|
|
551
273
|
/**
|
|
552
|
-
* event
|
|
274
|
+
* event VerifiedCall(
|
|
275
|
+
* address indexed signer,
|
|
276
|
+
* uint256 indexed value,
|
|
553
277
|
* bytes4 indexed selector,
|
|
554
|
-
* uint256 indexed value
|
|
555
278
|
* );
|
|
556
279
|
*
|
|
557
|
-
* signature = keccak256('
|
|
280
|
+
* signature = keccak256('VerifiedCall(address,uint256,bytes4)')
|
|
558
281
|
*/
|
|
559
|
-
|
|
282
|
+
VerifiedCall: string;
|
|
560
283
|
};
|
|
561
284
|
LSP7: {
|
|
562
285
|
/**
|
package/common/constants.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see https://github.com/lukso-network/LIPs/tree/main/LSPs
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.EventSignatures = exports.Errors = exports.LSP1_TYPE_IDS = exports.PERMISSIONS = exports.ALL_PERMISSIONS = exports.LSP6_VERSION = exports.ERC725YDataKeys = exports.SupportedStandards = exports.OPERATION_TYPES = exports.ERC1271_VALUES = exports.INTERFACE_IDS = void 0;
|
|
7
|
+
exports.EventSignatures = exports.Errors = exports.LSP1_TYPE_IDS = exports.PERMISSIONS = exports.ALL_PERMISSIONS = exports.CALLTYPE = exports.LSP6_VERSION = exports.ERC725YDataKeys = exports.SupportedStandards = exports.OPERATION_TYPES = exports.ERC1271_VALUES = exports.INTERFACE_IDS = void 0;
|
|
8
8
|
// ERC165
|
|
9
9
|
// ---------
|
|
10
10
|
/**
|
|
@@ -23,12 +23,12 @@ exports.INTERFACE_IDS = {
|
|
|
23
23
|
ERC1155: "0xd9b67a26",
|
|
24
24
|
ERC725X: "0x570ef073",
|
|
25
25
|
ERC725Y: "0x714df77c",
|
|
26
|
-
LSP0ERC725Account: "
|
|
26
|
+
LSP0ERC725Account: "0x0f15a0af",
|
|
27
27
|
LSP1UniversalReceiver: "0x6bb56a14",
|
|
28
28
|
LSP6KeyManager: "0xfb437414",
|
|
29
29
|
LSP7DigitalAsset: "0xda1f85e4",
|
|
30
30
|
LSP8IdentifiableDigitalAsset: "0x622e7a01",
|
|
31
|
-
LSP9Vault: "
|
|
31
|
+
LSP9Vault: "0x19331ad1",
|
|
32
32
|
LSP11BasicSocialRecovery: "0x049a28f1",
|
|
33
33
|
LSP14Ownable2Step: "0x94be5999",
|
|
34
34
|
LSP17Extendable: "0xa918fa6b",
|
|
@@ -57,8 +57,6 @@ exports.OPERATION_TYPES = {
|
|
|
57
57
|
STATICCALL: 3,
|
|
58
58
|
DELEGATECALL: 4,
|
|
59
59
|
};
|
|
60
|
-
// ERC725Y
|
|
61
|
-
// ----------
|
|
62
60
|
/**
|
|
63
61
|
* @dev list of ERC725Y keys from the LSP standards.
|
|
64
62
|
* Can be used to detect if a contract implements a specific LSP Metadata standard
|
|
@@ -166,6 +164,15 @@ exports.ERC725YDataKeys = {
|
|
|
166
164
|
* @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-6-KeyManager.md#executerelaycall
|
|
167
165
|
*/
|
|
168
166
|
exports.LSP6_VERSION = 6;
|
|
167
|
+
/**
|
|
168
|
+
* @dev The types of calls for AllowedCalls
|
|
169
|
+
*/
|
|
170
|
+
exports.CALLTYPE = {
|
|
171
|
+
VALUE: "0x00000001",
|
|
172
|
+
WRITE: "0x00000002",
|
|
173
|
+
READ: "0x00000004",
|
|
174
|
+
EXECUTE: "0x00000008", // DELEGATE CALL
|
|
175
|
+
};
|
|
169
176
|
/**
|
|
170
177
|
* @dev `bytes32` hex value for all the LSP6 permissions excluding REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security (these should be set manually)
|
|
171
178
|
*/
|
|
@@ -177,7 +184,7 @@ exports.ALL_PERMISSIONS = "0x000000000000000000000000000000000000000000000000000
|
|
|
177
184
|
exports.PERMISSIONS = {
|
|
178
185
|
CHANGEOWNER: "0x0000000000000000000000000000000000000000000000000000000000000001",
|
|
179
186
|
ADDCONTROLLER: "0x0000000000000000000000000000000000000000000000000000000000000002",
|
|
180
|
-
|
|
187
|
+
EDITPERMISSIONS: "0x0000000000000000000000000000000000000000000000000000000000000004",
|
|
181
188
|
ADDEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000008",
|
|
182
189
|
CHANGEEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000010",
|
|
183
190
|
ADDUNIVERSALRECEIVERDELEGATE: "0x0000000000000000000000000000000000000000000000000000000000000020",
|
|
@@ -261,10 +268,6 @@ exports.Errors = {
|
|
|
261
268
|
error: "InvalidLSP5ReceivedAssetsArrayLength(bytes,uint256)",
|
|
262
269
|
message: "LSP5: Invalid value for `LSP5ReceivedAssets[]` (array length)",
|
|
263
270
|
},
|
|
264
|
-
"0x1c458e39": {
|
|
265
|
-
error: "ReceivedAssetsIndexSuperiorToUint64(uint256)",
|
|
266
|
-
message: "LSP5: The index of the received assets cannot be registered if superior to uint64",
|
|
267
|
-
},
|
|
268
271
|
"0xe8a4fba": {
|
|
269
272
|
error: "ReceivedAssetsIndexSuperiorToUint128(uint256)",
|
|
270
273
|
message: "LSP5: The index of the received assets cannot be registered if superior to uint128",
|
|
@@ -307,8 +310,8 @@ exports.Errors = {
|
|
|
307
310
|
error: "NoERC725YDataKeysAllowed(address)",
|
|
308
311
|
message: "LSP6: caller has no AllowedERC725YDataKeys",
|
|
309
312
|
},
|
|
310
|
-
"
|
|
311
|
-
error: "InvalidEncodedAllowedERC725YDataKeys(bytes)",
|
|
313
|
+
"0xae6cbd37": {
|
|
314
|
+
error: "InvalidEncodedAllowedERC725YDataKeys(bytes,string)",
|
|
312
315
|
message: "LSP6: Invalid Encoding for the Compact Bytes Array of Allowed ERC725Y Data Keys.",
|
|
313
316
|
},
|
|
314
317
|
"0x8f4afa38": {
|
|
@@ -467,7 +470,7 @@ exports.Errors = {
|
|
|
467
470
|
},
|
|
468
471
|
},
|
|
469
472
|
LSP11: {
|
|
470
|
-
"
|
|
473
|
+
"0x5560e16d": {
|
|
471
474
|
error: "CallerIsNotGuardian(address)",
|
|
472
475
|
message: "LSP11: The caller is not a guardian",
|
|
473
476
|
},
|
|
@@ -596,14 +599,15 @@ exports.EventSignatures = {
|
|
|
596
599
|
},
|
|
597
600
|
LSP6: {
|
|
598
601
|
/**
|
|
599
|
-
* event
|
|
602
|
+
* event VerifiedCall(
|
|
603
|
+
* address indexed signer,
|
|
604
|
+
* uint256 indexed value,
|
|
600
605
|
* bytes4 indexed selector,
|
|
601
|
-
* uint256 indexed value
|
|
602
606
|
* );
|
|
603
607
|
*
|
|
604
|
-
* signature = keccak256('
|
|
608
|
+
* signature = keccak256('VerifiedCall(address,uint256,bytes4)')
|
|
605
609
|
*/
|
|
606
|
-
|
|
610
|
+
VerifiedCall: "0xa54458b75709e42f79700ffb6cfc57c7e224d8a77a52c457ee7ecb8e22636280",
|
|
607
611
|
},
|
|
608
612
|
LSP7: {
|
|
609
613
|
/**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
pragma solidity ^0.8.4;
|
|
3
|
+
|
|
4
|
+
// interfaces
|
|
5
|
+
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
|
6
|
+
import {IERC725X} from "@erc725/smart-contracts/contracts/interfaces/IERC725X.sol";
|
|
7
|
+
import {IERC725Y} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";
|
|
8
|
+
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";
|
|
9
|
+
import {ILSP1UniversalReceiver} from "../LSP1UniversalReceiver/ILSP1UniversalReceiver.sol";
|
|
10
|
+
import {ILSP14Ownable2Step} from "../LSP14Ownable2Step/ILSP14Ownable2Step.sol";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title Interface of ERC725Account
|
|
14
|
+
*/
|
|
15
|
+
interface ILSP0ERC725Account is
|
|
16
|
+
IERC165,
|
|
17
|
+
IERC725X,
|
|
18
|
+
IERC725Y,
|
|
19
|
+
IERC1271,
|
|
20
|
+
ILSP1UniversalReceiver,
|
|
21
|
+
ILSP14Ownable2Step
|
|
22
|
+
{
|
|
23
|
+
/**
|
|
24
|
+
* @dev Receives and executes a batch of function calls on this contract.
|
|
25
|
+
*/
|
|
26
|
+
function batchCalls(bytes[] calldata data) external returns (bytes[] memory results);
|
|
27
|
+
}
|