@lukso/lsp-smart-contracts 0.12.0-rc.0 → 0.12.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 (135) hide show
  1. package/artifacts/LSP0ERC725Account.json +18 -24
  2. package/artifacts/LSP0ERC725AccountInit.json +18 -24
  3. package/artifacts/LSP1UniversalReceiverDelegateUP.json +15 -2
  4. package/artifacts/LSP1UniversalReceiverDelegateVault.json +15 -2
  5. package/artifacts/LSP6KeyManager.json +25 -2
  6. package/artifacts/LSP6KeyManagerInit.json +25 -2
  7. package/artifacts/LSP7CappedSupply.json +35 -0
  8. package/artifacts/LSP7CappedSupplyInitAbstract.json +35 -0
  9. package/artifacts/LSP7CompatibleERC20.json +35 -0
  10. package/artifacts/LSP7CompatibleERC20InitAbstract.json +35 -0
  11. package/artifacts/LSP7CompatibleERC20Mintable.json +37 -2
  12. package/artifacts/LSP7CompatibleERC20MintableInit.json +37 -2
  13. package/artifacts/LSP7DigitalAsset.json +35 -0
  14. package/artifacts/LSP7DigitalAssetInitAbstract.json +35 -0
  15. package/artifacts/LSP7Mintable.json +37 -2
  16. package/artifacts/LSP7MintableInit.json +37 -2
  17. package/artifacts/LSP8CappedSupply.json +24 -0
  18. package/artifacts/LSP8CappedSupplyInitAbstract.json +24 -0
  19. package/artifacts/LSP8CompatibleERC721.json +24 -0
  20. package/artifacts/LSP8CompatibleERC721InitAbstract.json +24 -0
  21. package/artifacts/LSP8CompatibleERC721Mintable.json +26 -2
  22. package/artifacts/LSP8CompatibleERC721MintableInit.json +26 -2
  23. package/artifacts/LSP8IdentifiableDigitalAsset.json +24 -0
  24. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +24 -0
  25. package/artifacts/LSP8Mintable.json +26 -2
  26. package/artifacts/LSP8MintableInit.json +26 -2
  27. package/artifacts/LSP9Vault.json +15 -21
  28. package/artifacts/LSP9VaultInit.json +15 -21
  29. package/artifacts/UniversalProfile.json +18 -24
  30. package/artifacts/UniversalProfileInit.json +18 -24
  31. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -8
  32. package/contracts/LSP0ERC725Account/LSP0Constants.sol +5 -0
  33. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
  34. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +75 -30
  35. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
  36. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
  37. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +12 -8
  38. package/contracts/LSP17ContractExtension/LSP17Extension.sol +2 -1
  39. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +30 -7
  40. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +16 -7
  41. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +3 -2
  42. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +43 -49
  43. package/contracts/LSP20CallVerification/LSP20Errors.sol +2 -2
  44. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +42 -2
  45. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +3 -3
  46. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +60 -0
  47. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
  48. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +7 -5
  49. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +122 -176
  50. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +7 -5
  51. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
  52. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +8 -1
  53. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +7 -1
  54. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +5 -0
  55. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +8 -5
  56. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +6 -5
  57. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +41 -74
  58. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +6 -5
  59. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +10 -7
  60. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +10 -7
  61. package/contracts/LSP9Vault/ILSP9Vault.sol +0 -8
  62. package/contracts/LSP9Vault/LSP9Constants.sol +5 -0
  63. package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
  64. package/contracts/LSP9Vault/LSP9VaultCore.sol +63 -27
  65. package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -1
  66. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
  67. package/contracts/UniversalProfile.sol +1 -1
  68. package/contracts/UniversalProfileInit.sol +1 -1
  69. package/contracts/UniversalProfileInitAbstract.sol +1 -1
  70. package/contracts/Version.sol +16 -0
  71. package/devdocs/LSP0ERC725Account.json +14 -8
  72. package/devdocs/LSP0ERC725AccountInit.json +14 -8
  73. package/devdocs/LSP1UniversalReceiverDelegateUP.json +6 -0
  74. package/devdocs/LSP1UniversalReceiverDelegateVault.json +6 -0
  75. package/devdocs/LSP6KeyManager.json +16 -0
  76. package/devdocs/LSP6KeyManagerInit.json +16 -0
  77. package/devdocs/LSP7CappedSupply.json +16 -10
  78. package/devdocs/LSP7CappedSupplyInitAbstract.json +16 -10
  79. package/devdocs/LSP7CompatibleERC20.json +16 -10
  80. package/devdocs/LSP7CompatibleERC20InitAbstract.json +16 -10
  81. package/devdocs/LSP7CompatibleERC20Mintable.json +16 -10
  82. package/devdocs/LSP7CompatibleERC20MintableInit.json +16 -10
  83. package/devdocs/LSP7DigitalAsset.json +16 -10
  84. package/devdocs/LSP7DigitalAssetInitAbstract.json +16 -10
  85. package/devdocs/LSP7Mintable.json +16 -10
  86. package/devdocs/LSP7MintableInit.json +16 -10
  87. package/devdocs/LSP8CappedSupply.json +9 -2
  88. package/devdocs/LSP8CappedSupplyInitAbstract.json +9 -2
  89. package/devdocs/LSP8CompatibleERC721.json +9 -2
  90. package/devdocs/LSP8CompatibleERC721InitAbstract.json +9 -2
  91. package/devdocs/LSP8CompatibleERC721Mintable.json +9 -2
  92. package/devdocs/LSP8CompatibleERC721MintableInit.json +9 -2
  93. package/devdocs/LSP8IdentifiableDigitalAsset.json +9 -2
  94. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +9 -2
  95. package/devdocs/LSP8Mintable.json +9 -2
  96. package/devdocs/LSP8MintableInit.json +9 -2
  97. package/devdocs/LSP9Vault.json +12 -6
  98. package/devdocs/LSP9VaultInit.json +12 -6
  99. package/devdocs/UniversalProfile.json +14 -8
  100. package/devdocs/UniversalProfileInit.json +14 -8
  101. package/dist/constants.cjs.js +1211 -454
  102. package/dist/constants.d.ts +1277 -374
  103. package/dist/constants.es.js +1211 -454
  104. package/package.json +1 -3
  105. package/userdocs/LSP0ERC725Account.json +3 -3
  106. package/userdocs/LSP0ERC725AccountInit.json +3 -3
  107. package/userdocs/LSP1UniversalReceiverDelegateUP.json +3 -0
  108. package/userdocs/LSP1UniversalReceiverDelegateVault.json +3 -0
  109. package/userdocs/LSP6KeyManager.json +3 -0
  110. package/userdocs/LSP6KeyManagerInit.json +3 -0
  111. package/userdocs/LSP7CappedSupply.json +3 -0
  112. package/userdocs/LSP7CappedSupplyInitAbstract.json +3 -0
  113. package/userdocs/LSP7CompatibleERC20.json +3 -0
  114. package/userdocs/LSP7CompatibleERC20InitAbstract.json +3 -0
  115. package/userdocs/LSP7CompatibleERC20Mintable.json +3 -0
  116. package/userdocs/LSP7CompatibleERC20MintableInit.json +3 -0
  117. package/userdocs/LSP7DigitalAsset.json +3 -0
  118. package/userdocs/LSP7DigitalAssetInitAbstract.json +3 -0
  119. package/userdocs/LSP7Mintable.json +3 -0
  120. package/userdocs/LSP7MintableInit.json +3 -0
  121. package/userdocs/LSP8CappedSupply.json +3 -0
  122. package/userdocs/LSP8CappedSupplyInitAbstract.json +3 -0
  123. package/userdocs/LSP8CompatibleERC721.json +3 -0
  124. package/userdocs/LSP8CompatibleERC721InitAbstract.json +3 -0
  125. package/userdocs/LSP8CompatibleERC721Mintable.json +3 -0
  126. package/userdocs/LSP8CompatibleERC721MintableInit.json +3 -0
  127. package/userdocs/LSP8IdentifiableDigitalAsset.json +3 -0
  128. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +3 -0
  129. package/userdocs/LSP8Mintable.json +3 -0
  130. package/userdocs/LSP8MintableInit.json +3 -0
  131. package/userdocs/LSP9Vault.json +3 -3
  132. package/userdocs/LSP9VaultInit.json +3 -3
  133. package/userdocs/UniversalProfile.json +3 -3
  134. package/userdocs/UniversalProfileInit.json +3 -3
  135. package/CONTRIBUTING.md +0 -188
