@lukso/lsp-smart-contracts 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/artifacts/LSP0ERC725Account.json +15 -15
  2. package/artifacts/LSP0ERC725AccountInit.json +15 -15
  3. package/artifacts/LSP1UniversalReceiverDelegateUP.json +15 -15
  4. package/artifacts/LSP1UniversalReceiverDelegateVault.json +15 -15
  5. package/artifacts/LSP6KeyManager.json +15 -15
  6. package/artifacts/LSP6KeyManagerInit.json +15 -15
  7. package/artifacts/LSP7CappedSupply.json +0 -13
  8. package/artifacts/LSP7CappedSupplyInitAbstract.json +0 -13
  9. package/artifacts/LSP7CompatibleERC20.json +0 -13
  10. package/artifacts/LSP7CompatibleERC20InitAbstract.json +0 -13
  11. package/artifacts/LSP7CompatibleERC20Mintable.json +2 -15
  12. package/artifacts/LSP7CompatibleERC20MintableInit.json +2 -15
  13. package/artifacts/LSP7DigitalAsset.json +0 -13
  14. package/artifacts/LSP7DigitalAssetInitAbstract.json +0 -13
  15. package/artifacts/LSP7Mintable.json +2 -15
  16. package/artifacts/LSP7MintableInit.json +2 -15
  17. package/artifacts/LSP8CappedSupply.json +0 -13
  18. package/artifacts/LSP8CappedSupplyInitAbstract.json +0 -13
  19. package/artifacts/LSP8CompatibleERC721.json +0 -13
  20. package/artifacts/LSP8CompatibleERC721InitAbstract.json +0 -13
  21. package/artifacts/LSP8CompatibleERC721Mintable.json +2 -15
  22. package/artifacts/LSP8CompatibleERC721MintableInit.json +2 -15
  23. package/artifacts/LSP8IdentifiableDigitalAsset.json +0 -13
  24. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -13
  25. package/artifacts/LSP8Mintable.json +2 -15
  26. package/artifacts/LSP8MintableInit.json +2 -15
  27. package/artifacts/LSP9Vault.json +15 -15
  28. package/artifacts/LSP9VaultInit.json +15 -15
  29. package/artifacts/UniversalProfile.json +15 -15
  30. package/artifacts/UniversalProfileInit.json +15 -15
  31. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  32. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +7 -3
  33. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +62 -41
  34. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +2 -1
  35. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +3 -1
  36. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +11 -10
  37. package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +2 -1
  38. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +31 -33
  39. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +24 -17
  40. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +1 -1
  41. package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +1 -5
  42. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +2 -1
  43. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +15 -9
  44. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +2 -1
  45. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +14 -16
  46. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +6 -2
  47. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +7 -17
  48. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +5 -15
  49. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +1 -4
  50. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +1 -4
  51. package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
  52. package/contracts/LSP9Vault/LSP9Vault.sol +3 -2
  53. package/contracts/LSP9Vault/LSP9VaultCore.sol +22 -15
  54. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -1
  55. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +1 -1
  56. package/contracts/UniversalProfile.sol +4 -2
  57. package/contracts/UniversalProfileInit.sol +8 -5
  58. package/contracts/UniversalProfileInitAbstract.sol +4 -2
  59. package/contracts/Version.sol +6 -5
  60. package/devdocs/LSP0ERC725Account.json +3 -8
  61. package/devdocs/LSP0ERC725AccountInit.json +2 -7
  62. package/devdocs/LSP1UniversalReceiverDelegateUP.json +0 -6
  63. package/devdocs/LSP1UniversalReceiverDelegateVault.json +0 -6
  64. package/devdocs/LSP6KeyManager.json +1 -6
  65. package/devdocs/LSP6KeyManagerInit.json +1 -6
  66. package/devdocs/LSP7CappedSupply.json +0 -6
  67. package/devdocs/LSP7CappedSupplyInitAbstract.json +0 -6
  68. package/devdocs/LSP7CompatibleERC20.json +0 -6
  69. package/devdocs/LSP7CompatibleERC20InitAbstract.json +0 -6
  70. package/devdocs/LSP7CompatibleERC20Mintable.json +0 -6
  71. package/devdocs/LSP7CompatibleERC20MintableInit.json +0 -6
  72. package/devdocs/LSP7DigitalAsset.json +0 -6
  73. package/devdocs/LSP7DigitalAssetInitAbstract.json +0 -6
  74. package/devdocs/LSP7Mintable.json +0 -6
  75. package/devdocs/LSP7MintableInit.json +0 -6
  76. package/devdocs/LSP8CappedSupply.json +0 -6
  77. package/devdocs/LSP8CappedSupplyInitAbstract.json +0 -6
  78. package/devdocs/LSP8CompatibleERC721.json +0 -6
  79. package/devdocs/LSP8CompatibleERC721InitAbstract.json +0 -6
  80. package/devdocs/LSP8CompatibleERC721Mintable.json +0 -6
  81. package/devdocs/LSP8CompatibleERC721MintableInit.json +0 -6
  82. package/devdocs/LSP8IdentifiableDigitalAsset.json +0 -6
  83. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -6
  84. package/devdocs/LSP8Mintable.json +0 -6
  85. package/devdocs/LSP8MintableInit.json +0 -6
  86. package/devdocs/LSP9Vault.json +0 -6
  87. package/devdocs/LSP9VaultInit.json +0 -6
  88. package/devdocs/UniversalProfile.json +3 -8
  89. package/devdocs/UniversalProfileInit.json +4 -9
  90. package/dist/constants.cjs.js +142 -536
  91. package/dist/constants.d.ts +166 -734
  92. package/dist/constants.es.js +142 -536
  93. package/package.json +1 -1
  94. package/userdocs/LSP0ERC725Account.json +3 -3
  95. package/userdocs/LSP0ERC725AccountInit.json +3 -3
  96. package/userdocs/LSP1UniversalReceiverDelegateUP.json +3 -3
  97. package/userdocs/LSP1UniversalReceiverDelegateVault.json +3 -3
  98. package/userdocs/LSP6KeyManager.json +3 -3
  99. package/userdocs/LSP6KeyManagerInit.json +3 -3
  100. package/userdocs/LSP7CappedSupply.json +0 -3
  101. package/userdocs/LSP7CappedSupplyInitAbstract.json +0 -3
  102. package/userdocs/LSP7CompatibleERC20.json +0 -3
  103. package/userdocs/LSP7CompatibleERC20InitAbstract.json +0 -3
  104. package/userdocs/LSP7CompatibleERC20Mintable.json +0 -3
  105. package/userdocs/LSP7CompatibleERC20MintableInit.json +0 -3
  106. package/userdocs/LSP7DigitalAsset.json +0 -3
  107. package/userdocs/LSP7DigitalAssetInitAbstract.json +0 -3
  108. package/userdocs/LSP7Mintable.json +0 -3
  109. package/userdocs/LSP7MintableInit.json +0 -3
  110. package/userdocs/LSP8CappedSupply.json +0 -3
  111. package/userdocs/LSP8CappedSupplyInitAbstract.json +0 -3
  112. package/userdocs/LSP8CompatibleERC721.json +0 -3
  113. package/userdocs/LSP8CompatibleERC721InitAbstract.json +0 -3
  114. package/userdocs/LSP8CompatibleERC721Mintable.json +0 -3
  115. package/userdocs/LSP8CompatibleERC721MintableInit.json +0 -3
  116. package/userdocs/LSP8IdentifiableDigitalAsset.json +0 -3
  117. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -3
  118. package/userdocs/LSP8Mintable.json +0 -3
  119. package/userdocs/LSP8MintableInit.json +0 -3
  120. package/userdocs/LSP9Vault.json +3 -3
  121. package/userdocs/LSP9VaultInit.json +3 -3
  122. package/userdocs/UniversalProfile.json +3 -3
  123. package/userdocs/UniversalProfileInit.json +3 -3
