@lukso/lsp-smart-contracts 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CONTRIBUTING.md +39 -0
  2. package/README.md +93 -40
  3. package/artifacts/Create2Factory.json +2 -2
  4. package/artifacts/LSP0ERC725Account.json +194 -15
  5. package/artifacts/LSP0ERC725AccountInit.json +194 -15
  6. package/artifacts/LSP11BasicSocialRecovery.json +493 -0
  7. package/artifacts/LSP11BasicSocialRecoveryInit.json +513 -0
  8. package/artifacts/LSP16UniversalFactory.json +236 -0
  9. package/artifacts/LSP1UniversalReceiverDelegateUP.json +134 -15
  10. package/artifacts/LSP1UniversalReceiverDelegateVault.json +80 -15
  11. package/artifacts/LSP4Compatibility.json +16 -0
  12. package/artifacts/LSP4DigitalAssetMetadata.json +16 -0
  13. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +16 -0
  14. package/artifacts/LSP6KeyManager.json +177 -33
  15. package/artifacts/LSP6KeyManagerInit.json +177 -33
  16. package/artifacts/LSP7CappedSupply.json +26 -5
  17. package/artifacts/LSP7CappedSupplyInitAbstract.json +26 -5
  18. package/artifacts/LSP7CompatibleERC20.json +26 -5
  19. package/artifacts/LSP7CompatibleERC20InitAbstract.json +28 -7
  20. package/artifacts/LSP7CompatibleERC20Mintable.json +29 -8
  21. package/artifacts/LSP7CompatibleERC20MintableInit.json +29 -8
  22. package/artifacts/LSP7DigitalAsset.json +26 -5
  23. package/artifacts/LSP7DigitalAssetInitAbstract.json +26 -5
  24. package/artifacts/LSP7Mintable.json +29 -8
  25. package/artifacts/LSP7MintableInit.json +29 -8
  26. package/artifacts/LSP8CappedSupply.json +27 -6
  27. package/artifacts/LSP8CappedSupplyInitAbstract.json +27 -6
  28. package/artifacts/LSP8CompatibleERC721.json +28 -7
  29. package/artifacts/LSP8CompatibleERC721InitAbstract.json +30 -9
  30. package/artifacts/LSP8CompatibleERC721Mintable.json +31 -10
  31. package/artifacts/LSP8CompatibleERC721MintableInit.json +31 -10
  32. package/artifacts/LSP8IdentifiableDigitalAsset.json +27 -6
  33. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +27 -6
  34. package/artifacts/LSP8Mintable.json +30 -9
  35. package/artifacts/LSP8MintableInit.json +30 -9
  36. package/artifacts/LSP9Vault.json +202 -17
  37. package/artifacts/LSP9VaultInit.json +202 -17
  38. package/artifacts/UniversalProfile.json +194 -15
  39. package/artifacts/UniversalProfileInit.json +194 -15
  40. package/artifacts/UniversalReceiverAddressStore.json +3 -3
  41. package/common/constants.d.ts +738 -0
  42. package/common/constants.js +785 -0
  43. package/contracts/Custom/EIP191Signer.sol +12 -0
  44. package/contracts/Factories/Create2Factory.sol +1 -3
  45. package/contracts/LSP0ERC725Account/LSP0Constants.sol +13 -2
  46. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +2 -1
  47. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +320 -63
  48. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +2 -2
  49. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +2 -1
  50. package/contracts/LSP0ERC725Account/LSP0Utils.sol +50 -0
  51. package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +2 -2
  52. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +212 -0
  53. package/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol +177 -0
  54. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol +23 -0
  55. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +258 -0
  56. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +26 -0
  57. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol +19 -0
  58. package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +6 -0
  59. package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +60 -0
  60. package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +53 -0
  61. package/contracts/LSP14Ownable2Step/LSP14Constants.sol +15 -0
  62. package/contracts/LSP14Ownable2Step/LSP14Errors.sol +12 -0
  63. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +212 -0
  64. package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +246 -0
  65. package/contracts/LSP17ContractExtension/LSP17Constants.sol +17 -0
  66. package/contracts/LSP17ContractExtension/LSP17Errors.sol +7 -0
  67. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +104 -0
  68. package/contracts/LSP17ContractExtension/LSP17Extension.sol +45 -0
  69. package/contracts/LSP17ContractExtension/LSP17Utils.sol +20 -0
  70. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +5 -5
  71. package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +5 -3
  72. package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +21 -0
  73. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +155 -37
  74. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +64 -31
  75. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +53 -40
  76. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +45 -23
  77. package/contracts/LSP3UniversalProfile/LSP3Constants.sol +1 -1
  78. package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +1 -1
  79. package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +1 -1
  80. package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
  81. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +2 -2
  82. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +2 -2
  83. package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +3 -3
  84. package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +2 -2
  85. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +102 -114
  86. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +25 -7
  87. package/contracts/LSP6KeyManager/LSP6Constants.sol +43 -38
  88. package/contracts/LSP6KeyManager/LSP6Errors.sol +90 -21
  89. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +2 -1
  90. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +224 -506
  91. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +1 -1
  92. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +3 -2
  93. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +229 -0
  94. package/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol +25 -0
  95. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +606 -0
  96. package/contracts/LSP6KeyManager/LSP6Utils.sol +156 -35
  97. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +8 -8
  98. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +6 -6
  99. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +1 -1
  100. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +36 -36
  101. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +1 -1
  102. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +33 -1
  103. package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +1 -1
  104. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +24 -0
  105. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +28 -8
  106. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +28 -11
  107. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +87 -20
  108. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +97 -19
  109. package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
  110. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +3 -4
  111. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +2 -2
  112. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +3 -3
  113. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +3 -5
  114. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +2 -2
  115. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +3 -3
  116. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +7 -7
  117. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +7 -7
  118. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +45 -2
  119. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +2 -2
  120. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +57 -60
  121. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +1 -1
  122. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +5 -2
  123. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +20 -0
  124. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +27 -7
  125. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +27 -10
  126. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +234 -30
  127. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +238 -30
  128. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +32 -4
  129. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +35 -8
  130. package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
  131. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +3 -4
  132. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +3 -3
  133. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +3 -3
  134. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +3 -4
  135. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +2 -2
  136. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +3 -3
  137. package/contracts/LSP9Vault/LSP9Constants.sol +10 -10
  138. package/contracts/LSP9Vault/LSP9Errors.sol +8 -0
  139. package/contracts/LSP9Vault/LSP9Vault.sol +6 -4
  140. package/contracts/LSP9Vault/LSP9VaultCore.sol +350 -127
  141. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -2
  142. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +4 -3
  143. package/contracts/Legacy/Registries/AddressRegistry.sol +1 -1
  144. package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +1 -1
  145. package/contracts/Legacy/UniversalReceiverAddressStore.sol +4 -14
  146. package/contracts/UniversalProfile.sol +2 -2
  147. package/contracts/UniversalProfileInit.sol +2 -2
  148. package/contracts/UniversalProfileInitAbstract.sol +1 -1
  149. package/contracts/Utils/GasLib.sol +1 -1
  150. package/module/constants.d.ts +738 -0
  151. package/module/constants.js +782 -0
  152. package/package.json +42 -12
  153. package/artifacts/UniversalFactory.json +0 -127
  154. package/constants.js +0 -594
  155. package/contracts/Custom/ClaimOwnership.sol +0 -96
  156. package/contracts/Custom/ERC165Checker.sol +0 -130
  157. package/contracts/Custom/IClaimOwnership.sol +0 -12
  158. package/contracts/Factories/UniversalFactory.sol +0 -159
  159. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +0 -24
  160. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/Handling/TokenAndVaultHandling.sol +0 -82
  161. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +0 -73
  162. package/contracts/LSP2ERC725YJSONSchema/LSP2Errors.sol +0 -9
  163. package/contracts/LSP7DigitalAsset/extensions/ILSP7CappedSupply.sol +0 -17
  164. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +0 -57
  165. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Core.sol +0 -111
  166. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CappedSupply.sol +0 -17
  167. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8Enumerable.sol +0 -17
  168. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyCore.sol +0 -58
  169. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleConstants.sol +0 -6
  170. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721Core.sol +0 -211
  171. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableCore.sol +0 -50
  172. package/contracts/Utils/UtilsLib.sol +0 -31