@@ -20,6 +20,7 @@ import {LSP1Utils} from "../LSP1UniversalReceiver/LSP1Utils.sol";
20
20
  import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
21
21
 
22
22
  // modules
23
+ import {Version} from "../Version.sol";
23
24
  import {ERC725XCore} from "@erc725/smart-contracts/contracts/ERC725XCore.sol";
24
25
  import {ERC725YCore} from "@erc725/smart-contracts/contracts/ERC725YCore.sol";
25
26
  import {
@@ -55,6 +56,7 @@ import {
55
56
  } from "../LSP6KeyManager/LSP6Constants.sol";
56
57
  import {
57
58
  _INTERFACEID_LSP9,
59
+ _TYPEID_LSP9_VALUE_RECEIVED,
58
60
  _TYPEID_LSP9_OwnershipTransferStarted,
59
61
  _TYPEID_LSP9_OwnershipTransferred_SenderNotification,
60
62
  _TYPEID_LSP9_OwnershipTransferred_RecipientNotification
@@ -79,6 +81,7 @@ import {
79
81
  contract LSP9VaultCore is
80
82
  ERC725XCore,
81
83
  ERC725YCore,
84
+ Version,
82
85
  LSP14Ownable2Step,
83
86
  LSP17Extendable,
84
87
  ILSP1UniversalReceiver,
@@ -94,10 +97,12 @@ contract LSP9VaultCore is
94
97
  * - When receiving some native tokens without any additional data.
95
98
  * - On empty calls to the contract.
96
99
  *
97
- * @custom:events {ValueReceived} when receiving native tokens.
100
+ * @custom:events {UniversalReceiver} when receiving native tokens.
98
101
  */
99
102
  receive() external payable virtual {
100
- if (msg.value != 0) emit ValueReceived(msg.sender, msg.value);
103
+ if (msg.value != 0) {
104
+ universalReceiver(_TYPEID_LSP9_VALUE_RECEIVED, "");
105
+ }
101
106
  }
102
107
 
103
108
  /**
@@ -119,17 +124,16 @@ contract LSP9VaultCore is
119
124
  *
120
125
  * 2. If the data sent to this function is of length less than 4 bytes (not a function selector), return.
121
126
  *
122
- * @custom:events {ValueReceived} event when receiving native tokens.
127
+ * @custom:events {UniversalReceiver} event when receiving native tokens and extension function selector is not found or not payable.
123
128
  */
124
129
  // solhint-disable-next-line no-complex-fallback
125
130
  fallback(
126
131
  bytes calldata callData
127
132
  ) external payable virtual returns (bytes memory) {
128
- if (msg.value != 0) {
129
- emit ValueReceived(msg.sender, msg.value);
130
- }
131
-
132
133
  if (msg.data.length < 4) {
134
+ // if value is associated with the extension call, use the universalReceiver
135
+ if (msg.value != 0)
136
+ universalReceiver(_TYPEID_LSP9_VALUE_RECEIVED, callData);
133
137
  return "";
134
138
  }
135
139
 
@@ -185,7 +189,7 @@ contract LSP9VaultCore is
185
189
  * @custom:events
186
190
  * - {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3).
187
191
  * - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2).
188
- * - {ValueReceived} event when receiving native tokens.
192
+ * - {UniversalReceiver} event when receiving native tokens.
189
193
  *
190
194
  * @custom:info The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.
191
195
  */
@@ -195,7 +199,15 @@ contract LSP9VaultCore is
195
199
  uint256 value,
196
200
  bytes memory data
197
201
  ) public payable virtual override onlyOwner returns (bytes memory) {
198
- if (msg.value != 0) emit ValueReceived(msg.sender, msg.value);
202
+ if (msg.value != 0) {
203
+ emit UniversalReceiver(
204
+ msg.sender,
205
+ msg.value,
206
+ _TYPEID_LSP9_VALUE_RECEIVED,
207
+ abi.encodePacked(msg.sig),
208
+ ""
209
+ );
210
+ }
199
211
  return _execute(operationType, target, value, data);
200
212
  }
201
213
 
@@ -212,7 +224,7 @@ contract LSP9VaultCore is
212
224
  * @custom:events
213
225
  * - {Executed} event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). (each iteration)
214
226
  * - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). (each iteration)