@@ -5,6 +5,7 @@ pragma solidity ^0.8.4;
5
5
  import {
6
6
  OwnableUnset
7
7
  } from "@erc725/smart-contracts/contracts/custom/OwnableUnset.sol";
8
+ import {Version} from "../Version.sol";
8
9
  import {LSP9VaultCore} from "./LSP9VaultCore.sol";
9
10
 
10
11
  // libraries
@@ -23,7 +24,7 @@ import {
23
24
  * @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
24
25
  * @dev Could be owned by an EOA or by a contract and is able to receive and send assets. Also allows for registering received assets by leveraging the key-value storage.
25
26
  */
26
- contract LSP9Vault is LSP9VaultCore {
27
+ contract LSP9Vault is LSP9VaultCore, Version {
27
28
  using LSP1Utils for address;
28
29
 
29
30
  /**
@@ -57,7 +58,7 @@ contract LSP9Vault is LSP9VaultCore {
57
58
  _LSP9_SUPPORTED_STANDARDS_VALUE
58
59
  );
59
60
 
60
- newOwner.tryNotifyUniversalReceiver(
61
+ newOwner.notifyUniversalReceiver(
61
62
  _TYPEID_LSP9_OwnershipTransferred_RecipientNotification,
62
63
  ""
63
64
  );
@@ -20,7 +20,6 @@ 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";
24
23
  import {ERC725XCore} from "@erc725/smart-contracts/contracts/ERC725XCore.sol";
25
24
  import {ERC725YCore} from "@erc725/smart-contracts/contracts/ERC725YCore.sol";
26
25
  import {
@@ -81,7 +80,6 @@ import {
81
80
  contract LSP9VaultCore is
82
81
  ERC725XCore,
83
82
  ERC725YCore,
84
- Version,
85
83
  LSP14Ownable2Step,
86
84
  LSP17Extendable,
87
85
  ILSP1UniversalReceiver,
@@ -438,9 +436,9 @@ contract LSP9VaultCore is
438
436
  address currentOwner = owner();
439
437
  emit OwnershipTransferStarted(currentOwner, newOwner);
440
438
 
441
- newOwner.tryNotifyUniversalReceiver(
439
+ newOwner.notifyUniversalReceiver(
442
440
  _TYPEID_LSP9_OwnershipTransferStarted,
443
- ""
441
+ abi.encode(currentOwner, newOwner)
444
442
  );
445
443
 
446
444
  // reset the transfer ownership lock
@@ -455,19 +453,19 @@ contract LSP9VaultCore is
455
453
  * - When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification].
456
454
  * - When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification].
457
455
  */
458
- function acceptOwnership() public virtual override NotInTransferOwnership {
456
+ function acceptOwnership() public virtual override notInTransferOwnership {
459
457
  address previousOwner = owner();
460
458
 
461
459
  _acceptOwnership();
462
460
 
463
- previousOwner.tryNotifyUniversalReceiver(
461
+ previousOwner.notifyUniversalReceiver(
464
462
  _TYPEID_LSP9_OwnershipTransferred_SenderNotification,
465
- ""
463
+ abi.encode(previousOwner, msg.sender)
466
464
  );
467
465
 
468
- msg.sender.tryNotifyUniversalReceiver(
466
+ msg.sender.notifyUniversalReceiver(
469
467
  _TYPEID_LSP9_OwnershipTransferred_RecipientNotification,
470
- ""
468
+ abi.encode(previousOwner, msg.sender)
471
469
  );
472
470
  }
473
471
 
@@ -488,9 +486,9 @@ contract LSP9VaultCore is
488
486
  LSP14Ownable2Step._renounceOwnership();
489
487
 
490
488
  if (owner() == address(0)) {
491
- previousOwner.tryNotifyUniversalReceiver(
489
+ previousOwner.notifyUniversalReceiver(
492
490
  _TYPEID_LSP9_OwnershipTransferred_SenderNotification,
493
- ""
491
+ abi.encode(previousOwner, address(0))
494
492
  );
495
493
  }
496
494
  }
@@ -603,10 +601,19 @@ contract LSP9VaultCore is
603
601
  mappedExtensionDataKey
604
602
  );
605
603
 
606
- // Check if the extensionData is 21 bytes long (20 bytes of address + 1 byte as bool indicator ot forwards the value)
604
+ // Prevent casting data shorter than 20 bytes to an address to avoid
605
+ // unintentionally calling a different extension, return address(0) instead.
606
+ if (extensionData.length < 20) {
607
+ return (address(0), false);
608
+ }
609
+
610
+ // CHECK if the `extensionData` is 21 bytes long
611
+ // - 20 bytes = extension's address
612
+ // - 1 byte `0x01` as a boolean indicating if the contract should forward the value to the extension or not
607
613
  if (extensionData.length == 21) {
608
- // Check if the last byte is 1 (true)
609
- if (extensionData[20] == hex"01") {
614
+ // If the last byte is set to `0x01` (`true`)
615
+ // this indicates that the contract should forward the value to the extension
616
+ if (extensionData[20] == 0x01) {
610
617
  // Return the address of the extension
611
618
  return (address(bytes20(extensionData)), true);
612
619
  }
@@ -616,7 +623,7 @@ contract LSP9VaultCore is
616
623
  }
617
624
 
618
625
  /**
619
- * @dev Modifier restricting the call to the owner of the contract and the UniversalReceiverDelegate
626
+ * @dev Internal method restricting the call to the owner of the contract and the UniversalReceiverDelegate
620
627
  */
621
628
  function _validateAndIdentifyCaller()
622
629
  internal
@@ -2,6 +2,7 @@
2
2
  pragma solidity ^0.8.4;
3
3
 
4
4
  // modules
5
+ import {Version} from "../Version.sol";
5
6
  import {LSP9VaultInitAbstract} from "./LSP9VaultInitAbstract.sol";
6
7
 
7
8
  /**
@@ -9,7 +10,7 @@ import {LSP9VaultInitAbstract} from "./LSP9VaultInitAbstract.sol";
9
10
  * @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
10
11
  * @dev Could be owned by a UniversalProfile and able to register received asset with UniversalReceiverDelegateVault
11
12
  */
12
- contract LSP9VaultInit is LSP9VaultInitAbstract {
13
+ contract LSP9VaultInit is LSP9VaultInitAbstract, Version {
13
14
  /**
14
15
  * @dev initialize (= lock) base implementation contract on deployment
15
16
  */
@@ -60,7 +60,7 @@ abstract contract LSP9VaultInitAbstract is Initializable, LSP9VaultCore {
60
60
  _LSP9_SUPPORTED_STANDARDS_VALUE
61
61
  );
62
62
 
63
- newOwner.tryNotifyUniversalReceiver(
63
+ newOwner.notifyUniversalReceiver(
64
64
  _TYPEID_LSP9_OwnershipTransferred_RecipientNotification,
65
65
  ""
66
66
  );
@@ -19,7 +19,9 @@ contract UniversalProfile is LSP0ERC725Account {
19
19
  /**
20
20
  * @notice Deploying a UniversalProfile contract with owner set to address `initialOwner`.
21
21
  *
22
- * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment.
22
+ * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3Profile` data key in the ERC725Y data key/value store.
23
+ * - The `constructor` is payable and allows funding the contract on deployment.
24
+ * - The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.
23
25
  *
24
26
  * @param initialOwner the owner of the contract
25
27
  *
@@ -29,7 +31,7 @@ contract UniversalProfile is LSP0ERC725Account {
29
31
  * - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.
30
32
  */
31
33
  constructor(address initialOwner) payable LSP0ERC725Account(initialOwner) {
32
- // set data key SupportedStandards:LSP3UniversalProfile
34
+ // set data key SupportedStandards:LSP3Profile
33
35
  _setData(
34
36
  _LSP3_SUPPORTED_STANDARDS_KEY,
35
37
  _LSP3_SUPPORTED_STANDARDS_VALUE
@@ -2,6 +2,7 @@
2
2
  pragma solidity ^0.8.4;
3
3
 
4
4
  // modules
5
+ import {Version} from "./Version.sol";
5
6
  import {UniversalProfileInitAbstract} from "./UniversalProfileInitAbstract.sol";
6
7
 
7
8
  /**
@@ -9,12 +10,11 @@ import {UniversalProfileInitAbstract} from "./UniversalProfileInitAbstract.sol";
9
10
  * @author Fabian Vogelsteller <fabian@lukso.network>
10
11
  * @dev Implementation of the ERC725Account + LSP1 universalReceiver
11
12
  */
12
- contract UniversalProfileInit is UniversalProfileInitAbstract {
13
+ contract UniversalProfileInit is UniversalProfileInitAbstract, Version {
13
14
  /**
14
15
  * @notice deploying a `UniversalProfileInit` base contract to be used behind proxy
15
- * @dev Locks the base contract on deployment, so that it cannot be initialized, owned and controlled by anyone
16
- * after it has been deployed. This is intended so that the sole purpose of this contract is to be used as a base
17
- * contract behind a proxy.
16
+ * @dev Locks the base contract on deployment, so that it cannot be initialized, owned and controlled by anyone after it has been deployed.
17
+ * This is intended so that the sole purpose of this contract is to be used as a base contract behind a proxy.
18
18
  */
19
19
  constructor() {
20
20
  _disableInitializers();
@@ -23,13 +23,16 @@ contract UniversalProfileInit is UniversalProfileInitAbstract {
23
23
  /**
24
24
  * @notice Initializing a UniversalProfile contract with owner set to address `initialOwner`.
25
25
  *
26
- * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment. The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier. The `initialize(address)` function also allows funding the contract on initialization.
26
+ * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3Profile` data key in the ERC725Y data key/value store.
27
+ * - The `initialize(address)` function is payable and allows funding the contract on initialization.
28
+ * - The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.
27
29
  *
28
30
  * @param initialOwner the owner of the contract
29
31
  *
30
32
  * @custom:events
31
33
  * - {UniversalReceiver} event when funding the contract on deployment.
32
34
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
35
+ * - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.
33
36
  */
34
37
  function initialize(
35
38
  address initialOwner
@@ -21,7 +21,8 @@ abstract contract UniversalProfileInitAbstract is
21
21
  LSP0ERC725AccountInitAbstract
22
22
  {
23
23
  /**
24
- * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store.
24
+ * @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3Profile` data key in the ERC725Y data key/value store.
25
+ * The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.
25
26
  *
26
27
  * @param initialOwner The owner of the contract.
27
28
  *
@@ -30,13 +31,14 @@ abstract contract UniversalProfileInitAbstract is
30
31
  * @custom:events
31
32
  * - {UniversalReceiver} event when funding the contract on deployment.
32
33
  * - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
34
+ * - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.
33
35
  */
34
36
  function _initialize(
35
37
  address initialOwner
36
38
  ) internal virtual override onlyInitializing {
37
39
  LSP0ERC725AccountInitAbstract._initialize(initialOwner);
38
40
 
39
- // set data key SupportedStandards:LSP3UniversalProfile
41
+ // set data key SupportedStandards:LSP3Profile
40
42
  _setData(
41
43
  _LSP3_SUPPORTED_STANDARDS_KEY,
42
44
  _LSP3_SUPPORTED_STANDARDS_VALUE
@@ -2,15 +2,16 @@
2
2
  pragma solidity ^0.8.4;
3
3
 
4
4
  abstract contract Version {
5
- string internal constant _VERSION = "0.12.0";
6
-
7
5
  /**
8
6
  * @dev Get the version of the contract.
9
7
  * @notice Contract version.
10
8
  *
11
9
  * @return The version of the the contract.
12
10
  */
13
- function version() public view virtual returns (string memory) {
14
- return _VERSION;
15
- }
11
+ // DO NOT CHANGE
12
+ // Comments block below is used by release-please to automatically update the version in this file.
13
+ // x-release-please-start-version
14
+ string public constant VERSION = "0.12.1";
15
+
16
+ // x-release-please-end
16
17
  }
@@ -140,7 +140,7 @@
140
140
  },
141
141
  "constructor": {
142
142
  "custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
143
- "details": "Set `initialOwner` as the contract owner. The `constructor` also allows funding the contract on deployment.",
143
+ "details": "Set `initialOwner` as the contract owner. - The `constructor` also allows funding the contract on deployment. - The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.",
144
144
  "params": {
145
145
  "initialOwner": "The owner of the contract."
146
146
  }
@@ -187,6 +187,7 @@
187
187
  }
188
188
  },
189
189
  "isValidSignature(bytes32,bytes)": {
190
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed across different LSP0ERC725Accounts.",
190
191
  "details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `_ERC1271_SUCCESSVALUE` if the address recovered is the same as the owner, indicating that it was a valid signature. - If the address is different, it returns the `_ERC1271_FAILVALUE` indicating that the signature is not valid. 2. If the owner is a smart contract, it forwards the call of {isValidSignature()} to the owner contract: - If the contract fails or returns the `_ERC1271_FAILVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_FAILVALUE`, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the `_ERC1271_SUCCESSVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_SUCCESSVALUE`, indicating that it's a valid signature.",
191
192
  "params": {
192
193
  "dataHash": "The hash of the data to be validated.",
@@ -244,7 +245,7 @@
244
245
  },
245
246
  "universalReceiver(bytes32,bytes)": {
246
247
  "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
- "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
+ "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. This function delegates internally the handling of native tokens to the {universalReceiver} function itself passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and the calldata as received data.",
248
249
  "params": {
249
250
  "receivedData": "The data received.",
250
251
  "typeId": "The type of call received."
@@ -252,12 +253,6 @@
252
253
  "returns": {
253
254
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
254
255
  }
255
- },
256
- "version()": {
257
- "details": "Get the version of the contract.",
258
- "returns": {
259
- "_0": "The version of the the contract."
260
- }
261
256
  }
262
257
  },
263
258
  "title": "Deployable Implementation of [LSP-0-ERC725Account] Standard.",
@@ -190,6 +190,7 @@
190
190
  }
191
191
  },
192
192
  "isValidSignature(bytes32,bytes)": {
193
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP0ERC725Account and prevent signatures from the same EOA to be replayed across different LSP0ERC725Accounts.",
193
194
  "details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `_ERC1271_SUCCESSVALUE` if the address recovered is the same as the owner, indicating that it was a valid signature. - If the address is different, it returns the `_ERC1271_FAILVALUE` indicating that the signature is not valid. 2. If the owner is a smart contract, it forwards the call of {isValidSignature()} to the owner contract: - If the contract fails or returns the `_ERC1271_FAILVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_FAILVALUE`, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the `_ERC1271_SUCCESSVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_SUCCESSVALUE`, indicating that it's a valid signature.",
194
195
  "params": {
195
196
  "dataHash": "The hash of the data to be validated.",
@@ -247,7 +248,7 @@
247
248
  },
248
249
  "universalReceiver(bytes32,bytes)": {
249
250
  "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
- "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
+ "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. This function delegates internally the handling of native tokens to the {universalReceiver} function itself passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and the calldata as received data.",
251
252
  "params": {
252
253
  "receivedData": "The data received.",
253
254
  "typeId": "The type of call received."
@@ -255,12 +256,6 @@
255
256
  "returns": {
256
257
  "returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
257
258
  }
258
- },
259
- "version()": {
260
- "details": "Get the version of the contract.",
261
- "returns": {
262
- "_0": "The version of the the contract."
263
- }
264
259
  }
265
260
  },
266
261
  "title": "Deployable Proxy Implementation of [LSP-0-ERC725Account] Standard.",
@@ -27,12 +27,6 @@
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
- }
36
30
  }
37
31
  },
38
32
  "title": "Implementation of a UniversalReceiverDelegate for the [LSP-0-ERC725Account]",
@@ -26,12 +26,6 @@
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
- }
35
29
  }
36
30
  },
37
31
  "title": "Implementation of a UniversalReceiverDelegate for the [LSP9Vault]",
@@ -258,6 +258,7 @@
258
258
  }
259
259
  },
260
260
  "isValidSignature(bytes32,bytes)": {
261
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP6KeyManager and prevent signatures from the same EOA to be replayed across different LSP6KeyManager.",
261
262
  "details": "Checks if a signature was signed by a controller that has the permission `SIGN`. If the signer is a controller with the permission `SIGN`, it will return the ERC1271 success value.",
262
263
  "params": {
263
264
  "hash": "Hash of the data to be signed",
@@ -297,12 +298,6 @@
297
298
  "returns": {
298
299
  "_0": "The address of the linked contract"
299
300
  }
300
- },
301
- "version()": {
302
- "details": "Get the version of the contract.",
303
- "returns": {
304
- "_0": "The version of the the contract."
305
- }
306
301
  }
307
302
  },
308
303
  "title": "Implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage.",
@@ -261,6 +261,7 @@
261
261
  }
262
262
  },
263
263
  "isValidSignature(bytes32,bytes)": {
264
+ "custom:warning": "This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP6KeyManager and prevent signatures from the same EOA to be replayed across different LSP6KeyManager.",
264
265
  "details": "Checks if a signature was signed by a controller that has the permission `SIGN`. If the signer is a controller with the permission `SIGN`, it will return the ERC1271 success value.",
265
266
  "params": {
266
267
  "hash": "Hash of the data to be signed",
@@ -300,12 +301,6 @@
300
301
  "returns": {
301
302
  "_0": "The address of the linked contract"
302
303
  }
303
- },
304
- "version()": {
305
- "details": "Get the version of the contract.",
306
- "returns": {
307
- "_0": "The version of the the contract."
308
- }
309
304
  }
310
305
  },
311
306
  "title": "Proxy implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage",
@@ -280,12 +280,6 @@
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
- }
289
283
  }
290
284
  },
291
285
  "version": 1
@@ -273,12 +273,6 @@
273
273
  },
274
274
  "transferOwnership(address)": {
275
275
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
276
- },
277
- "version()": {
278
- "details": "Get the version of the contract.",
279
- "returns": {
280
- "_0": "The version of the the contract."
281
- }
282
276
  }
283
277
  },
284
278
  "version": 1
@@ -319,12 +319,6 @@
319
319
  },
320
320
  "transferOwnership(address)": {
321
321
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
322
- },
323
- "version()": {
324
- "details": "Get the version of the contract.",
325
- "returns": {
326
- "_0": "The version of the the contract."
327
- }
328
322
  }
329
323
  },
330
324
  "version": 1
@@ -312,12 +312,6 @@
312
312
  },
