@lukso/lsp-smart-contracts 0.11.1 → 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.
- package/README.md +10 -2
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +68 -47
- package/artifacts/LSP0ERC725AccountInit.json +68 -47
- package/artifacts/LSP11BasicSocialRecovery.json +18 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +18 -2
- package/artifacts/LSP16UniversalFactory.json +3 -3
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +27 -46
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +27 -46
- package/artifacts/LSP23LinkedContractsFactory.json +3 -3
- package/artifacts/LSP4DigitalAssetMetadata.json +16 -0
- package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +16 -0
- package/artifacts/LSP6KeyManager.json +34 -6
- package/artifacts/LSP6KeyManagerInit.json +34 -6
- package/artifacts/LSP7CappedSupply.json +64 -4
- package/artifacts/LSP7CappedSupplyInitAbstract.json +64 -4
- package/artifacts/LSP7CompatibleERC20.json +83 -23
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +83 -23
- package/artifacts/LSP7CompatibleERC20Mintable.json +86 -26
- package/artifacts/LSP7CompatibleERC20MintableInit.json +86 -26
- package/artifacts/LSP7DigitalAsset.json +64 -4
- package/artifacts/LSP7DigitalAssetInitAbstract.json +64 -4
- package/artifacts/LSP7Mintable.json +67 -7
- package/artifacts/LSP7MintableInit.json +67 -7
- package/artifacts/LSP8CappedSupply.json +57 -3
- package/artifacts/LSP8CappedSupplyInitAbstract.json +57 -3
- package/artifacts/LSP8CompatibleERC721.json +79 -25
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +79 -25
- package/artifacts/LSP8CompatibleERC721Mintable.json +87 -28
- package/artifacts/LSP8CompatibleERC721MintableInit.json +87 -28
- package/artifacts/LSP8IdentifiableDigitalAsset.json +57 -3
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +57 -3
- package/artifacts/LSP8Mintable.json +65 -6
- package/artifacts/LSP8MintableInit.json +65 -6
- package/artifacts/LSP9Vault.json +51 -35
- package/artifacts/LSP9VaultInit.json +51 -35
- package/artifacts/UniversalProfile.json +68 -47
- package/artifacts/UniversalProfileInit.json +68 -47
- package/contracts/Factories/Create2Factory.sol +1 -1
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -22
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +6 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +196 -123
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +5 -3
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +54 -14
- package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +1 -1
- package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +1 -1
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +2 -2
- package/contracts/LSP14Ownable2Step/LSP14Constants.sol +1 -1
- package/contracts/LSP14Ownable2Step/LSP14Errors.sol +9 -3
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +16 -12
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +65 -96
- package/contracts/LSP17ContractExtension/LSP17Errors.sol +1 -1
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +22 -15
- package/contracts/LSP17ContractExtension/LSP17Extension.sol +6 -5
- package/contracts/LSP17Extensions/Extension4337.sol +101 -0
- package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +15 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +1 -2
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +24 -0
- package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -0
- package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +0 -6
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +49 -33
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +33 -27
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +5 -48
- package/contracts/LSP20CallVerification/ILSP20CallVerifier.sol +13 -9
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +64 -45
- package/contracts/LSP20CallVerification/LSP20Constants.sol +6 -6
- package/contracts/LSP20CallVerification/LSP20Errors.sol +10 -4
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/ILSP23LinkedContractsFactory.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/IPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23Errors.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23LinkedContractsFactory.sol +5 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfileInitPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfilePostDeploymentModule.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +8 -3
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +1 -97
- package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +8 -3
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +8 -3
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Constants.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Errors.sol +2 -23
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +176 -101
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +1 -2
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol +27 -0
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +34 -28
- package/contracts/LSP6KeyManager/LSP6Utils.sol +29 -2
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +70 -10
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +2 -2
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +29 -13
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +273 -265
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +28 -12
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +17 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +4 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +7 -7
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +128 -54
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +129 -54
- package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +2 -2
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +1 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -4
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +16 -11
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +20 -6
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +32 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +67 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +143 -137
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +69 -15
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +172 -80
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +178 -91
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +8 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +5 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +13 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +9 -8
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +9 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +10 -8
- package/contracts/LSP9Vault/ILSP9Vault.sol +0 -21
- package/contracts/LSP9Vault/LSP9Constants.sol +6 -1
- package/contracts/LSP9Vault/LSP9Errors.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +119 -66
- package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -1
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
- package/contracts/UniversalProfile.sol +1 -1
- package/contracts/UniversalProfileInit.sol +1 -1
- package/contracts/UniversalProfileInitAbstract.sol +1 -1
- package/contracts/Version.sol +16 -0
- package/devdocs/LSP0ERC725Account.json +86 -52
- package/devdocs/LSP0ERC725AccountInit.json +86 -52
- package/devdocs/LSP11BasicSocialRecovery.json +13 -0
- package/devdocs/LSP11BasicSocialRecoveryInit.json +13 -0
- package/devdocs/LSP16UniversalFactory.json +9 -9
- package/devdocs/LSP1UniversalReceiverDelegateUP.json +7 -6
- package/devdocs/LSP1UniversalReceiverDelegateVault.json +7 -6
- package/devdocs/LSP4DigitalAssetMetadata.json +32 -10
- package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +32 -10
- package/devdocs/LSP6KeyManager.json +27 -13
- package/devdocs/LSP6KeyManagerInit.json +27 -13
- package/devdocs/LSP7CappedSupply.json +61 -28
- package/devdocs/LSP7CappedSupplyInitAbstract.json +61 -28
- package/devdocs/LSP7CompatibleERC20.json +102 -32
- package/devdocs/LSP7CompatibleERC20InitAbstract.json +102 -32
- package/devdocs/LSP7CompatibleERC20Mintable.json +102 -32
- package/devdocs/LSP7CompatibleERC20MintableInit.json +102 -32
- package/devdocs/LSP7DigitalAsset.json +61 -28
- package/devdocs/LSP7DigitalAssetInitAbstract.json +61 -28
- package/devdocs/LSP7Mintable.json +61 -28
- package/devdocs/LSP7MintableInit.json +61 -28
- package/devdocs/LSP8CappedSupply.json +66 -27
- package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -27
- package/devdocs/LSP8CompatibleERC721.json +93 -33
- package/devdocs/LSP8CompatibleERC721InitAbstract.json +93 -33
- package/devdocs/LSP8CompatibleERC721Mintable.json +95 -35
- package/devdocs/LSP8CompatibleERC721MintableInit.json +96 -36
- package/devdocs/LSP8IdentifiableDigitalAsset.json +70 -28
- package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -27
- package/devdocs/LSP8Mintable.json +68 -29
- package/devdocs/LSP8MintableInit.json +69 -30
- package/devdocs/LSP9Vault.json +69 -41
- package/devdocs/LSP9VaultInit.json +69 -41
- package/devdocs/UniversalProfile.json +86 -52
- package/devdocs/UniversalProfileInit.json +86 -52
- package/dist/constants.cjs.js +5565 -2846
- package/dist/constants.d.ts +3996 -1182
- package/dist/constants.es.js +5564 -2846
- package/package.json +8 -8
- package/userdocs/LSP0ERC725Account.json +20 -11
- package/userdocs/LSP0ERC725AccountInit.json +20 -11
- package/userdocs/LSP16UniversalFactory.json +26 -1
- package/userdocs/LSP1UniversalReceiverDelegateUP.json +4 -11
- package/userdocs/LSP1UniversalReceiverDelegateVault.json +4 -11
- package/userdocs/LSP4DigitalAssetMetadata.json +7 -4
- package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -4
- package/userdocs/LSP6KeyManager.json +3 -5
- package/userdocs/LSP6KeyManagerInit.json +3 -5
- package/userdocs/LSP7CappedSupply.json +17 -6
- package/userdocs/LSP7CappedSupplyInitAbstract.json +16 -5
- package/userdocs/LSP7CompatibleERC20.json +18 -5
- package/userdocs/LSP7CompatibleERC20InitAbstract.json +18 -5
- package/userdocs/LSP7CompatibleERC20Mintable.json +18 -5
- package/userdocs/LSP7CompatibleERC20MintableInit.json +18 -5
- package/userdocs/LSP7DigitalAsset.json +18 -5
- package/userdocs/LSP7DigitalAssetInitAbstract.json +18 -5
- package/userdocs/LSP7Mintable.json +18 -5
- package/userdocs/LSP7MintableInit.json +18 -5
- package/userdocs/LSP8CappedSupply.json +16 -5
- package/userdocs/LSP8CappedSupplyInitAbstract.json +15 -4
- package/userdocs/LSP8CompatibleERC721.json +30 -17
- package/userdocs/LSP8CompatibleERC721InitAbstract.json +30 -17
- package/userdocs/LSP8CompatibleERC721Mintable.json +31 -18
- package/userdocs/LSP8CompatibleERC721MintableInit.json +32 -19
- package/userdocs/LSP8IdentifiableDigitalAsset.json +18 -5
- package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +17 -4
- package/userdocs/LSP8Mintable.json +18 -5
- package/userdocs/LSP8MintableInit.json +19 -6
- package/userdocs/LSP9Vault.json +23 -14
- package/userdocs/LSP9VaultInit.json +23 -14
- package/userdocs/UniversalProfile.json +20 -11
- package/userdocs/UniversalProfileInit.json +20 -11
- package/CONTRIBUTING.md +0 -184
- package/artifacts/LSP4Compatibility.json +0 -216
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +0 -25
- package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +0 -38
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +0 -83
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +0 -175
- package/devdocs/LSP4Compatibility.json +0 -79
- package/userdocs/LSP4Compatibility.json +0 -20
package/CONTRIBUTING.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
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
|
-
|
|
37
|
-
## **Commits and PRs**
|
|
38
|
-
|
|
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:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
$ git commit -m "feat: Add new feature x"
|
|
43
|
-
$ git commit -m "fix: Fix bug in feature x"
|
|
44
|
-
$ git commit -m "docs: Add documentation for feature x"
|
|
45
|
-
$ git commit -m "test: Add test suite for feature x"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Further details on `conventional commits` can be found here: https://www.conventionalcommits.org/en/v1.0.0/
|
|
49
|
-
|
|
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.
|
|
51
|
-
|
|
52
|
-
<!--  -->
|
|
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
|
-
## Solidity Code Comments
|
|
56
|
-
|
|
57
|
-
When changing or adding NatSpec comments to any `function`, `error` or `event` in any contract make sure to adhere to the following guidelines:
|
|
58
|
-
|
|
59
|
-
1. `@dev` and `@notice` tags can both contain text descriptions and two types of lists: bullet points or numbered lists. Make sure that those tags always start with text descriptions first, not with lists.
|
|
60
|
-
|
|
61
|
-
E.g.:
|
|
62
|
-
|
|
63
|
-
```solidity
|
|
64
|
-
/**
|
|
65
|
-
* @dev Some description for starters.
|
|
66
|
-
* Continuing describing.
|
|
67
|
-
* It can span over multiple lines.
|
|
68
|
-
*/
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**or**
|
|
72
|
-
|
|
73
|
-
```solidity
|
|
74
|
-
/**
|
|
75
|
-
* @dev Some description for starters.
|
|
76
|
-
*
|
|
77
|
-
* - First bullet point.
|
|
78
|
-
* 1. First orderd element.
|
|
79
|
-
* 2. Second orderd element.
|
|
80
|
-
*
|
|
81
|
-
* - Second bullet point.
|
|
82
|
-
*/
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**or**
|
|
86
|
-
|
|
87
|
-
```solidity
|
|
88
|
-
/**
|
|
89
|
-
* @dev Some description for starters.
|
|
90
|
-
*
|
|
91
|
-
* 1. First bullet point.
|
|
92
|
-
* - First orderd element.
|
|
93
|
-
* - Second orderd element.
|
|
94
|
-
*
|
|
95
|
-
* 2. Second bullet point.
|
|
96
|
-
* - First orderd element.
|
|
97
|
-
* - Second orderd element.
|
|
98
|
-
*/
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**_not_**
|
|
102
|
-
|
|
103
|
-
```solidity
|
|
104
|
-
/**
|
|
105
|
-
* @dev Some description for starters.
|
|
106
|
-
*
|
|
107
|
-
* 1. First bullet point.
|
|
108
|
-
* - First orderd element.
|
|
109
|
-
* - Second orderd element.
|
|
110
|
-
*
|
|
111
|
-
* First description.
|
|
112
|
-
*
|
|
113
|
-
* 2. Second bullet point.
|
|
114
|
-
* - First orderd element.
|
|
115
|
-
* Second description.
|
|
116
|
-
* - Second orderd element.
|
|
117
|
-
*/
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
This formatting will result in the following output:
|
|
121
|
-
|
|
122
|
-
```md
|
|
123
|
-
Some description for starters.
|
|
124
|
-
|
|
125
|
-
1. First bullet point.
|
|
126
|
-
|
|
127
|
-
- First orderd element.
|
|
128
|
-
- Second orderd element. First description.
|
|
129
|
-
|
|
130
|
-
2. Second bullet point.
|
|
131
|
-
|
|
132
|
-
- First orderd element. Second description.
|
|
133
|
-
- Second orderd element.
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Which is is not the intended output.
|
|
137
|
-
|
|
138
|
-
2. `@param` tag is mandatory if the function, error or event has any parameters.
|
|
139
|
-
|
|
140
|
-
3. `@return` tag is mandatory if the function has any return value.
|
|
141
|
-
|
|
142
|
-
4. Make sure to use one of the custom tags below to document any additional informations of different kinds:
|
|
143
|
-
|
|
144
|
-
- Use `@custom:requirements` for all the requirements to use a function.
|
|
145
|
-
- Use `@custom:events` for all the emited events during the function execution.
|
|
146
|
-
- Use `@custom:warning` for any warnings someone must be aware of.
|
|
147
|
-
- Use `@custom:danger` for any dangers one needs to be aware when using the function.
|
|
148
|
-
- Use `@custom:hint` for any tips you might have for someone that wants to use the function.
|
|
149
|
-
- Use `@custom:info` for any extra information.
|
|
150
|
-
|
|
151
|
-
If there is only a single comment for the `@custom` tag, it can be written on the same line as the `@custom` tag.
|
|
152
|
-
If there is multiple comments for the `@custom` tag, it should span across multiple lines using `-` as bullet points.
|
|
153
|
-
|
|
154
|
-
E.g.:
|
|
155
|
-
|
|
156
|
-
```solidity
|
|
157
|
-
/**
|
|
158
|
-
* @custom:events {ValueReceived} event when someone tranfers native tokens to the contract.
|
|
159
|
-
*/
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**or**
|
|
163
|
-
|
|
164
|
-
```solidity
|
|
165
|
-
/**
|
|
166
|
-
* @custom:events
|
|
167
|
-
* - {ValueReceived} event when someone tranfers native tokens to the contract.
|
|
168
|
-
* - {Executes} event when the function is executed without any issues.
|
|
169
|
-
*/
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
5. If you want to add an internal link to a `function`, `error` or `event` defined the current contract, use `{}`.
|
|
173
|
-
E.g.: `{pendingOwner}`, `{pendingOwner()}` etc.
|
|
174
|
-
|
|
175
|
-
6. If you want to add an external link to anything, use `[]`.
|
|
176
|
-
E.g.: `[ERC725Y]`, `[EIP-1271]` etc.
|
|
177
|
-
|
|
178
|
-
To use this option, you should keeping mind to add the external links in the footer of the `.md` files as this:
|
|
179
|
-
E.g.: `[ERC725Y]: https://docs.lukso.tech/standards/lsp-background/erc725/#erc725y-generic-data-keyvalue-store` or `[EIP-1271]: https://eips.ethereum.org/EIPS/eip-1271`
|
|
180
|
-
Keep in mind that in our repo we do not want to add this links neither in the smart contracts, nor in the docs template. This links shall be added exclusively to the end application that uses the generated `.md` files. In our case that is the [**docs page**](https://github.com/lukso-network/docs)
|
|
181
|
-
|
|
182
|
-
## Adding contributors
|
|
183
|
-
|
|
184
|
-
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.
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "LSP4Compatibility",
|
|
4
|
-
"sourceName": "contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [],
|
|
8
|
-
"name": "ERC725Y_DataKeysValuesEmptyArray",
|
|
9
|
-
"type": "error"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"inputs": [],
|
|
13
|
-
"name": "ERC725Y_DataKeysValuesLengthMismatch",
|
|
14
|
-
"type": "error"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"inputs": [],
|
|
18
|
-
"name": "ERC725Y_MsgValueDisallowed",
|
|
19
|
-
"type": "error"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"anonymous": false,
|
|
23
|
-
"inputs": [
|
|
24
|
-
{
|
|
25
|
-
"indexed": true,
|
|
26
|
-
"internalType": "bytes32",
|
|
27
|
-
"name": "dataKey",
|
|
28
|
-
"type": "bytes32"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"indexed": false,
|
|
32
|
-
"internalType": "bytes",
|
|
33
|
-
"name": "dataValue",
|
|
34
|
-
"type": "bytes"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"name": "DataChanged",
|
|
38
|
-
"type": "event"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"anonymous": false,
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"indexed": true,
|
|
45
|
-
"internalType": "address",
|
|
46
|
-
"name": "previousOwner",
|
|
47
|
-
"type": "address"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"indexed": true,
|
|
51
|
-
"internalType": "address",
|
|
52
|
-
"name": "newOwner",
|
|
53
|
-
"type": "address"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"name": "OwnershipTransferred",
|
|
57
|
-
"type": "event"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"inputs": [
|
|
61
|
-
{
|
|
62
|
-
"internalType": "bytes32",
|
|
63
|
-
"name": "dataKey",
|
|
64
|
-
"type": "bytes32"
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"name": "getData",
|
|
68
|
-
"outputs": [
|
|
69
|
-
{
|
|
70
|
-
"internalType": "bytes",
|
|
71
|
-
"name": "dataValue",
|
|
72
|
-
"type": "bytes"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"stateMutability": "view",
|
|
76
|
-
"type": "function"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"inputs": [
|
|
80
|
-
{
|
|
81
|
-
"internalType": "bytes32[]",
|
|
82
|
-
"name": "dataKeys",
|
|
83
|
-
"type": "bytes32[]"
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"name": "getDataBatch",
|
|
87
|
-
"outputs": [
|
|
88
|
-
{
|
|
89
|
-
"internalType": "bytes[]",
|
|
90
|
-
"name": "dataValues",
|
|
91
|
-
"type": "bytes[]"
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
"stateMutability": "view",
|
|
95
|
-
"type": "function"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"inputs": [],
|
|
99
|
-
"name": "name",
|
|
100
|
-
"outputs": [
|
|
101
|
-
{
|
|
102
|
-
"internalType": "string",
|
|
103
|
-
"name": "",
|
|
104
|
-
"type": "string"
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
"stateMutability": "view",
|
|
108
|
-
"type": "function"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"inputs": [],
|
|
112
|
-
"name": "owner",
|
|
113
|
-
"outputs": [
|
|
114
|
-
{
|
|
115
|
-
"internalType": "address",
|
|
116
|
-
"name": "",
|
|
117
|
-
"type": "address"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"stateMutability": "view",
|
|
121
|
-
"type": "function"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"inputs": [],
|
|
125
|
-
"name": "renounceOwnership",
|
|
126
|
-
"outputs": [],
|
|
127
|
-
"stateMutability": "nonpayable",
|
|
128
|
-
"type": "function"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"inputs": [
|
|
132
|
-
{
|
|
133
|
-
"internalType": "bytes32",
|
|
134
|
-
"name": "dataKey",
|
|
135
|
-
"type": "bytes32"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"internalType": "bytes",
|
|
139
|
-
"name": "dataValue",
|
|
140
|
-
"type": "bytes"
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
"name": "setData",
|
|
144
|
-
"outputs": [],
|
|
145
|
-
"stateMutability": "payable",
|
|
146
|
-
"type": "function"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"inputs": [
|
|
150
|
-
{
|
|
151
|
-
"internalType": "bytes32[]",
|
|
152
|
-
"name": "dataKeys",
|
|
153
|
-
"type": "bytes32[]"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"internalType": "bytes[]",
|
|
157
|
-
"name": "dataValues",
|
|
158
|
-
"type": "bytes[]"
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
"name": "setDataBatch",
|
|
162
|
-
"outputs": [],
|
|
163
|
-
"stateMutability": "payable",
|
|
164
|
-
"type": "function"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"inputs": [
|
|
168
|
-
{
|
|
169
|
-
"internalType": "bytes4",
|
|
170
|
-
"name": "interfaceId",
|
|
171
|
-
"type": "bytes4"
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"name": "supportsInterface",
|
|
175
|
-
"outputs": [
|
|
176
|
-
{
|
|
177
|
-
"internalType": "bool",
|
|
178
|
-
"name": "",
|
|
179
|
-
"type": "bool"
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"stateMutability": "view",
|
|
183
|
-
"type": "function"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"inputs": [],
|
|
187
|
-
"name": "symbol",
|
|
188
|
-
"outputs": [
|
|
189
|
-
{
|
|
190
|
-
"internalType": "string",
|
|
191
|
-
"name": "",
|
|
192
|
-
"type": "string"
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
"stateMutability": "view",
|
|
196
|
-
"type": "function"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"inputs": [
|
|
200
|
-
{
|
|
201
|
-
"internalType": "address",
|
|
202
|
-
"name": "newOwner",
|
|
203
|
-
"type": "address"
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
"name": "transferOwnership",
|
|
207
|
-
"outputs": [],
|
|
208
|
-
"stateMutability": "nonpayable",
|
|
209
|
-
"type": "function"
|
|
210
|
-
}
|
|
211
|
-
],
|
|
212
|
-
"bytecode": "0x",
|
|
213
|
-
"deployedBytecode": "0x",
|
|
214
|
-
"linkReferences": {},
|
|
215
|
-
"deployedLinkReferences": {}
|
|
216
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.4;
|
|
4
|
-
|
|
5
|
-
// interfaces
|
|
6
|
-
import {
|
|
7
|
-
IERC725Y
|
|
8
|
-
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @dev LSP4 extension, for compatibility with clients & tools that expect ERC20/721.
|
|
12
|
-
*/
|
|
13
|
-
interface ILSP4Compatibility is IERC725Y {
|
|
14
|
-
/**
|
|
15
|
-
* @dev Returns the name of the token.
|
|
16
|
-
* @return The name of the token
|
|
17
|
-
*/
|
|
18
|
-
function name() external view returns (string memory);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @dev Returns the symbol of the token, usually a shorter version of the name.
|
|
22
|
-
* @return The symbol of the token
|
|
23
|
-
*/
|
|
24
|
-
function symbol() external view returns (string memory);
|
|
25
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8.4;
|
|
3
|
-
|
|
4
|
-
// interfaces
|
|
5
|
-
import {ILSP4Compatibility} from "./ILSP4Compatibility.sol";
|
|
6
|
-
|
|
7
|
-
// modules
|
|
8
|
-
import {ERC725YCore} from "@erc725/smart-contracts/contracts/ERC725YCore.sol";
|
|
9
|
-
|
|
10
|
-
// constants
|
|
11
|
-
import "./LSP4Constants.sol";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @title LSP4Compatibility
|
|
15
|
-
* @author Matthew Stevens
|
|
16
|
-
* @dev LSP4 extension, for compatibility with clients & tools that expect ERC20/721.
|
|
17
|
-
*/
|
|
18
|
-
abstract contract LSP4Compatibility is ILSP4Compatibility, ERC725YCore {
|
|
19
|
-
// --- Token queries
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @dev Returns the name of the token.
|
|
23
|
-
* @return The name of the token
|
|
24
|
-
*/
|
|
25
|
-
function name() public view virtual override returns (string memory) {
|
|
26
|
-
bytes memory data = _getData(_LSP4_TOKEN_NAME_KEY);
|
|
27
|
-
return string(data);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @dev Returns the symbol of the token, usually a shorter version of the name.
|
|
32
|
-
* @return The symbol of the token
|
|
33
|
-
*/
|
|
34
|
-
function symbol() public view virtual override returns (string memory) {
|
|
35
|
-
bytes memory data = _getData(_LSP4_TOKEN_SYMBOL_KEY);
|
|
36
|
-
return string(data);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.4;
|
|
4
|
-
|
|
5
|
-
// interfaces
|
|
6
|
-
import {ILSP7DigitalAsset} from "../ILSP7DigitalAsset.sol";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @dev LSP7 extension, for compatibility for clients / tools that expect ERC20.
|
|
10
|
-
*/
|
|
11
|
-
interface ILSP7CompatibleERC20 is ILSP7DigitalAsset {
|
|
12
|
-
/**
|
|
13
|
-
* @dev ERC20 `Transfer` event emitted when `amount` tokens is transferred from `from` to `to`.
|
|
14
|
-
* To provide compatibility with indexing ERC20 events.
|
|
15
|
-
*
|
|
16
|
-
* @param from The sending address
|
|
17
|
-
* @param to The receiving address
|
|
18
|
-
* @param value The amount of tokens transfered.
|
|
19
|
-
*/
|
|
20
|
-
event Transfer(address indexed from, address indexed to, uint256 value);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @dev ERC20 `Approval` event emitted when `owner` enables `spender` for `value` tokens.
|
|
24
|
-
* To provide compatibility with indexing ERC20 events.
|
|
25
|
-
*
|
|
26
|
-
* @param owner The account giving approval
|
|
27
|
-
* @param spender The account receiving approval
|
|
28
|
-
* @param value The amount of tokens `spender` has access to from `owner`
|
|
29
|
-
*/
|
|
30
|
-
event Approval(
|
|
31
|
-
address indexed owner,
|
|
32
|
-
address indexed spender,
|
|
33
|
-
uint256 value
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
/*
|
|
37
|
-
* @dev Transfer function from the ERC20 standard interface.
|
|
38
|
-
|
|
39
|
-
* @param to The address receiving tokens.
|
|
40
|
-
* @param amount The amount of tokens to transfer.
|
|
41
|
-
*
|
|
42
|
-
* @return `true` on successful transfer.
|
|
43
|
-
*/
|
|
44
|
-
function transfer(address to, uint256 amount) external returns (bool);
|
|
45
|
-
|
|
46
|
-
/*
|
|
47
|
-
* @dev Transfer functions for operators from the ERC20 standard interface.
|
|
48
|
-
|
|
49
|
-
* @param from The address sending tokens.
|
|
50
|
-
* @param to The address receiving tokens.
|
|
51
|
-
* @param amount The amount of tokens to transfer.
|
|
52
|
-
*
|
|
53
|
-
* @return `true` on successful transfer.
|
|
54
|
-
*/
|
|
55
|
-
function transferFrom(
|
|
56
|
-
address from,
|
|
57
|
-
address to,
|
|
58
|
-
uint256 amount
|
|
59
|
-
) external returns (bool);
|
|
60
|
-
|
|
61
|
-
/*
|
|
62
|
-
* @dev Approval function from th ERC20 standard interface.
|
|
63
|
-
|
|
64
|
-
* @param operator The address to approve for `amount`
|
|
65
|
-
* @param amount The amount to approve.
|
|
66
|
-
*
|
|
67
|
-
* @return `true` on successful approval.
|
|
68
|
-
*/
|
|
69
|
-
function approve(address operator, uint256 amount) external returns (bool);
|
|
70
|
-
|
|
71
|
-
/*
|
|
72
|
-
* @dev Function to get operator allowance allowed to spend on behalf of `tokenOwner` from the ERC20 standard interface.
|
|
73
|
-
|
|
74
|
-
* @param tokenOwner The address of the token owner
|
|
75
|
-
* @param operator The address approved by the `tokenOwner`
|
|
76
|
-
*
|
|
77
|
-
* @return The amount `operator` is approved by `tokenOwner`
|
|
78
|
-
*/
|
|
79
|
-
function allowance(
|
|
80
|
-
address tokenOwner,
|
|
81
|
-
address operator
|
|
82
|
-
) external view returns (uint256);
|
|
83
|
-
}
|