215
- * - {ValueReceived} event when receiving native tokens.
227
+ * - {UniversalReceiver} event when receiving native tokens.
216
228
  *
217
229
  * @custom:info The `operationType` 4 `DELEGATECALL` is disabled by default in the LSP9 Vault.
218
230
  */
@@ -222,7 +234,15 @@ contract LSP9VaultCore is
222
234
  uint256[] memory values,
223
235
  bytes[] memory datas
224
236
  ) public payable virtual override onlyOwner returns (bytes[] memory) {
225
- if (msg.value != 0) emit ValueReceived(msg.sender, msg.value);
237
+ if (msg.value != 0) {
238
+ emit UniversalReceiver(
239
+ msg.sender,
240
+ msg.value,
241
+ _TYPEID_LSP9_VALUE_RECEIVED,
242
+ abi.encodePacked(msg.sig),
243
+ ""
244
+ );
245
+ }
226
246
  return _executeBatch(operationsType, targets, values, datas);
227
247
  }
228
248
 
@@ -232,7 +252,6 @@ contract LSP9VaultCore is
232
252
  * @custom:requirements Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.
233
253
  *
234
254
  * @custom:events
235
- * - {ValueReceived} event when receiving native tokens.
236
255
  * - {DataChanged} event.
237
256
  */
