@lukso/lsp-smart-contracts 0.12.0-rc.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/LSP0ERC725Account.json +18 -24
- package/artifacts/LSP0ERC725AccountInit.json +18 -24
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +15 -2
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +15 -2
- package/artifacts/LSP6KeyManager.json +25 -2
- package/artifacts/LSP6KeyManagerInit.json +25 -2
- package/artifacts/LSP7CappedSupply.json +35 -0
- package/artifacts/LSP7CappedSupplyInitAbstract.json +35 -0
- package/artifacts/LSP7CompatibleERC20.json +35 -0
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +35 -0
- package/artifacts/LSP7CompatibleERC20Mintable.json +37 -2
- package/artifacts/LSP7CompatibleERC20MintableInit.json +37 -2
- package/artifacts/LSP7DigitalAsset.json +35 -0
- package/artifacts/LSP7DigitalAssetInitAbstract.json +35 -0
- package/artifacts/LSP7Mintable.json +37 -2
- package/artifacts/LSP7MintableInit.json +37 -2
- package/artifacts/LSP8CappedSupply.json +24 -0
- package/artifacts/LSP8CappedSupplyInitAbstract.json +24 -0
- package/artifacts/LSP8CompatibleERC721.json +24 -0
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +24 -0
- package/artifacts/LSP8CompatibleERC721Mintable.json +26 -2
- package/artifacts/LSP8CompatibleERC721MintableInit.json +26 -2
- package/artifacts/LSP8IdentifiableDigitalAsset.json +24 -0
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +24 -0
- package/artifacts/LSP8Mintable.json +26 -2
- package/artifacts/LSP8MintableInit.json +26 -2
- package/artifacts/LSP9Vault.json +15 -21
- package/artifacts/LSP9VaultInit.json +15 -21
- package/artifacts/UniversalProfile.json +18 -24
- package/artifacts/UniversalProfileInit.json +18 -24
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -8
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +5 -0
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +75 -30
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +12 -8
- package/contracts/LSP17ContractExtension/LSP17Extension.sol +2 -1
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +30 -7
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +16 -7
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +3 -2
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +43 -49
- package/contracts/LSP20CallVerification/LSP20Errors.sol +2 -2
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +42 -2
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +3 -3
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +60 -0
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +7 -5
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +122 -176
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +7 -5
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +8 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +7 -1
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +5 -0
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +8 -5
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +6 -5
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +41 -74
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +6 -5
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +10 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +10 -7
- package/contracts/LSP9Vault/ILSP9Vault.sol +0 -8
- package/contracts/LSP9Vault/LSP9Constants.sol +5 -0
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +63 -27
- 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 +14 -8
- package/devdocs/LSP0ERC725AccountInit.json +14 -8
- package/devdocs/LSP1UniversalReceiverDelegateUP.json +6 -0
- package/devdocs/LSP1UniversalReceiverDelegateVault.json +6 -0
- package/devdocs/LSP6KeyManager.json +16 -0
- package/devdocs/LSP6KeyManagerInit.json +16 -0
- package/devdocs/LSP7CappedSupply.json +16 -10
- package/devdocs/LSP7CappedSupplyInitAbstract.json +16 -10
- package/devdocs/LSP7CompatibleERC20.json +16 -10
- package/devdocs/LSP7CompatibleERC20InitAbstract.json +16 -10
- package/devdocs/LSP7CompatibleERC20Mintable.json +16 -10
- package/devdocs/LSP7CompatibleERC20MintableInit.json +16 -10
- package/devdocs/LSP7DigitalAsset.json +16 -10
- package/devdocs/LSP7DigitalAssetInitAbstract.json +16 -10
- package/devdocs/LSP7Mintable.json +16 -10
- package/devdocs/LSP7MintableInit.json +16 -10
- package/devdocs/LSP8CappedSupply.json +9 -2
- package/devdocs/LSP8CappedSupplyInitAbstract.json +9 -2
- package/devdocs/LSP8CompatibleERC721.json +9 -2
- package/devdocs/LSP8CompatibleERC721InitAbstract.json +9 -2
- package/devdocs/LSP8CompatibleERC721Mintable.json +9 -2
- package/devdocs/LSP8CompatibleERC721MintableInit.json +9 -2
- package/devdocs/LSP8IdentifiableDigitalAsset.json +9 -2
- package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +9 -2
- package/devdocs/LSP8Mintable.json +9 -2
- package/devdocs/LSP8MintableInit.json +9 -2
- package/devdocs/LSP9Vault.json +12 -6
- package/devdocs/LSP9VaultInit.json +12 -6
- package/devdocs/UniversalProfile.json +14 -8
- package/devdocs/UniversalProfileInit.json +14 -8
- package/dist/constants.cjs.js +1211 -454
- package/dist/constants.d.ts +1277 -374
- package/dist/constants.es.js +1211 -454
- package/package.json +1 -3
- package/userdocs/LSP0ERC725Account.json +3 -3
- package/userdocs/LSP0ERC725AccountInit.json +3 -3
- package/userdocs/LSP1UniversalReceiverDelegateUP.json +3 -0
- package/userdocs/LSP1UniversalReceiverDelegateVault.json +3 -0
- package/userdocs/LSP6KeyManager.json +3 -0
- package/userdocs/LSP6KeyManagerInit.json +3 -0
- package/userdocs/LSP7CappedSupply.json +3 -0
- package/userdocs/LSP7CappedSupplyInitAbstract.json +3 -0
- package/userdocs/LSP7CompatibleERC20.json +3 -0
- package/userdocs/LSP7CompatibleERC20InitAbstract.json +3 -0
- package/userdocs/LSP7CompatibleERC20Mintable.json +3 -0
- package/userdocs/LSP7CompatibleERC20MintableInit.json +3 -0
- package/userdocs/LSP7DigitalAsset.json +3 -0
- package/userdocs/LSP7DigitalAssetInitAbstract.json +3 -0
- package/userdocs/LSP7Mintable.json +3 -0
- package/userdocs/LSP7MintableInit.json +3 -0
- package/userdocs/LSP8CappedSupply.json +3 -0
- package/userdocs/LSP8CappedSupplyInitAbstract.json +3 -0
- package/userdocs/LSP8CompatibleERC721.json +3 -0
- package/userdocs/LSP8CompatibleERC721InitAbstract.json +3 -0
- package/userdocs/LSP8CompatibleERC721Mintable.json +3 -0
- package/userdocs/LSP8CompatibleERC721MintableInit.json +3 -0
- package/userdocs/LSP8IdentifiableDigitalAsset.json +3 -0
- package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +3 -0
- package/userdocs/LSP8Mintable.json +3 -0
- package/userdocs/LSP8MintableInit.json +3 -0
- package/userdocs/LSP9Vault.json +3 -3
- package/userdocs/LSP9VaultInit.json +3 -3
- package/userdocs/UniversalProfile.json +3 -3
- package/userdocs/UniversalProfileInit.json +3 -3
- package/CONTRIBUTING.md +0 -188
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/lsp-smart-contracts",
|
|
3
|
-
"version": "0.12.0
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "The reference implementation for universal profiles smart contracts",
|
|
5
5
|
"directories": {
|
|
6
6
|
"test": "test"
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"build:docs": "hardhat dodoc && ts-node scripts/interfaceIds.ts && prettier -w ./docs",
|
|
78
78
|
"build:js": "vite build && dts-bundle-generator --config dtsconfig.json",
|
|
79
79
|
"package": "hardhat prepare-package",
|
|
80
|
-
"release": "run-s clean build package && standard-version",
|
|
81
80
|
"remixd": "remixd -s . --remix-ide",
|
|
82
81
|
"lint": "eslint . --ext .ts,.js",
|
|
83
82
|
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",
|
|
@@ -141,7 +140,6 @@
|
|
|
141
140
|
"prettier-plugin-solidity": "^1.1.3",
|
|
142
141
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
143
142
|
"solhint": "^3.6.2",
|
|
144
|
-
"standard-version": "^9.3.1",
|
|
145
143
|
"ts-node": "^10.2.0",
|
|
146
144
|
"typechain": "^8.0.0",
|
|
147
145
|
"typescript": "^4.9.5",
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
39
39
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
40
|
-
},
|
|
41
|
-
"ValueReceived(address,uint256)": {
|
|
42
|
-
"notice": "`value` native tokens received from `sender`."
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"kind": "user",
|
|
@@ -85,6 +82,9 @@
|
|
|
85
82
|
},
|
|
86
83
|
"universalReceiver(bytes32,bytes)": {
|
|
87
84
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
85
|
+
},
|
|
86
|
+
"version()": {
|
|
87
|
+
"notice": "Contract version."
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"version": 1
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
39
39
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
40
|
-
},
|
|
41
|
-
"ValueReceived(address,uint256)": {
|
|
42
|
-
"notice": "`value` native tokens received from `sender`."
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"kind": "user",
|
|
@@ -88,6 +85,9 @@
|
|
|
88
85
|
},
|
|
89
86
|
"universalReceiver(bytes32,bytes)": {
|
|
90
87
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
88
|
+
},
|
|
89
|
+
"version()": {
|
|
90
|
+
"notice": "Contract version."
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"setDataBatch(bytes32[],bytes[])": {
|
|
32
32
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
33
|
+
},
|
|
34
|
+
"version()": {
|
|
35
|
+
"notice": "Contract version."
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"setDataBatch(bytes32[],bytes[])": {
|
|
32
32
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
33
|
+
},
|
|
34
|
+
"version()": {
|
|
35
|
+
"notice": "Contract version."
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"setDataBatch(bytes32[],bytes[])": {
|
|
35
35
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
36
|
+
},
|
|
37
|
+
"version()": {
|
|
38
|
+
"notice": "Contract version."
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"version": 1
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"setDataBatch(bytes32[],bytes[])": {
|
|
29
29
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
30
|
+
},
|
|
31
|
+
"version()": {
|
|
32
|
+
"notice": "Contract version."
|
|
30
33
|
}
|
|
31
34
|
},
|
|
32
35
|
"version": 1
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"setDataBatch(bytes32[],bytes[])": {
|
|
26
26
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
27
|
+
},
|
|
28
|
+
"version()": {
|
|
29
|
+
"notice": "Contract version."
|
|
27
30
|
}
|
|
28
31
|
},
|
|
29
32
|
"version": 1
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"setDataBatch(bytes32[],bytes[])": {
|
|
32
32
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
33
|
+
},
|
|
34
|
+
"version()": {
|
|
35
|
+
"notice": "Contract version."
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"version": 1
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"setDataBatch(bytes32[],bytes[])": {
|
|
32
32
|
"notice": "Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`."
|
|
33
|
+
},
|
|
34
|
+
"version()": {
|
|
35
|
+
"notice": "Contract version."
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"version": 1
|
package/userdocs/LSP9Vault.json
CHANGED
|
@@ -42,9 +42,6 @@
|
|
|
42
42
|
},
|
|
43
43
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
44
44
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
45
|
-
},
|
|
46
|
-
"ValueReceived(address,uint256)": {
|
|
47
|
-
"notice": "`value` native tokens received from `sender`."
|
|
48
45
|
}
|
|
49
46
|
},
|
|
50
47
|
"kind": "user",
|
|
@@ -87,6 +84,9 @@
|
|
|
87
84
|
},
|
|
88
85
|
"universalReceiver(bytes32,bytes)": {
|
|
89
86
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
87
|
+
},
|
|
88
|
+
"version()": {
|
|
89
|
+
"notice": "Contract version."
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"version": 1
|
|
@@ -42,9 +42,6 @@
|
|
|
42
42
|
},
|
|
43
43
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
44
44
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
45
|
-
},
|
|
46
|
-
"ValueReceived(address,uint256)": {
|
|
47
|
-
"notice": "`value` native tokens received from `sender`."
|
|
48
45
|
}
|
|
49
46
|
},
|
|
50
47
|
"kind": "user",
|
|
@@ -87,6 +84,9 @@
|
|
|
87
84
|
},
|
|
88
85
|
"universalReceiver(bytes32,bytes)": {
|
|
89
86
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
87
|
+
},
|
|
88
|
+
"version()": {
|
|
89
|
+
"notice": "Contract version."
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"version": 1
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
39
39
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
40
|
-
},
|
|
41
|
-
"ValueReceived(address,uint256)": {
|
|
42
|
-
"notice": "`value` native tokens received from `sender`."
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"kind": "user",
|
|
@@ -85,6 +82,9 @@
|
|
|
85
82
|
},
|
|
86
83
|
"universalReceiver(bytes32,bytes)": {
|
|
87
84
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
85
|
+
},
|
|
86
|
+
"version()": {
|
|
87
|
+
"notice": "Contract version."
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"version": 1
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"UniversalReceiver(address,uint256,bytes32,bytes,bytes)": {
|
|
39
39
|
"notice": "Address `from` called the `universalReceiver(...)` function while sending `value` LYX. Notification type (typeId): `typeId` - Data received: `receivedData`."
|
|
40
|
-
},
|
|
41
|
-
"ValueReceived(address,uint256)": {
|
|
42
|
-
"notice": "`value` native tokens received from `sender`."
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"kind": "user",
|
|
@@ -88,6 +85,9 @@
|
|
|
88
85
|
},
|
|
89
86
|
"universalReceiver(bytes32,bytes)": {
|
|
90
87
|
"notice": "Notifying the contract by calling its `universalReceiver` function with the following informations: typeId: `typeId`; data: `data`."
|
|
88
|
+
},
|
|
89
|
+
"version()": {
|
|
90
|
+
"notice": "Contract version."
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"version": 1
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,188 +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
|
-
A good level of documentation is crucial for understanding the intended behaviour of the smart contracts and for identifying any potential discrepancies between the implementation and the intended behaviour.
|
|
58
|
-
|
|
59
|
-
When making contributions, each smart contracts and functions should be well-documented, with clear comments explaining the purpose and functionality of each function and module.
|
|
60
|
-
|
|
61
|
-
When changing or adding NatSpec comments to any `function`, `error` or `event` in any contract make sure to adhere to the following guidelines:
|
|
62
|
-
|
|
63
|
-
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.
|
|
64
|
-
|
|
65
|
-
E.g.:
|
|
66
|
-
|
|
67
|
-
```solidity
|
|
68
|
-
/**
|
|
69
|
-
* @dev Some description for starters.
|
|
70
|
-
* Continuing describing.
|
|
71
|
-
* It can span over multiple lines.
|
|
72
|
-
*/
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**or**
|
|
76
|
-
|
|
77
|
-
```solidity
|
|
78
|
-
/**
|
|
79
|
-
* @dev Some description for starters.
|
|
80
|
-
*
|
|
81
|
-
* - First bullet point.
|
|
82
|
-
* 1. First orderd element.
|
|
83
|
-
* 2. Second orderd element.
|
|
84
|
-
*
|
|
85
|
-
* - Second bullet point.
|
|
86
|
-
*/
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**or**
|
|
90
|
-
|
|
91
|
-
```solidity
|
|
92
|
-
/**
|
|
93
|
-
* @dev Some description for starters.
|
|
94
|
-
*
|
|
95
|
-
* 1. First bullet point.
|
|
96
|
-
* - First orderd element.
|
|
97
|
-
* - Second orderd element.
|
|
98
|
-
*
|
|
99
|
-
* 2. Second bullet point.
|
|
100
|
-
* - First orderd element.
|
|
101
|
-
* - Second orderd element.
|
|
102
|
-
*/
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**_not_**
|
|
106
|
-
|
|
107
|
-
```solidity
|
|
108
|
-
/**
|
|
109
|
-
* @dev Some description for starters.
|
|
110
|
-
*
|
|
111
|
-
* 1. First bullet point.
|
|
112
|
-
* - First orderd element.
|
|
113
|
-
* - Second orderd element.
|
|
114
|
-
*
|
|
115
|
-
* First description.
|
|
116
|
-
*
|
|
117
|
-
* 2. Second bullet point.
|
|
118
|
-
* - First orderd element.
|
|
119
|
-
* Second description.
|
|
120
|
-
* - Second orderd element.
|
|
121
|
-
*/
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
This formatting will result in the following output:
|
|
125
|
-
|
|
126
|
-
```md
|
|
127
|
-
Some description for starters.
|
|
128
|
-
|
|
129
|
-
1. First bullet point.
|
|
130
|
-
|
|
131
|
-
- First orderd element.
|
|
132
|
-
- Second orderd element. First description.
|
|
133
|
-
|
|
134
|
-
2. Second bullet point.
|
|
135
|
-
|
|
136
|
-
- First orderd element. Second description.
|
|
137
|
-
- Second orderd element.
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Which is is not the intended output.
|
|
141
|
-
|
|
142
|
-
2. `@param` tag is mandatory if the function, error or event has any parameters.
|
|
143
|
-
|
|
144
|
-
3. `@return` tag is mandatory if the function has any return value.
|
|
145
|
-
|
|
146
|
-
4. Make sure to use one of the custom tags below to document any additional informations of different kinds:
|
|
147
|
-
|
|
148
|
-
- Use `@custom:requirements` for all the requirements to use a function.
|
|
149
|
-
- Use `@custom:events` for all the emited events during the function execution.
|
|
150
|
-
- Use `@custom:warning` for any warnings someone must be aware of.
|
|
151
|
-
- Use `@custom:danger` for any dangers one needs to be aware when using the function.
|
|
152
|
-
- Use `@custom:hint` for any tips you might have for someone that wants to use the function.
|
|
153
|
-
- Use `@custom:info` for any extra information.
|
|
154
|
-
|
|
155
|
-
If there is only a single comment for the `@custom` tag, it can be written on the same line as the `@custom` tag.
|
|
156
|
-
If there is multiple comments for the `@custom` tag, it should span across multiple lines using `-` as bullet points.
|
|
157
|
-
|
|
158
|
-
E.g.:
|
|
159
|
-
|
|
160
|
-
```solidity
|
|
161
|
-
/**
|
|
162
|
-
* @custom:events {ValueReceived} event when someone tranfers native tokens to the contract.
|
|
163
|
-
*/
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**or**
|
|
167
|
-
|
|
168
|
-
```solidity
|
|
169
|
-
/**
|
|
170
|
-
* @custom:events
|
|
171
|
-
* - {ValueReceived} event when someone tranfers native tokens to the contract.
|
|
172
|
-
* - {Executes} event when the function is executed without any issues.
|
|
173
|
-
*/
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
5. If you want to add an internal link to a `function`, `error` or `event` defined the current contract, use `{}`.
|
|
177
|
-
E.g.: `{pendingOwner}`, `{pendingOwner()}` etc.
|
|
178
|
-
|
|
179
|
-
6. If you want to add an external link to anything, use `[]`.
|
|
180
|
-
E.g.: `[ERC725Y]`, `[EIP-1271]` etc.
|
|
181
|
-
|
|
182
|
-
To use this option, you should keeping mind to add the external links in the footer of the `.md` files as this:
|
|
183
|
-
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`
|
|
184
|
-
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)
|
|
185
|
-
|
|
186
|
-
## Adding contributors
|
|
187
|
-
|
|
188
|
-
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.
|