package/CONTRIBUTING.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Contributing
2
2
 
3
+ Since the `@lukso/lsp-smart-contracts` is an Open Source project, we welcome contributions from anyone about any topics. You can do PRs or open issues in the repository for instance to:
4
+
5
+ - discuss and propose new ideas or features.
6
+ - report bug and issues.
7
+ - introduce new features or bug fixes.
8
+
9
+ ## **Clone project**
10
+
11
+ Our project uses submodules, we recommend you to clone our repository using the following command:
12
+
13
+ ```bash
14
+ $ git clone --recurse-submodules https://github.com/lukso-network/lsp-smart-contracts.git
15
+ ```
16
+
17
+ ## Linting & Formatting Code
18
+
19
+ Run the linter and prettier from the _lsp-smart-contracts_ project root:
20
+
21
+ ```bash
22
+ npm run linter
23
+ npm run prettier
24
+ ```
25
+
26
+ The linter is configured to check your code for adherence to our guidelines defined in `.solcover.js`.
27
+ The script above will prettify the smart contracts, tests and other files according to our styling guidelines defined in `.prettierrc`.
28
+
29
+ ## Testing
30
+
31
+ Chai contract tests are defined under the tests directory. To run all the tests, run:
32
+
33
+ ```bash
34
+ $ npm test
35
+ ```
36
+
3
37
  ## **Commits and PRs**