238
257
  function setData(
@@ -260,7 +279,6 @@ contract LSP9VaultCore is
260
279
  * @custom:requirements Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.
261
280
  *
262
281
  * @custom:events
263
- * - {ValueReceived} event when receiving native tokens.
264
282
  * - {DataChanged} event. (on each iteration of setting data)
265
283
  */
266
284
  function setDataBatch(
@@ -320,15 +338,14 @@ contract LSP9VaultCore is
320
338
  * @return returnedValues The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call.
321
339
  *
322
340
  * @custom:events
323
- * - {ValueReceived} when receiving native tokens.
324
341
  * - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.
325
342
  */
326
343
  function universalReceiver(
327
344
  bytes32 typeId,
328
- bytes calldata receivedData
345
+ bytes memory receivedData
329
346
  ) public payable virtual override returns (bytes memory returnedValues) {
330
- if (msg.value != 0) {
331
- emit ValueReceived(msg.sender, msg.value);
347
+ if (msg.value != 0 && (typeId != _TYPEID_LSP9_VALUE_RECEIVED)) {
348
+ universalReceiver(_TYPEID_LSP9_VALUE_RECEIVED, msg.data);
332
349
  }
333
350
 
334
351
  bytes memory lsp1DelegateValue = _getData(
@@ -512,8 +529,9 @@ contract LSP9VaultCore is
512
529
  /**
513
530
  * @dev Forwards the call to an extension mapped to a function selector.
514
531
  *
515
- * Calls {_getExtension} to get the address of the extension mapped to the function selector being
532
+ * Calls {_getExtensionAndForwardValue} to get the address of the extension mapped to the function selector being
516
533
  * called on the account. If there is no extension, the `address(0)` will be returned.
534
+ * Forwards the value if the extension is payable.
517
535
  *
518
536
  * Reverts if there is no extension for the function being called, except for the `bytes4(0)` function selector, which passes even if there is no extension for it.
519
537
  *
@@ -533,7 +551,14 @@ contract LSP9VaultCore is
533
551
  bytes calldata callData
534
552
  ) internal virtual override returns (bytes memory) {
535
553
  // If there is a function selector
536
- address extension = _getExtension(msg.sig);
554
+ (
555
+ address extension,
556
+ bool isForwardingValue
557
+ ) = _getExtensionAndForwardValue(msg.sig);
558
+
559
+ // if value is associated with the extension call and function selector is not payable, use the universalReceiver
560
+ if (msg.value != 0 && !isForwardingValue)
561
+ universalReceiver(_TYPEID_LSP9_VALUE_RECEIVED, callData);
537
562
 
538
563
  // if no extension was found for bytes4(0) return don't revert
539
564
  if (msg.sig == bytes4(0) && extension == address(0)) return "";
@@ -542,9 +567,9 @@ contract LSP9VaultCore is
542
567
  if (extension == address(0))
543
568
  revert NoExtensionFoundForFunctionSelector(msg.sig);
544
569
 
545
- (bool success, bytes memory result) = extension.call(
546
- abi.encodePacked(callData, msg.sender, msg.value)
547
- );
570
+ (bool success, bytes memory result) = extension.call{
571
+ value: isForwardingValue ? msg.value : 0
572
+ }(abi.encodePacked(callData, msg.sender, msg.value));
548
573
 
549
574
  if (success) {
550
575
  return result;
@@ -565,18 +590,29 @@ contract LSP9VaultCore is
565
590
  * - {_LSP17_EXTENSION_PREFIX} + `<bytes4>` (Check [LSP2-ERC725YJSONSchema] for encoding the data key).
566
591
  * - If no extension is stored, returns the address(0).
567
592
  */
568
- function _getExtension(
593
+ function _getExtensionAndForwardValue(
569
594
  bytes4 functionSelector
570
- ) internal view virtual override returns (address) {
595
+ ) internal view virtual override returns (address, bool) {
596
+ // Generate the data key relevant for the functionSelector being called
571
597
  bytes32 mappedExtensionDataKey = LSP2Utils.generateMappingKey(
572
598
  _LSP17_EXTENSION_PREFIX,
573
599
  functionSelector
574
600
  );
575
601
 
576
- // Check if there is an extension for the function selector provided
577
- address extension = address(bytes20(_getData(mappedExtensionDataKey)));
602
+ bytes memory extensionData = ERC725YCore._getData(
603
+ mappedExtensionDataKey
604
+ );
605
+
606
+ // Check if the extensionData is 21 bytes long (20 bytes of address + 1 byte as bool indicator ot forwards the value)
607
+ if (extensionData.length == 21) {
608
+ // Check if the last byte is 1 (true)
609
+ if (extensionData[20] == hex"01") {
610
+ // Return the address of the extension
611
+ return (address(bytes20(extensionData)), true);
612
+ }
613
+ }
578
614
 
579
- return extension;
615
+ return (address(bytes20(extensionData)), false);
580
616
  }
581
617
 
582
618
  /**
@@ -24,7 +24,7 @@ contract LSP9VaultInit is LSP9VaultInitAbstract {
24
24
  * @param newOwner The new owner of the contract.
25
25
  *
26
26
  * @custom:events
27
- * - {ValueReceived} event when funding the contract on deployment.
27
+ * - {UniversalReceiver} event when funding the contract on deployment.
28
28
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
29
29
  * - {DataChanged} event when updating the {_LSP9_SUPPORTED_STANDARDS_KEY}.
30
30
  * - {UniversalReceiver} event when notifying the `initialOwner`.
@@ -17,6 +17,7 @@ import {LSP1Utils} from "../LSP1UniversalReceiver/LSP1Utils.sol";
17
17
  import {
18
18
  _LSP9_SUPPORTED_STANDARDS_KEY,
19
19
  _LSP9_SUPPORTED_STANDARDS_VALUE,
20
+ _TYPEID_LSP9_VALUE_RECEIVED,
20
21
  _TYPEID_LSP9_OwnershipTransferred_RecipientNotification
21
22
  } from "../LSP9Vault/LSP9Constants.sol";
22
23
 
@@ -36,13 +37,21 @@ abstract contract LSP9VaultInitAbstract is Initializable, LSP9VaultCore {
36
37
  * @custom:warning ERC725X & ERC725Y parent contracts are not initialised as they don't have non-zero initial state. If you decide to add non-zero initial state to any of those contracts, you must initialize them here.
37
38
  *
38
39
  * @custom:events
39
- * - {ValueReceived} event when funding the contract on deployment.
40
+ * - {UniversalReceiver} event when funding the contract on deployment.
40
41
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
41
42
  * - {DataChanged} event when updating the {_LSP9_SUPPORTED_STANDARDS_KEY}.
42
43
  * - {UniversalReceiver} event when notifying the `initialOwner`.
43
44
  */
44
45
  function _initialize(address newOwner) internal virtual onlyInitializing {
45
- if (msg.value != 0) emit ValueReceived(msg.sender, msg.value);
46
+ if (msg.value != 0) {
47
+ emit UniversalReceiver(
48
+ msg.sender,
49
+ msg.value,
50
+ _TYPEID_LSP9_VALUE_RECEIVED,
51
+ "",
52
+ ""
53
+ );
54
+ }
46
55
  OwnableUnset._setOwner(newOwner);
47
56
 
48
57
  // set key SupportedStandards:LSP9Vault
@@ -24,7 +24,7 @@ contract UniversalProfile is LSP0ERC725Account {
24
24
  * @param initialOwner the owner of the contract
25
25
  *
26
26
  * @custom:events
27
- * - {ValueReceived} event when funding the contract on deployment.
27
+ * - {UniversalReceiver} event when funding the contract on deployment.
28
28
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
29
29
  * - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.
30
30
  */
@@ -28,7 +28,7 @@ contract UniversalProfileInit is UniversalProfileInitAbstract {
28
28
  * @param initialOwner the owner of the contract
29
29
  *
30
30
  * @custom:events
31
- * - {ValueReceived} event when funding the contract on deployment.
31
+ * - {UniversalReceiver} event when funding the contract on deployment.
32
32
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
33
33
  */
34
34
  function initialize(
@@ -28,7 +28,7 @@ abstract contract UniversalProfileInitAbstract is
28
28
  * @custom:warning ERC725X & ERC725Y parent contracts are not initialised as they don't have non-zero initial state. If you decide to add non-zero initial state to any of those contracts, you must initialize them here.
29
29
  *
30
30
  * @custom:events
31
- * - {ValueReceived} event when funding the contract on deployment.
31
+ * - {UniversalReceiver} event when funding the contract on deployment.
32
32
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
33
33
  */
34
34
  function _initialize(
@@ -0,0 +1,16 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.4;
3
+
4
+ abstract contract Version {
5
+ string internal constant _VERSION = "0.12.0";
6
+
7
+ /**
8
+ * @dev Get the version of the contract.
9
+ * @notice Contract version.
10
+ *
11
+ * @return The version of the the contract.
12
+ */
13
+ function version() public view virtual returns (string memory) {
14
+ return _VERSION;
15
+ }
16
+ }
@@ -91,12 +91,12 @@
91
91
  }
92
92
  }
93
93
  ],
94
- "LSP20CallVerificationFailed(bool,bytes)": [
94
+ "LSP20CallVerificationFailed(bool,bytes4)": [
95
95
  {
96
96
  "details": "reverts when the call to the owner does not return the LSP20 success value",
97
97
  "params": {
98
98
  "postCall": "True if the execution call was done, False otherwise",
99
- "returnedData": "The data returned by the call to the logic verifier"
99
+ "returnedStatus": "The bytes4 decoded data returned by the logic verifier."
100
100
  }
101
101
  }
102
102
  ],
@@ -139,14 +139,14 @@
139
139
  }
140
140
  },
141
141
  "constructor": {
142
- "custom:events": "- {ValueReceived} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
142
+ "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
143
143
  "details": "Set `initialOwner` as the contract owner. The `constructor` also allows funding the contract on deployment.",
144
144
  "params": {
145
145
  "initialOwner": "The owner of the contract."
146
146
  }
147
147
  },
148
148
  "execute(uint256,address,uint256,bytes)": {
149
- "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {ValueReceived} event when receiving native tokens.",
149
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {UniversalReceiver} event when receiving native tokens.",
150
150
  "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
151
151
  "details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter.",
152
152
  "params": {
@@ -157,7 +157,7 @@
157
157
  }
158
158
  },
159
159
  "executeBatch(uint256[],address[],uint256[],bytes[])": {
160
- "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {ValueReceived} event when receiving native tokens.",
160
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {UniversalReceiver} event when receiving native tokens.",
161
161
  "custom:requirements": "- The length of the parameters provided must be equal. - Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
162
162
  "custom:warning": "- The `msg.value` should not be trusted for any method called within the batch with `operationType`: `DELEGATECALL` (4).",
163
163
  "details": "Batch executor function that behaves the same as {execute} but allowing multiple operations in the same transaction.",
@@ -209,7 +209,7 @@
209
209
  "details": "Renounce ownership of the contract in a 2-step process. 1. The first call will initiate the process of renouncing ownership. 2. The second call is used as a confirmation and will leave the contract without an owner."
210
210
  },
211
211
  "setData(bytes32,bytes)": {
212
- "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
212
+ "custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event.",
213
213
  "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
214
214
  "details": "Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data.",
215
215
  "params": {
@@ -218,7 +218,7 @@
218
218
  }
219
219
  },
220
220
  "setDataBatch(bytes32[],bytes[])": {
221
- "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
221
+ "custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
222
222
  "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
223
223
  "details": "Batch data setting function that behaves the same as {setData} but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction.",
224
224
  "params": {
@@ -243,7 +243,7 @@
243
243
  }
244
244
  },
245
245
  "universalReceiver(bytes32,bytes)": {
246
- "custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
246
+ "custom:events": "- {UniversalReceiver} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
247
247
  "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function.",
248
248
  "params": {
249
249
  "receivedData": "The data received.",
@@ -252,6 +252,12 @@
252
252
  "returns": {
253
253
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
254
254
  }
255
+ },
256
+ "version()": {
257
+ "details": "Get the version of the contract.",
258
+ "returns": {
259
+ "_0": "The version of the the contract."
260
+ }
255
261
  }
256
262
  },
257
263
  "title": "Deployable Implementation of [LSP-0-ERC725Account] Standard.",
@@ -91,12 +91,12 @@
91
91
  }
92
92
  }
93
93
  ],
94
- "LSP20CallVerificationFailed(bool,bytes)": [
94
+ "LSP20CallVerificationFailed(bool,bytes4)": [
95
95
  {
96
96
  "details": "reverts when the call to the owner does not return the LSP20 success value",
97
97
  "params": {
98
98
  "postCall": "True if the execution call was done, False otherwise",
99
- "returnedData": "The data returned by the call to the logic verifier"
99
+ "returnedStatus": "The bytes4 decoded data returned by the logic verifier."
100
100
  }
101
101
  }
102
102
  ],
@@ -142,7 +142,7 @@
142
142
  "details": "Locks the base contract on deployment, so that it cannot be initialized, owned and controlled by anyone after it has been deployed. This is intended so that the sole purpose of this contract is to be used as a base contract behind a proxy."
143
143
  },
144
144
  "execute(uint256,address,uint256,bytes)": {
145
- "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {ValueReceived} event when receiving native tokens.",
145
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {UniversalReceiver} event when receiving native tokens.",
146
146
  "custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
147
147
  "details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter.",
148
148
  "params": {
@@ -153,7 +153,7 @@
153
153
  }
154
154
  },
155
155
  "executeBatch(uint256[],address[],uint256[],bytes[])": {
156
- "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {ValueReceived} event when receiving native tokens.",
156
+ "custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {UniversalReceiver} event when receiving native tokens.",
157
157
  "custom:requirements": "- The length of the parameters provided must be equal. - Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
158
158
  "custom:warning": "- The `msg.value` should not be trusted for any method called within the batch with `operationType`: `DELEGATECALL` (4).",
159
159
  "details": "Batch executor function that behaves the same as {execute} but allowing multiple operations in the same transaction.",
@@ -183,7 +183,7 @@
183
183
  }
184
184
  },
185
185
  "initialize(address)": {
186
- "custom:events": "- {ValueReceived} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
186
+ "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
187
187
  "details": "Set `initialOwner` as the contract owner. The `initialize(address)` also allows funding the contract on deployment.",
188
188
  "params": {
189
189
  "initialOwner": "The owner of the contract."
@@ -212,7 +212,7 @@
212
212
  "details": "Renounce ownership of the contract in a 2-step process. 1. The first call will initiate the process of renouncing ownership. 2. The second call is used as a confirmation and will leave the contract without an owner."
213
213
  },
214
214
  "setData(bytes32,bytes)": {
215
- "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
215
+ "custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event.",
216
216
  "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
217
217
  "details": "Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data.",
218
218
  "params": {
@@ -221,7 +221,7 @@
221
221
  }
222
222
  },
223
223
  "setDataBatch(bytes32[],bytes[])": {
224
- "custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
224
+ "custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
225
225
  "custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
226
226
  "details": "Batch data setting function that behaves the same as {setData} but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction.",
227
227
  "params": {
@@ -246,7 +246,7 @@
246
246
  }
247
247
  },
248
248
  "universalReceiver(bytes32,bytes)": {
249
- "custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
249
+ "custom:events": "- {UniversalReceiver} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
250
250
  "details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function.",
251
251
  "params": {
252
252
  "receivedData": "The data received.",
@@ -255,6 +255,12 @@
255
255
  "returns": {
256
256
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
257
257
  }
258
+ },
259
+ "version()": {
260
+ "details": "Get the version of the contract.",
261
+ "returns": {
262
+ "_0": "The version of the the contract."
263
+ }
258
264
  }
259
265
  },
260
266
  "title": "Deployable Proxy Implementation of [LSP-0-ERC725Account] Standard.",
@@ -27,6 +27,12 @@
27
27
  "returns": {
28
28
  "_0": "The result of the reaction for `typeId`."
29
29
  }
30
+ },
31
+ "version()": {
32
+ "details": "Get the version of the contract.",
33
+ "returns": {
34
+ "_0": "The version of the the contract."
35
+ }
30
36
  }
31
37
  },
32
38
  "title": "Implementation of a UniversalReceiverDelegate for the [LSP-0-ERC725Account]",
@@ -26,6 +26,12 @@
26
26
  "returns": {
27
27
  "_0": "The result of the reaction for `typeId`."
28
28
  }
29
+ },
30
+ "version()": {
31
+ "details": "Get the version of the contract.",
32
+ "returns": {
33
+ "_0": "The version of the the contract."
34
+ }
29
35
  }
30
36
  },