313
313
  "transferOwnership(address)": {
314
314
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
315
- },
316
- "version()": {
317
- "details": "Get the version of the contract.",
318
- "returns": {
319
- "_0": "The version of the the contract."
320
- }
321
315
  }
322
316
  },
323
317
  "version": 1
@@ -321,12 +321,6 @@
321
321
  },
322
322
  "transferOwnership(address)": {
323
323
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
324
- },
325
- "version()": {
326
- "details": "Get the version of the contract.",
327
- "returns": {
328
- "_0": "The version of the the contract."
329
- }
330
324
  }
331
325
  },
332
326
  "title": "LSP7CompatibleERC20 deployable preset contract with a public {mint} function callable only by the contract {owner}.",
@@ -324,12 +324,6 @@
324
324
  },
325
325
  "transferOwnership(address)": {
326
326
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
327
- },
328
- "version()": {
329
- "details": "Get the version of the contract.",
330
- "returns": {
331
- "_0": "The version of the the contract."
332
- }
333
327
  }
334
328
  },
335
329
  "title": "LSP7 deployable preset contract (proxy version) with a public mint function callable only by the contract {owner}",
@@ -266,12 +266,6 @@
266
266
  },
267
267
  "transferOwnership(address)": {
268
268
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
269
- },
270
- "version()": {
271
- "details": "Get the version of the contract.",
272
- "returns": {
273
- "_0": "The version of the the contract."
274
- }
275
269
  }