4
38
 
5
39
  This project uses Conventional Commits to generate release notes and to determine versioning. Commit messages should adhere to this standard and be of the form:
@@ -10,9 +44,14 @@ $ git commit -m "fix: Fix bug in feature x"
10
44
  $ git commit -m "docs: Add documentation for feature x"
11
45
  $ git commit -m "test: Add test suite for feature x"
12
46
  ```
47
+
13
48
  Further details on `conventional commits` can be found here: https://www.conventionalcommits.org/en/v1.0.0/
14
49
 
15
50
  When merging a branch to `develop` PRs should be squashed into one conventional commit by selecting the `Squash and merge` option. This ensures Release notes are useful and readable when releases are created.
16
51
 
17
52
  <!-- ![alt text](https://docs.github.com/assets/images/help/pull_requests/select-squash-and-merge-from-drop-down-menu.png) -->
18
53
  <img src="https://docs.github.com/assets/images/help/pull_requests/select-squash-and-merge-from-drop-down-menu.png" alt="drawing" style="width:600px;"/>
54
+
55
+ ## Adding contributors
56
+
57
+ You can add yourself to the list of contributors in the repository when opening a PR for the first time in the repository. See the [`all-contributors-cli`](https://allcontributors.org/docs/en/cli/usage#all-contributors-add) usage documentation.
package/README.md CHANGED
@@ -1,17 +1,15 @@
1
- # LSP Smart Contracts &middot; [![npm version](https://img.shields.io/npm/v/@lukso/lsp-smart-contracts.svg?style=flat)](https://www.npmjs.com/package/@lukso/lsp-smart-contracts) [![Coverage Status](https://coveralls.io/repos/github/lukso-network/lsp-smart-contracts/badge.svg?branch=develop)](https://coveralls.io/github/lukso-network/lsp-smart-contracts?branch=develop)
1
+ # LSP Smart Contracts &middot; [![npm version](https://img.shields.io/npm/v/@lukso/lsp-smart-contracts.svg?style=flat)](https://www.npmjs.com/package/@lukso/lsp-smart-contracts) [![Coverage Status](https://coveralls.io/repos/github/lukso-network/lsp-smart-contracts/badge.svg?branch=develop)](https://coveralls.io/github/lukso-network/lsp-smart-contracts?branch=develop) [![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)
2
2
 
3
3
  The smart contracts reference implementation of the [LUKSO Standard Proposals (LSPs)](https://github.com/lukso-network/LIPs/tree/main/LSPs).
4
4
 
5
- For more information see [Documentation](https://docs.lukso.tech/standards/smart-contracts/introduction) on *[docs.lukso.tech](https://docs.lukso.tech/standards/introduction).*
5
+ For more information see [Documentation](https://docs.lukso.tech/standards/smart-contracts/introduction) on _[docs.lukso.tech](https://docs.lukso.tech/standards/introduction)._
6
6
 
7
7
  | :warning: | _This package is currently in early stages of development,<br/> use for testing or experimentation purposes only._ |
8
8
  | :-------: | :----------------------------------------------------------------------------------------------------------------- |
9
9
 
10
- ## **Overview**
10
+ ## Installation
11
11
 
12
- ### Installation
13
-
14
- #### npm
12
+ ### npm
15
13
 
16
14
  LSP smart contracts are available as a [npm package](https://www.npmjs.com/package/@lukso/lsp-smart-contracts).
17
15
 
@@ -19,7 +17,7 @@ LSP smart contracts are available as a [npm package](https://www.npmjs.com/packa
19
17
  npm install @lukso/lsp-smart-contracts
20
18
  ```