31
37
  "title": "Implementation of a UniversalReceiverDelegate for the [LSP9Vault]",
@@ -22,6 +22,16 @@
22
22
  "details": "Reverts when trying to do a `delegatecall` via the ERC725X.execute(uint256,address,uint256,bytes) (operation type 4) function of the linked {target}. `DELEGATECALL` is disallowed by default on the LSP6KeyManager."
23
23
  }
24
24
  ],
25
+ "ERC725X_ExecuteParametersEmptyArray()": [
26
+ {
27
+ "details": "Reverts when one of the array parameter provided to the {executeBatch} function is an empty array."
28
+ }
29
+ ],
30
+ "ERC725X_ExecuteParametersLengthMismatch()": [
31
+ {
32
+ "details": "Reverts when there is not the same number of elements in the `operationTypes`, `targets` addresses, `values`, and `datas` array parameters provided when calling the {executeBatch} function."
33
+ }
34
+ ],
25
35
  "ERC725Y_DataKeysValuesLengthMismatch()": [
26
36
  {
27
37
  "details": "Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the {setDataBatch} function."
@@ -287,6 +297,12 @@
287
297
  "returns": {
288
298
  "_0": "The address of the linked contract"
289
299
  }
300
+ },
301
+ "version()": {
302
+ "details": "Get the version of the contract.",
303
+ "returns": {
304
+ "_0": "The version of the the contract."
305
+ }
290
306
  }
291
307
  },