276
270
  },
277
271
  "title": "Implementation of a LSP7 Digital Asset, a contract that represents a fungible token.",
@@ -258,12 +258,6 @@
258
258
  },
259
259
  "transferOwnership(address)": {
260
260
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
261
- },
262
- "version()": {
263
- "details": "Get the version of the contract.",
264
- "returns": {
265
- "_0": "The version of the the contract."
266
- }
267
261
  }
268
262
  },
269
263
  "title": "LSP7DigitalAsset contract",
@@ -267,12 +267,6 @@
267
267
  },
268
268
  "transferOwnership(address)": {
269
269
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
270
- },
271
- "version()": {
272
- "details": "Get the version of the contract.",
273
- "returns": {
274
- "_0": "The version of the the contract."
275
- }
276
270
  }
277
271
  },
278
272
  "title": "LSP7DigitalAsset deployable preset contract with a public {mint} function callable only by the contract {owner}.",
@@ -270,12 +270,6 @@
270
270
  },
271
271
  "transferOwnership(address)": {
272
272
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
273
- },
274
- "version()": {
275
- "details": "Get the version of the contract.",
276
- "returns": {
277
- "_0": "The version of the the contract."
278
- }
279
273
  }
280
274
  },
281
275
  "version": 1
@@ -288,12 +288,6 @@
288
288
  },
