@lukso/lsp8-contracts 0.15.0 → 0.16.3
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 +49 -2
- package/contracts/ILSP8IdentifiableDigitalAsset.sol +2 -8
- package/contracts/LSP8Constants.sol +4 -0
- package/contracts/LSP8IdentifiableDigitalAsset.sol +796 -36
- package/contracts/LSP8IdentifiableDigitalAssetInitAbstract.sol +806 -36
- package/contracts/extensions/LSP8CappedSupply.sol +1 -1
- package/contracts/extensions/LSP8CappedSupplyInitAbstract.sol +1 -1
- package/contracts/extensions/LSP8Enumerable.sol +6 -5
- package/contracts/extensions/LSP8EnumerableInitAbstract.sol +5 -5
- package/contracts/extensions/LSP8Votes.sol +94 -0
- package/contracts/extensions/LSP8VotesConstants.sol +8 -0
- package/contracts/extensions/LSP8VotesInitAbstract.sol +116 -0
- package/dist/abi.cjs +6432 -0
- package/dist/abi.d.cts +9539 -0
- package/dist/abi.d.mts +9539 -0
- package/dist/abi.d.ts +9539 -0
- package/dist/abi.mjs +6418 -0
- package/dist/{index.cjs → constants.cjs} +5 -1
- package/dist/constants.d.cts +35 -0
- package/dist/constants.d.mts +35 -0
- package/dist/constants.d.ts +35 -0
- package/dist/{index.mjs → constants.mjs} +5 -1
- package/package.json +36 -29
- package/artifacts/ILSP8IdentifiableDigitalAsset.json +0 -602
- package/artifacts/LSP8Burnable.json +0 -954
- package/artifacts/LSP8BurnableInitAbstract.json +0 -967
- package/artifacts/LSP8CappedSupply.json +0 -959
- package/artifacts/LSP8CappedSupplyInitAbstract.json +0 -972
- package/artifacts/LSP8Enumerable.json +0 -955
- package/artifacts/LSP8EnumerableInitAbstract.json +0 -968
- package/artifacts/LSP8IdentifiableDigitalAsset.json +0 -936
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +0 -949
- package/artifacts/LSP8Mintable.json +0 -1006
- package/artifacts/LSP8MintableInit.json +0 -1026
- package/contracts/LSP8IdentifiableDigitalAssetCore.sol +0 -809
- package/dist/index.d.cts +0 -33
- package/dist/index.d.mts +0 -33
- package/dist/index.d.ts +0 -33
- package/types/common.ts +0 -131
- package/types/contracts/ILSP8IdentifiableDigitalAsset.ts +0 -706
- package/types/contracts/LSP8IdentifiableDigitalAsset.ts +0 -778
- package/types/contracts/LSP8IdentifiableDigitalAssetInitAbstract.ts +0 -813
- package/types/contracts/extensions/LSP8Burnable.ts +0 -797
- package/types/contracts/extensions/LSP8BurnableInitAbstract.ts +0 -829
- package/types/contracts/extensions/LSP8CappedSupply.ts +0 -792
- package/types/contracts/extensions/LSP8CappedSupplyInitAbstract.ts +0 -824
- package/types/contracts/extensions/LSP8Enumerable.ts +0 -790
- package/types/contracts/extensions/LSP8EnumerableInitAbstract.ts +0 -821
- package/types/contracts/presets/LSP8Mintable.ts +0 -797
- package/types/contracts/presets/LSP8MintableInit.ts +0 -860
- package/types/index.ts +0 -9738
@@ -16,7 +16,11 @@ const LSP8_TYPE_IDS = {
|
|
16
16
|
// keccak256('LSP8Tokens_RecipientNotification')
|
17
17
|
LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d",
|
18
18
|
// keccak256('LSP8Tokens_OperatorNotification')
|
19
|
-
LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970"
|
19
|
+
LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970",
|
20
|
+
// keccak256('LSP8Tokens_VotesDelegateeNotification')
|
21
|
+
LSP8Tokens_VotesDelegateeNotification: "0x19419598f788eae88574bbb83ec563ad0cb43cd7ddbbc88857b2efa2d8faa8eb",
|
22
|
+
// keccak256('LSP8Tokens_VotesDelegatorNotification')
|
23
|
+
LSP8Tokens_VotesDelegatorNotification: "0x2f6d3f668c2e57dbae4c255f2d9e0b69d47a8848d69a2251cce137529e34743e"
|
20
24
|
};
|
21
25
|
const LSP8_TOKEN_ID_FORMAT = {
|
22
26
|
NUMBER: 0,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
declare const INTERFACE_ID_LSP8 = "0x3a271706";
|
2
|
+
declare const INTERFACE_ID_LSP8_PREVIOUS: {
|
3
|
+
'v0.14.0': string;
|
4
|
+
'v0.12.0': string;
|
5
|
+
};
|
6
|
+
declare const LSP8DataKeys: {
|
7
|
+
readonly LSP8TokenIdFormat: "0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d";
|
8
|
+
readonly LSP8TokenMetadataBaseURI: "0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843";
|
9
|
+
readonly LSP8ReferenceContract: "0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6";
|
10
|
+
};
|
11
|
+
declare const LSP8_TYPE_IDS: {
|
12
|
+
readonly LSP8Tokens_SenderNotification: "0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00";
|
13
|
+
readonly LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d";
|
14
|
+
readonly LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970";
|
15
|
+
readonly LSP8Tokens_VotesDelegateeNotification: "0x19419598f788eae88574bbb83ec563ad0cb43cd7ddbbc88857b2efa2d8faa8eb";
|
16
|
+
readonly LSP8Tokens_VotesDelegatorNotification: "0x2f6d3f668c2e57dbae4c255f2d9e0b69d47a8848d69a2251cce137529e34743e";
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* @dev List of LSP8 Token ID Formats that can be used to create different types of NFTs and represent each NFT identifiers (= tokenIds) differently.
|
20
|
+
* @see For details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformat
|
21
|
+
*/
|
22
|
+
declare const LSP8_TOKEN_ID_FORMAT: {
|
23
|
+
readonly NUMBER: 0;
|
24
|
+
readonly STRING: 1;
|
25
|
+
readonly ADDRESS: 2;
|
26
|
+
readonly UNIQUE_ID: 3;
|
27
|
+
readonly HASH: 4;
|
28
|
+
readonly MIXED_DEFAULT_NUMBER: 100;
|
29
|
+
readonly MIXED_DEFAULT_STRING: 101;
|
30
|
+
readonly MIXED_DEFAULT_ADDRESS: 102;
|
31
|
+
readonly MIXED_DEFAULT_UNIQUE_ID: 103;
|
32
|
+
readonly MIXED_DEFAULT_HASH: 104;
|
33
|
+
};
|
34
|
+
|
35
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
@@ -0,0 +1,35 @@
|
|
1
|
+
declare const INTERFACE_ID_LSP8 = "0x3a271706";
|
2
|
+
declare const INTERFACE_ID_LSP8_PREVIOUS: {
|
3
|
+
'v0.14.0': string;
|
4
|
+
'v0.12.0': string;
|
5
|
+
};
|
6
|
+
declare const LSP8DataKeys: {
|
7
|
+
readonly LSP8TokenIdFormat: "0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d";
|
8
|
+
readonly LSP8TokenMetadataBaseURI: "0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843";
|
9
|
+
readonly LSP8ReferenceContract: "0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6";
|
10
|
+
};
|
11
|
+
declare const LSP8_TYPE_IDS: {
|
12
|
+
readonly LSP8Tokens_SenderNotification: "0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00";
|
13
|
+
readonly LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d";
|
14
|
+
readonly LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970";
|
15
|
+
readonly LSP8Tokens_VotesDelegateeNotification: "0x19419598f788eae88574bbb83ec563ad0cb43cd7ddbbc88857b2efa2d8faa8eb";
|
16
|
+
readonly LSP8Tokens_VotesDelegatorNotification: "0x2f6d3f668c2e57dbae4c255f2d9e0b69d47a8848d69a2251cce137529e34743e";
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* @dev List of LSP8 Token ID Formats that can be used to create different types of NFTs and represent each NFT identifiers (= tokenIds) differently.
|
20
|
+
* @see For details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformat
|
21
|
+
*/
|
22
|
+
declare const LSP8_TOKEN_ID_FORMAT: {
|
23
|
+
readonly NUMBER: 0;
|
24
|
+
readonly STRING: 1;
|
25
|
+
readonly ADDRESS: 2;
|
26
|
+
readonly UNIQUE_ID: 3;
|
27
|
+
readonly HASH: 4;
|
28
|
+
readonly MIXED_DEFAULT_NUMBER: 100;
|
29
|
+
readonly MIXED_DEFAULT_STRING: 101;
|
30
|
+
readonly MIXED_DEFAULT_ADDRESS: 102;
|
31
|
+
readonly MIXED_DEFAULT_UNIQUE_ID: 103;
|
32
|
+
readonly MIXED_DEFAULT_HASH: 104;
|
33
|
+
};
|
34
|
+
|
35
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
@@ -0,0 +1,35 @@
|
|
1
|
+
declare const INTERFACE_ID_LSP8 = "0x3a271706";
|
2
|
+
declare const INTERFACE_ID_LSP8_PREVIOUS: {
|
3
|
+
'v0.14.0': string;
|
4
|
+
'v0.12.0': string;
|
5
|
+
};
|
6
|
+
declare const LSP8DataKeys: {
|
7
|
+
readonly LSP8TokenIdFormat: "0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d";
|
8
|
+
readonly LSP8TokenMetadataBaseURI: "0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843";
|
9
|
+
readonly LSP8ReferenceContract: "0x708e7b881795f2e6b6c2752108c177ec89248458de3bf69d0d43480b3e5034e6";
|
10
|
+
};
|
11
|
+
declare const LSP8_TYPE_IDS: {
|
12
|
+
readonly LSP8Tokens_SenderNotification: "0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00";
|
13
|
+
readonly LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d";
|
14
|
+
readonly LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970";
|
15
|
+
readonly LSP8Tokens_VotesDelegateeNotification: "0x19419598f788eae88574bbb83ec563ad0cb43cd7ddbbc88857b2efa2d8faa8eb";
|
16
|
+
readonly LSP8Tokens_VotesDelegatorNotification: "0x2f6d3f668c2e57dbae4c255f2d9e0b69d47a8848d69a2251cce137529e34743e";
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* @dev List of LSP8 Token ID Formats that can be used to create different types of NFTs and represent each NFT identifiers (= tokenIds) differently.
|
20
|
+
* @see For details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformat
|
21
|
+
*/
|
22
|
+
declare const LSP8_TOKEN_ID_FORMAT: {
|
23
|
+
readonly NUMBER: 0;
|
24
|
+
readonly STRING: 1;
|
25
|
+
readonly ADDRESS: 2;
|
26
|
+
readonly UNIQUE_ID: 3;
|
27
|
+
readonly HASH: 4;
|
28
|
+
readonly MIXED_DEFAULT_NUMBER: 100;
|
29
|
+
readonly MIXED_DEFAULT_STRING: 101;
|
30
|
+
readonly MIXED_DEFAULT_ADDRESS: 102;
|
31
|
+
readonly MIXED_DEFAULT_UNIQUE_ID: 103;
|
32
|
+
readonly MIXED_DEFAULT_HASH: 104;
|
33
|
+
};
|
34
|
+
|
35
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
@@ -14,7 +14,11 @@ const LSP8_TYPE_IDS = {
|
|
14
14
|
// keccak256('LSP8Tokens_RecipientNotification')
|
15
15
|
LSP8Tokens_RecipientNotification: "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d",
|
16
16
|
// keccak256('LSP8Tokens_OperatorNotification')
|
17
|
-
LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970"
|
17
|
+
LSP8Tokens_OperatorNotification: "0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970",
|
18
|
+
// keccak256('LSP8Tokens_VotesDelegateeNotification')
|
19
|
+
LSP8Tokens_VotesDelegateeNotification: "0x19419598f788eae88574bbb83ec563ad0cb43cd7ddbbc88857b2efa2d8faa8eb",
|
20
|
+
// keccak256('LSP8Tokens_VotesDelegatorNotification')
|
21
|
+
LSP8Tokens_VotesDelegatorNotification: "0x2f6d3f668c2e57dbae4c255f2d9e0b69d47a8848d69a2251cce137529e34743e"
|
18
22
|
};
|
19
23
|
const LSP8_TOKEN_ID_FORMAT = {
|
20
24
|
NUMBER: 0,
|
package/package.json
CHANGED
@@ -1,31 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lukso/lsp8-contracts",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.16.3",
|
4
4
|
"description": "Package for the LSP8 Identifiable Digital Asset standard",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "",
|
7
|
-
"main": "./dist/index.cjs",
|
8
|
-
"module": "./dist/index.mjs",
|
9
|
-
"typings": "./dist/index.d.ts",
|
10
|
-
"exports": {
|
11
|
-
".": {
|
12
|
-
"require": "./dist/index.cjs",
|
13
|
-
"import": "./dist/index.mjs",
|
14
|
-
"types": "./dist/index.d.ts"
|
15
|
-
},
|
16
|
-
"./artifacts/*": "./artifacts/*",
|
17
|
-
"./package.json": "./package.json"
|
18
|
-
},
|
19
|
-
"files": [
|
20
|
-
"contracts/**/*.sol",
|
21
|
-
"!contracts/Mocks/**/*.sol",
|
22
|
-
"artifacts/*.json",
|
23
|
-
"compatibility-abis",
|
24
|
-
"dist",
|
25
|
-
"types",
|
26
|
-
"!types/factories",
|
27
|
-
"./README.md"
|
28
|
-
],
|
29
7
|
"keywords": [
|
30
8
|
"LUKSO",
|
31
9
|
"LSP",
|
@@ -36,22 +14,51 @@
|
|
36
14
|
"EVM",
|
37
15
|
"Solidity"
|
38
16
|
],
|
17
|
+
"files": [
|
18
|
+
"contracts/**/*.sol",
|
19
|
+
"!contracts/Mocks/**/*.sol",
|
20
|
+
"artifacts/*.json",
|
21
|
+
"compatibility-abis",
|
22
|
+
"dist"
|
23
|
+
],
|
24
|
+
"main": "./dist/constants.cjs",
|
25
|
+
"module": "./dist/constants.mjs",
|
26
|
+
"typings": "./dist/constants.d.ts",
|
27
|
+
"exports": {
|
28
|
+
".": {
|
29
|
+
"require": "./dist/constants.cjs",
|
30
|
+
"import": "./dist/constants.mjs",
|
31
|
+
"types": "./dist/constants.d.ts"
|
32
|
+
},
|
33
|
+
"./constants": {
|
34
|
+
"require": "./dist/constants.cjs",
|
35
|
+
"import": "./dist/constants.mjs",
|
36
|
+
"types": "./dist/constants.d.ts"
|
37
|
+
},
|
38
|
+
"./abi": {
|
39
|
+
"require": "./dist/abi.cjs",
|
40
|
+
"import": "./dist/abi.mjs",
|
41
|
+
"types": "./dist/abi.d.ts"
|
42
|
+
},
|
43
|
+
"./artifacts/*": "./artifacts/*",
|
44
|
+
"./dist/*": "./dist/*",
|
45
|
+
"./package.json": "./package.json"
|
46
|
+
},
|
39
47
|
"scripts": {
|
40
48
|
"build": "hardhat compile --show-stack-traces",
|
41
49
|
"build:js": "unbuild",
|
42
50
|
"build:types": "npx wagmi generate",
|
43
|
-
"clean": "hardhat clean && rm -Rf dist/",
|
51
|
+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
|
44
52
|
"format": "prettier --write .",
|
45
53
|
"lint": "eslint . --ext .ts,.js",
|
46
54
|
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",
|
47
|
-
"package": "hardhat prepare-package"
|
55
|
+
"build:package": "hardhat prepare-package"
|
48
56
|
},
|
49
57
|
"dependencies": {
|
50
|
-
"@
|
51
|
-
"@openzeppelin/contracts": "^4.9.3",
|
58
|
+
"@openzeppelin/contracts": "^4.9.6",
|
52
59
|
"@lukso/lsp1-contracts": "~0.15.0",
|
53
60
|
"@lukso/lsp2-contracts": "~0.15.0",
|
54
|
-
"@lukso/lsp4-contracts": "~0.
|
55
|
-
"@lukso/lsp17contractextension-contracts": "~0.
|
61
|
+
"@lukso/lsp4-contracts": "~0.16.0",
|
62
|
+
"@lukso/lsp17contractextension-contracts": "~0.16.0"
|
56
63
|
}
|
57
64
|
}
|