21
19
 
22
- #### cloning the repository
20
+ ### cloning the repository
23
21
 
24
22
  Alternatively you can also clone the repository and install its dependencies to start using the smart contracts.
25
23
 
@@ -31,61 +29,55 @@ $ npm install
31
29
 
32
30
  ## Usage
33
31
 
34
- #### in Javascript
32
+ ### in Javascript
35
33
 
36
34
  You can use the contracts JSON ABI by importing them as follow:
37
35
 
38
36
  ```javascript
39
37
  import LSP0ERC725Account from "@lukso/lsp-smart-contracts/artifacts/LSP0ERC725Account.json";
40
38
 
41
- const myContract = new this.web3.eth.Contract(LSP0ERC725Account.abi, "", defaultOptions);
39
+ const myContract = new web3.eth.Contract(
40
+ LSP0ERC725Account.abi,
41
+ "",
42
+ defaultOptions
43
+ );
42
44
  ```
43
45
 
44
- #### in Solidity
46
+ ### in Solidity
45
47
 
46
48
  ```sol
47
49
  import "@lukso/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol";
48
50
 
49
51
  contract MyAccount is LSP0ERC725Account {
50
- constructor(address _newOwner) LSP0ERC725Account(_newOwner) {
51
-
52
- }
52
+ constructor(address _newOwner) LSP0ERC725Account(_newOwner) {}
53
53
  }
54
- ```
55
-
56
-
57
- ### Testing
58
- Chai contract tests are defined under the tests directory. To run all the tests, run:
59
54
 
60
- ```bash
61
- $ npm test
62
55
  ```
63
56
 
64
-
65
57
  ### Deployment via hardhat
66
58
 
67
59
  You can find more infos on how to deploy the contracts via hardhat in the [DEPLOYMENT](./DEPLOYMENT.md) page.
68
60
 