289
289
  "transferOwnership(address)": {
290
290
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
291
- },
292
- "version()": {
293
- "details": "Get the version of the contract.",
294
- "returns": {
295
- "_0": "The version of the the contract."
296
- }
297
291
  }
298
292
  },
299
293
  "version": 1
@@ -281,12 +281,6 @@
281
281
  },
282
282
  "transferOwnership(address)": {
283
283
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
284
- },
285
- "version()": {
286
- "details": "Get the version of the contract.",
287
- "returns": {
288
- "_0": "The version of the the contract."
289
- }
290
284
  }
291
285
  },
292
286
  "version": 1
@@ -362,12 +362,6 @@
362
362
  },
363
363
  "transferOwnership(address)": {
364
364
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
365
- },
366
- "version()": {
367
- "details": "Get the version of the contract.",
368
- "returns": {
369
- "_0": "The version of the the contract."
370
- }
371
365
  }
372
366
  },
373
367
  "stateVariables": {
@@ -355,12 +355,6 @@
355
355
  },
356
356
  "transferOwnership(address)": {
357
357
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
358
- },
359
- "version()": {
360
- "details": "Get the version of the contract.",
361
- "returns": {
362
- "_0": "The version of the the contract."
363
- }
364
358
  }
365
359
  },
366
360
  "stateVariables": {
@@ -375,12 +375,6 @@
375
375
  },
376
376
  "transferOwnership(address)": {
377
377
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
378
- },
379
- "version()": {
380
- "details": "Get the version of the contract.",
381
- "returns": {
382
- "_0": "The version of the the contract."
383
- }
384
378
  }
385
379
  },
386
380
  "title": "LSP8CompatibleERC721Mintable deployable preset contract with a public {mint} function callable only by the contract {owner}.",
@@ -378,12 +378,6 @@
378
378
  },
379
379
  "transferOwnership(address)": {
380
380
  "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
381
- },
382
- "version()": {
383
- "details": "Get the version of the contract.",
384
- "returns": {
385
- "_0": "The version of the the contract."
386
- }
387
381
  }
388
382
  },
389
383
  "title": "LSP8CompatibleERC721MintableInit deployable preset contract (proxy version) with a public mint function callable only by the contract {owner}",