@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/module/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/module/constants.js
CHANGED
|
@@ -20,12 +20,12 @@ export const INTERFACE_IDS = {
|
|
|
20
20
|
ERC1155: "0xd9b67a26",
|
|
21
21
|
ERC725X: "0x570ef073",
|
|
22
22
|
ERC725Y: "0x714df77c",
|
|
23
|
-
LSP0ERC725Account: "
|
|
23
|
+
LSP0ERC725Account: "0x0f15a0af",
|
|
24
24
|
LSP1UniversalReceiver: "0x6bb56a14",
|
|
25
25
|
LSP6KeyManager: "0xfb437414",
|
|
26
26
|
LSP7DigitalAsset: "0xda1f85e4",
|
|
27
27
|
LSP8IdentifiableDigitalAsset: "0x622e7a01",
|
|
28
|
-
LSP9Vault: "
|
|
28
|
+
LSP9Vault: "0x19331ad1",
|
|
29
29
|
LSP11BasicSocialRecovery: "0x049a28f1",
|
|
30
30
|
LSP14Ownable2Step: "0x94be5999",
|
|
31
31
|
LSP17Extendable: "0xa918fa6b",
|
|
@@ -54,8 +54,6 @@ export const OPERATION_TYPES = {
|
|
|
54
54
|
STATICCALL: 3,
|
|
55
55
|
DELEGATECALL: 4,
|
|
56
56
|
};
|
|
57
|
-
// ERC725Y
|
|
58
|
-
// ----------
|
|
59
57
|
/**
|
|
60
58
|
* @dev list of ERC725Y keys from the LSP standards.
|
|
61
59
|
* Can be used to detect if a contract implements a specific LSP Metadata standard
|
|
@@ -163,6 +161,15 @@ export const ERC725YDataKeys = {
|
|
|
163
161
|
* @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-6-KeyManager.md#executerelaycall
|
|
164
162
|
*/
|
|
165
163
|
export const LSP6_VERSION = 6;
|
|
164
|
+
/**
|
|
165
|
+
* @dev The types of calls for AllowedCalls
|
|
166
|
+
*/
|
|
167
|
+
export const CALLTYPE = {
|
|
168
|
+
VALUE: "0x00000001",
|
|
169
|
+
WRITE: "0x00000002",
|
|
170
|
+
READ: "0x00000004",
|
|
171
|
+
EXECUTE: "0x00000008", // DELEGATE CALL
|
|
172
|
+
};
|
|
166
173
|
/**
|
|
167
174
|
* @dev `bytes32` hex value for all the LSP6 permissions excluding REENTRANCY, DELEGATECALL and SUPER_DELEGATECALL for security (these should be set manually)
|
|
168
175
|
*/
|
|
@@ -174,7 +181,7 @@ export const ALL_PERMISSIONS = "0x0000000000000000000000000000000000000000000000
|
|
|
174
181
|
export const PERMISSIONS = {
|
|
175
182
|
CHANGEOWNER: "0x0000000000000000000000000000000000000000000000000000000000000001",
|
|
176
183
|
ADDCONTROLLER: "0x0000000000000000000000000000000000000000000000000000000000000002",
|
|
177
|
-
|
|
184
|
+
EDITPERMISSIONS: "0x0000000000000000000000000000000000000000000000000000000000000004",
|
|
178
185
|
ADDEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000008",
|
|
179
186
|
CHANGEEXTENSIONS: "0x0000000000000000000000000000000000000000000000000000000000000010",
|
|
180
187
|
ADDUNIVERSALRECEIVERDELEGATE: "0x0000000000000000000000000000000000000000000000000000000000000020",
|
|
@@ -258,10 +265,6 @@ export const Errors = {
|
|
|
258
265
|
error: "InvalidLSP5ReceivedAssetsArrayLength(bytes,uint256)",
|
|
259
266
|
message: "LSP5: Invalid value for `LSP5ReceivedAssets[]` (array length)",
|
|
260
267
|
},
|
|
261
|
-
"0x1c458e39": {
|
|
262
|
-
error: "ReceivedAssetsIndexSuperiorToUint64(uint256)",
|
|
263
|
-
message: "LSP5: The index of the received assets cannot be registered if superior to uint64",
|
|
264
|
-
},
|
|
265
268
|
"0xe8a4fba": {
|
|
266
269
|
error: "ReceivedAssetsIndexSuperiorToUint128(uint256)",
|
|
267
270
|
message: "LSP5: The index of the received assets cannot be registered if superior to uint128",
|
|
@@ -304,8 +307,8 @@ export const Errors = {
|
|
|
304
307
|
error: "NoERC725YDataKeysAllowed(address)",
|
|
305
308
|
message: "LSP6: caller has no AllowedERC725YDataKeys",
|
|
306
309
|
},
|
|
307
|
-
"
|
|
308
|
-
error: "InvalidEncodedAllowedERC725YDataKeys(bytes)",
|
|
310
|
+
"0xae6cbd37": {
|
|
311
|
+
error: "InvalidEncodedAllowedERC725YDataKeys(bytes,string)",
|
|
309
312
|
message: "LSP6: Invalid Encoding for the Compact Bytes Array of Allowed ERC725Y Data Keys.",
|
|
310
313
|
},
|
|
311
314
|
"0x8f4afa38": {
|
|
@@ -464,7 +467,7 @@ export const Errors = {
|
|
|
464
467
|
},
|
|
465
468
|
},
|
|
466
469
|
LSP11: {
|
|
467
|
-
"
|
|
470
|
+
"0x5560e16d": {
|
|
468
471
|
error: "CallerIsNotGuardian(address)",
|
|
469
472
|
message: "LSP11: The caller is not a guardian",
|
|
470
473
|
},
|
|
@@ -593,14 +596,15 @@ export const EventSignatures = {
|
|
|
593
596
|
},
|
|
594
597
|
LSP6: {
|
|
595
598
|
/**
|
|
596
|
-
* event
|
|
599
|
+
* event VerifiedCall(
|
|
600
|
+
* address indexed signer,
|
|
601
|
+
* uint256 indexed value,
|
|
597
602
|
* bytes4 indexed selector,
|
|
598
|
-
* uint256 indexed value
|
|
599
603
|
* );
|
|
600
604
|
*
|
|
601
|
-
* signature = keccak256('
|
|
605
|
+
* signature = keccak256('VerifiedCall(address,uint256,bytes4)')
|
|
602
606
|
*/
|
|
603
|
-
|
|
607
|
+
VerifiedCall: "0xa54458b75709e42f79700ffb6cfc57c7e224d8a77a52c457ee7ecb8e22636280",
|
|
604
608
|
},
|
|
605
609
|
LSP7: {
|
|
606
610
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/lsp-smart-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The reference implementation for universal profiles smart contracts",
|
|
5
5
|
"directories": {
|
|
6
6
|
"test": "test"
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"import": "./module/constants.js",
|
|
34
34
|
"require": "./common/constant.js",
|
|
35
35
|
"types": "./common/constants.d.ts"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"./artifacts/*": "./artifacts/*"
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"test": "hardhat test",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"test:lsp8": "hardhat test --no-compile tests/LSP8IdentifiableDigitalAsset/*.test.ts tests/LSP8IdentifiableDigitalAsset/extensions/*.test.ts",
|
|
51
52
|
"test:lsp9": "hardhat test --no-compile tests/LSP9Vault/*.test.ts",
|
|
52
53
|
"test:lsp11": "hardhat test --no-compile tests/LSP11BasicSocialRecovery/*.test.ts",
|
|
54
|
+
"test:lsp20": "hardhat test --no-compile tests/LSP20CallVerification/LSP6KeyManager/*.test.ts",
|
|
53
55
|
"test:universalfactory": "hardhat test --no-compile tests/LSP16UniversalFactory/LSP16UniversalFactory.test.ts",
|
|
54
56
|
"test:foundry": "forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi",
|
|
55
57
|
"build": "hardhat compile",
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
},
|
|
84
86
|
"homepage": "https://github.com/lukso-network/lsp-smart-contracts#readme",
|
|
85
87
|
"dependencies": {
|
|
86
|
-
"@erc725/smart-contracts": "^4.
|
|
88
|
+
"@erc725/smart-contracts": "^4.2.0",
|
|
87
89
|
"@openzeppelin/contracts": "^4.8.0",
|
|
88
90
|
"@openzeppelin/contracts-upgradeable": "^4.8.0",
|
|
89
91
|
"solidity-bytes-utils": "0.8.0"
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
"devDependencies": {
|
|
92
94
|
"@erc725/erc725.js": "0.8.0",
|
|
93
95
|
"@lukso/eip191-signer.js": "^0.2.0",
|
|
94
|
-
"@nomicfoundation/hardhat-toolbox": "^
|
|
96
|
+
"@nomicfoundation/hardhat-toolbox": "^2.0.2",
|
|
95
97
|
"@nomiclabs/hardhat-web3": "^2.0.0",
|
|
96
98
|
"@primitivefi/hardhat-dodoc": "^0.1.1",
|
|
97
99
|
"@remix-project/remixd": "^0.5.1",
|