292
308
  "title": "Implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage.",
@@ -22,6 +22,16 @@
22
22
  "details": "Reverts when trying to do a `delegatecall` via the ERC725X.execute(uint256,address,uint256,bytes) (operation type 4) function of the linked {target}. `DELEGATECALL` is disallowed by default on the LSP6KeyManager."
23
23
  }
24
24
  ],
25
+ "ERC725X_ExecuteParametersEmptyArray()": [
26
+ {
27
+ "details": "Reverts when one of the array parameter provided to the {executeBatch} function is an empty array."
28
+ }
29
+ ],
30
+ "ERC725X_ExecuteParametersLengthMismatch()": [
31
+ {
32
+ "details": "Reverts when there is not the same number of elements in the `operationTypes`, `targets` addresses, `values`, and `datas` array parameters provided when calling the {executeBatch} function."
33
+ }
34
+ ],
25
35
  "ERC725Y_DataKeysValuesLengthMismatch()": [
26
36
  {
27
37
  "details": "Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the {setDataBatch} function."
@@ -290,6 +300,12 @@
290
300
  "returns": {
291
301
  "_0": "The address of the linked contract"
292
302
  }
303
+ },
304
+ "version()": {
305
+ "details": "Get the version of the contract.",
306
+ "returns": {
307
+ "_0": "The version of the the contract."
308
+ }
293
309
  }
294
310
  },