69
- ### Available Constants
70
-
71
- You can access interface IDs and other constants, using the [`constants.js` file](https://github.com/lukso-network/lsp-smart-contracts/blob/main/constants.js) file from the [lsp-smart-contracts package](https://www.npmjs.com/package/@lukso/lsp-smart-contracts).
72
-
73
-
74
- ```js
75
- const {
76
- INTERFACE_IDS,
77
- ERC1271,
78
- OPERATIONS,
79
- SupportedStandards,
80
- ERC725YKeys,
81
- BasicUPSetup_Schema,
82
- PERMISSIONS,
83
- ALL_PERMISSIONS,
84
- Errors,
85
- EventSignatures,
86
- } = require("@lukso/lsp-smart-contracts/constants.js");
61
+ ## Available Constants
62
+
63
+ The [`@lukso/lsp-smart-contracts` npm package](https://www.npmjs.com/package/@lukso/lsp-smart-contracts) contains useful constants such as Interface IDs or ERC725Y Data Keys related to the LSP Standards. You can import and access them as follow:
64
+
65
+ ```ts
66
+ import {
67
+ INTERFACE_IDS,
68
+ ERC1271,
69
+ OPERATIONS,
70
+ SupportedStandards,
71
+ ERC725YDataKeys,
72
+ PERMISSIONS,
73
+ ALL_PERMISSIONS,
74
+ Errors,
75
+ EventSignatures,
76
+ } from "@lukso/lsp-smart-contracts";
87
77
  ```
88
78
 
79
+ > **Note:** we also export it as `@lukso/lsp-smart-contracts/constants` or `@lukso/lsp-smart-contracts/constants.js` to keep it backward compatible.
80
+
89
81
  It also includes constant values [Array data keys](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#Array) to retrieve both the array length and for index access.
90
82
 
91
83
  ```js
@@ -93,4 +85,65 @@ It also includes constant values [Array data keys](https://github.com/lukso-netw
93
85
  length: '0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b',
94
86
  index: '0x6460ee3c0aac563ccbf76d6e1d07bada',
95
87
  },
96
- ```
88
+ ```
89
+
90
+ ## Audits
91
+
92
+ The following audits where conducted. All high-level issues were addressed, or were not deemed as critical.
93
+
94
+ - Chainsulting Audit, 06-07-2022, Final Result: [Chainsulting_audit_06_07_2022.pdf](./audits/Chainsulting_audit_06_07_2022.pdf)
95
+ - Quantstamp Audit, 20-10-2022, Final Result: [Quantstamp_audit_07_09_2022.pdf](./audits/Quantstamp_audit_07_09_2022.pdf)
96
+ - Watchpug Audit, 20-10-2022, Final Result: [Watchpug_audit_20_10_2022.pdf](./audits/Watchpug_audit_20_10_2022.pdf)
97
+ - Watchpug Audit, 15-12-2022, Final Result: [Watchpug_audit_15_12_2022.pdf](./audits/Watchpug_audit_15_12_2022.pdf)
98
+
99
+ ## Contributors ✨
100
+
101
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
102
+
103
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
104
+ <!-- prettier-ignore-start -->
105
+ <!-- markdownlint-disable -->
106
+ <table>
107
+ <tbody>
108
+ <tr>
109
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/CJ42"><img src="https://avatars.githubusercontent.com/u/31145285?v=4?s=50" width="50px;" alt="Jean Cvllr"/><br /><sub><b>Jean Cvllr</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=CJ42" title="Code">💻</a></td>
110
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/YamenMerhi"><img src="https://avatars.githubusercontent.com/u/86341666?v=4?s=50" width="50px;" alt="Yamen Merhi"/><br /><sub><b>Yamen Merhi</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=YamenMerhi" title="Code">💻</a></td>
111
+ <td align="center" valign="top" width="14.28%"><a href="https://lukso.network/"><img src="https://avatars.githubusercontent.com/u/232662?v=4?s=50" width="50px;" alt="Fabian Vogelsteller"/><br /><sub><b>Fabian Vogelsteller</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=frozeman" title="Code">💻</a></td>
112
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/b00ste"><img src="https://avatars.githubusercontent.com/u/62855857?v=4?s=50" width="50px;" alt="b00ste.lyx"/><br /><sub><b>b00ste.lyx</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=b00ste" title="Code">💻</a></td>
113
+ <td align="center" valign="top" width="14.28%"><a href="http://www.mattgstevens.com/"><img src="https://avatars.githubusercontent.com/u/2363636?v=4?s=50" width="50px;" alt="Matthew Stevens"/><br /><sub><b>Matthew Stevens</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=mattgstevens" title="Code">💻</a></td>
114
+ <td align="center" valign="top" width="14.28%"><a href="http://rryter.ch/"><img src="https://avatars.githubusercontent.com/u/798709?v=4?s=50" width="50px;" alt="Reto Ryter"/><br /><sub><b>Reto Ryter</b></sub></a><br /><a href="#tool-rryter" title="Tools">🔧</a> <a href="#infra-rryter" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
115
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/CallumGrindle"><img src="https://avatars.githubusercontent.com/u/54543428?v=4?s=50" width="50px;" alt="Callum Grindle"/><br /><sub><b>Callum Grindle</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/pulls?q=is%3Apr+reviewed-by%3ACallumGrindle" title="Reviewed Pull Requests">👀</a></td>
116
+ </tr>
117
+ <tr>
118
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/skimaharvey"><img src="https://avatars.githubusercontent.com/u/64636974?v=4?s=50" width="50px;" alt="Skima Harvey"/><br /><sub><b>Skima Harvey</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=skimaharvey" title="Code">💻</a></td>
119
+ <td align="center" valign="top" width="14.28%"><a href="https://stackoverflow.com/users/7210237/jenea-vranceanu"><img src="https://avatars.githubusercontent.com/u/36865532?v=4?s=50" width="50px;" alt="Jenea Vranceanu"/><br /><sub><b>Jenea Vranceanu</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=JeneaVranceanu" title="Code">💻</a></td>
120
+ <td align="center" valign="top" width="14.28%"><a href="http://www.hugomasclet.com/"><img src="https://avatars.githubusercontent.com/u/477945?v=4?s=50" width="50px;" alt="Hugo Masclet"/><br /><sub><b>Hugo Masclet</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/pulls?q=is%3Apr+reviewed-by%3AHugoo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=Hugoo" title="Code">💻</a></td>
121
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Leondroids"><img src="https://avatars.githubusercontent.com/u/11769769?v=4?s=50" width="50px;" alt="Leondroid"/><br /><sub><b>Leondroid</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/pulls?q=is%3Apr+reviewed-by%3ALeondroids" title="Reviewed Pull Requests">👀</a></td>
122
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/lucasmt"><img src="https://avatars.githubusercontent.com/u/36549752?v=4?s=50" width="50px;" alt="lucasmt"/><br /><sub><b>lucasmt</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/issues?q=author%3Alucasmt" title="Bug reports">🐛</a></td>
123
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/qian-hu"><img src="https://avatars.githubusercontent.com/u/88806138?v=4?s=50" width="50px;" alt="qian-hu"/><br /><sub><b>qian-hu</b></sub></a><br /><a href="#security-qian-hu" title="Security">🛡️</a> <a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/issues?q=author%3Aqian-hu" title="Bug reports">🐛</a></td>
124
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/magalimorin18"><img src="https://avatars.githubusercontent.com/u/51906903?v=4?s=50" width="50px;" alt="Magali Morin"/><br /><sub><b>Magali Morin</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=magalimorin18" title="Code">💻</a></td>
125
+ </tr>
126
+ <tr>
127
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Hugo0"><img src="https://avatars.githubusercontent.com/u/12943235?v=4?s=50" width="50px;" alt="Hugo Montenegro"/><br /><sub><b>Hugo Montenegro</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=Hugo0" title="Documentation">📖</a></td>
128
+ <td align="center" valign="top" width="14.28%"><a href="https://lykhonis.com/"><img src="https://avatars.githubusercontent.com/u/881338?v=4?s=50" width="50px;" alt="Volodymyr Lykhonis"/><br /><sub><b>Volodymyr Lykhonis</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=lykhonis" title="Code">💻</a></td>
129
+ <td align="center" valign="top" width="14.28%"><a href="https://onahprosperity.github.io/"><img src="https://avatars.githubusercontent.com/u/40717516?v=4?s=50" width="50px;" alt="Prosperity"/><br /><sub><b>Prosperity</b></sub></a><br /><a href="https://github.com/Fabian Vogelsteller/lsp-smart-contracts/commits?author=OnahProsperity" title="Documentation">📖</a></td>
130
+ <td align="center" valign="top" width="14.28%"><a href="https://michael.standen.link/"><img src="https://avatars.githubusercontent.com/u/1460552?v=4?s=50" width="50px;" alt="Michael Standen"/><br /><sub><b>Michael Standen</b></sub></a><br /><a href="https://github.com/lukso-network/lsp-smart-contracts/commits?author=ScreamingHawk" title="Code">💻</a></td>
131
+ </tr>
132
+ </tbody>
133
+ <tfoot>
134
+ <tr>
135
+ <td align="center" size="13px" colspan="7">
136
+ <img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
137
+ <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
138
+ </img>
139
+ </td>
140
+ </tr>
141
+ </tfoot>
142
+ </table>
143
+
144
+ <!-- markdownlint-restore -->
145
+ <!-- prettier-ignore-end -->
146
+
147
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
148
+
149
+ This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -100,8 +100,8 @@
100
100
  "type": "function"
101
101
  }