295
311
  "title": "Proxy implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage",
@@ -106,6 +106,11 @@
106
106
  "details": "reverts when there is no extension for the function selector being called with"
107
107
  }
108
108
  ],
109
+ "OperatorAllowanceCannotBeIncreasedFromZero(address)": [
110
+ {
111
+ "details": "Reverts when token owner call {increaseAllowance} for an operator that does not have any allowance"
112
+ }
113
+ ],
109
114
  "OwnableCallerNotTheOwner(address)": [
110
115
  {
111
116
  "details": "Reverts when only the owner is allowed to call the function.",
@@ -124,7 +129,7 @@
124
129
  "methods": {
125
130
  "authorizeOperator(address,uint256,bytes)": {
126
131
  "custom:danger": "To avoid front-running and Allowance Double-Spend Exploit when increasing or decreasing the authorized amount of an operator, it is advised to: 1. either call {revokeOperator} first, and then re-call {authorizeOperator} with the new amount. 2. or use the non-standard functions {increaseAllowance} or {decreaseAllowance}. For more information, see: https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/",
127
- "details": "Sets an `amount` of tokens that an `operator` has access from the caller's balance (allowance). See {authorizedAmountFor}.",
132
+ "details": "Sets an `amount` of tokens that an `operator` has access from the caller's balance (allowance). See {authorizedAmountFor}. Notify the operator based on the LSP1-UniversalReceiver standard",
128
133
  "params": {
129
134
  "amount": "The allowance amount of tokens operator has access to.",
130
135
  "operator": "The address to authorize as an operator.",
@@ -164,10 +169,7 @@
164
169
  }
165
170
  },
166
171
  "decreaseAllowance(address,uint256,bytes)": {
167
- "custom:events": "- {AuthorizedOperator} event indicating the updated allowance after decreasing it. - {RevokeOperator} event if `subtractedAmount` is the full allowance, indicating `operator` does not have any alauthorizedAmountForlowance left for `msg.sender`.",
168
- "custom:info": "This is a non-standard function, not part of the LSP7 standard interface. It has been added in the LSP7 contract implementation so that it can be used as a prevention mechanism against the double spending allowance vulnerability.",
169
- "custom:requirements": "- `operator` cannot be the zero address. - `operator` must have allowance for the caller of at least `subtractedAmount`.",
170
- "details": "Atomically decreases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for the double spending allowance problem.",
172
+ "details": "Atomically decreases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for the double spending allowance problem. Notify the operator based on the LSP1-UniversalReceiver standard",
171
173
  "params": {
172
174
  "operator": "The operator to decrease allowance for `msg.sender`",
173
175
  "subtractedAmount": "The amount to decrease by in the operator's allowance."
@@ -201,10 +203,7 @@
201
203
  }
202
204
  },
203
205
  "increaseAllowance(address,uint256,bytes)": {
204
- "custom:events": "{AuthorizedOperator} indicating the updated allowance",
205
- "custom:info": "This is a non-standard function, not part of the LSP7 standard interface. It has been added in the LSP7 contract implementation so that it can be used as a prevention mechanism against double spending allowance vulnerability.",
206
- "custom:requirements": "- `operator` cannot be the same address as `msg.sender` - `operator` cannot be the zero address.",
207
- "details": "Atomically increases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for the double spending allowance problem.",
206
+ "details": "Atomically increases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for the double spending allowance problem. Notify the operator based on the LSP1-UniversalReceiver standard",
208
207
  "params": {
209
208
  "addedAmount": "The additional amount to add on top of the current operator's allowance",
210
209
  "operator": "The operator to increase the allowance for `msg.sender`"
@@ -216,9 +215,10 @@
216
215
  "renounceOwnership()": {
217
216
  "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
218
217
  },
219
- "revokeOperator(address,bytes)": {
218
+ "revokeOperator(address,bool,bytes)": {
220
219
  "details": "Removes the `operator` address as an operator of callers tokens, disallowing it to send any amount of tokens on behalf of the token owner (the caller of the function `msg.sender`). See also {authorizedAmountFor}.",
221
220
  "params": {
221
+ "notify": "Boolean indicating whether to notify the operator or not.",
222
222
  "operator": "The address to revoke as an operator.",
223
223
  "operatorNotificationData": "The data to notify the operator about via LSP1."
224
224
  }
@@ -280,6 +280,12 @@
280
280
  },
281
281
  "transferOwnership(address)": {
282
282
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
283
+ },
284
+ "version()": {
285
+ "details": "Get the version of the contract.",
286
+ "returns": {
287
+ "_0": "The version of the the contract."
288
+ }
283
289
  }
284
290
  },
285
291
  "version": 1