102
102
  ],
103
- "bytecode": "0x608060405234801561001057600080fd5b5061043a806100206000396000f3fe6080604052600436106100345760003560e01c8063481286e61461003957806378065306146100eb578063cdcb760a14610179575b600080fd5b34801561004557600080fd5b506100c26100543660046102a6565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820194909452605580820193909352815180820390930183526075019052805191012090565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f757600080fd5b506100c26101063660046102c8565b604080517fff0000000000000000000000000000000000000000000000000000000000000060208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6100c2610187366004610349565b8051600090819034906101e15760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064015b60405180910390fd5b8484516020860183f5915073ffffffffffffffffffffffffffffffffffffffff821661024f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101d8565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018790527fc16bb3dbd36917c7aa3e76b988c2cd35e74bb230a02fef61e7376d8b4bfaea77910160405180910390a1509392505050565b600080604083850312156102b957600080fd5b50508035926020909101359150565b6000806000606084860312156102dd57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461030f57600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561035c57600080fd5b82359150602083013567ffffffffffffffff8082111561037b57600080fd5b818501915085601f83011261038f57600080fd5b8135818111156103a1576103a161031a565b604051601f8201601f19908116603f011681019083821181831017156103c9576103c961031a565b816040528281528860208487010111156103e257600080fd5b826020860160208301376000602084830101528095505050505050925092905056fea26469706673582212207178d84066352886df8b9bbdbbc405581fb47a96d1223fe9ff470ccfa0c8767164736f6c634300080a0033",
104
- "deployedBytecode": "0x6080604052600436106100345760003560e01c8063481286e61461003957806378065306146100eb578063cdcb760a14610179575b600080fd5b34801561004557600080fd5b506100c26100543660046102a6565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820194909452605580820193909352815180820390930183526075019052805191012090565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f757600080fd5b506100c26101063660046102c8565b604080517fff0000000000000000000000000000000000000000000000000000000000000060208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6100c2610187366004610349565b8051600090819034906101e15760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064015b60405180910390fd5b8484516020860183f5915073ffffffffffffffffffffffffffffffffffffffff821661024f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101d8565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018790527fc16bb3dbd36917c7aa3e76b988c2cd35e74bb230a02fef61e7376d8b4bfaea77910160405180910390a1509392505050565b600080604083850312156102b957600080fd5b50508035926020909101359150565b6000806000606084860312156102dd57600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461030f57600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561035c57600080fd5b82359150602083013567ffffffffffffffff8082111561037b57600080fd5b818501915085601f83011261038f57600080fd5b8135818111156103a1576103a161031a565b604051601f8201601f19908116603f011681019083821181831017156103c9576103c961031a565b816040528281528860208487010111156103e257600080fd5b826020860160208301376000602084830101528095505050505050925092905056fea26469706673582212207178d84066352886df8b9bbdbbc405581fb47a96d1223fe9ff470ccfa0c8767164736f6c634300080a0033",
103
+ "bytecode": "0x608060405234801561001057600080fd5b5061043e806100206000396000f3fe6080604052600436106100345760003560e01c8063481286e61461003957806378065306146100eb578063cdcb760a14610179575b600080fd5b34801561004557600080fd5b506100c26100543660046102aa565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820194909452605580820193909352815180820390930183526075019052805191012090565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f757600080fd5b506100c26101063660046102cc565b604080517fff0000000000000000000000000000000000000000000000000000000000000060208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6100c261018736600461034d565b600080600034905083516000036101e55760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064015b60405180910390fd5b8484516020860183f5915073ffffffffffffffffffffffffffffffffffffffff82166102535760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101dc565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018790527fc16bb3dbd36917c7aa3e76b988c2cd35e74bb230a02fef61e7376d8b4bfaea77910160405180910390a1509392505050565b600080604083850312156102bd57600080fd5b50508035926020909101359150565b6000806000606084860312156102e157600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461031357600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561036057600080fd5b82359150602083013567ffffffffffffffff8082111561037f57600080fd5b818501915085601f83011261039357600080fd5b8135818111156103a5576103a561031e565b604051601f8201601f19908116603f011681019083821181831017156103cd576103cd61031e565b816040528281528860208487010111156103e657600080fd5b826020860160208301376000602084830101528095505050505050925092905056fea2646970667358221220bce0054f9f633574d211b351f00e30a72e5d0838a65700a1238564854698209a64736f6c634300080f0033",
104
+ "deployedBytecode": "0x6080604052600436106100345760003560e01c8063481286e61461003957806378065306146100eb578063cdcb760a14610179575b600080fd5b34801561004557600080fd5b506100c26100543660046102aa565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820194909452605580820193909352815180820390930183526075019052805191012090565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f757600080fd5b506100c26101063660046102cc565b604080517fff0000000000000000000000000000000000000000000000000000000000000060208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6100c261018736600461034d565b600080600034905083516000036101e55760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064015b60405180910390fd5b8484516020860183f5915073ffffffffffffffffffffffffffffffffffffffff82166102535760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101dc565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018790527fc16bb3dbd36917c7aa3e76b988c2cd35e74bb230a02fef61e7376d8b4bfaea77910160405180910390a1509392505050565b600080604083850312156102bd57600080fd5b50508035926020909101359150565b6000806000606084860312156102e157600080fd5b8335925060208401359150604084013573ffffffffffffffffffffffffffffffffffffffff8116811461031357600080fd5b809150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561036057600080fd5b82359150602083013567ffffffffffffffff8082111561037f57600080fd5b818501915085601f83011261039357600080fd5b8135818111156103a5576103a561031e565b604051601f8201601f19908116603f011681019083821181831017156103cd576103cd61031e565b816040528281528860208487010111156103e657600080fd5b826020860160208301376000602084830101528095505050505050925092905056fea2646970667358221220bce0054f9f633574d211b351f00e30a72e5d0838a65700a1238564854698209a64736f6c634300080f0033",
105
105
  "linkReferences": {},
106
106
  "deployedLinkReferences": {}
107
107
  }