@lukso/lsp8-contracts 0.15.0-rc.4 → 0.15.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 +14 -0
- package/artifacts/LSP8Mintable.json +2 -2
- package/artifacts/LSP8MintableInit.json +2 -2
- package/compatibility-abis/LSP8IdentifiableDigitalAsset-v0.12.0.json +739 -748
- package/compatibility-abis/LSP8IdentifiableDigitalAsset-v0.13.0.json +890 -899
- package/compatibility-abis/LSP8IdentifiableDigitalAsset-v0.14.0.json +890 -899
- package/compatibility-abis/LSP8IdentifiableDigitalAsset.json +927 -0
- package/compatibility-abis/README.md +34 -0
- package/contracts/LSP8IdentifiableDigitalAssetCore.sol +5 -2
- package/dist/index.cjs +5 -0
- package/dist/index.d.cts +5 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +5 -5
@@ -2,8 +2,42 @@
|
|
2
2
|
|
3
3
|
This folder contains historical ABIs from previous release versions.
|
4
4
|
|
5
|
+
**🧬 Interface ID changes**
|
6
|
+
|
5
7
|
- `v0.14.0`: LSP8 interface ID was `0x3a271706`.
|
6
8
|
- `v0.13.0`: LSP8 interface ID was `0xecad9f75`.
|
7
9
|
- `v0.12.0`: LSP8 interface ID was `0x30dc5278`.
|
8
10
|
|
9
11
|
This is to enable dApps and projects to be backward compatible in their interfaces to display and interact with LSP8 token contracts deployed with these old versions, by consuming their old ABIs.
|
12
|
+
|
13
|
+
## List of ABI changes from `0.12.0` to `0.13.0`:
|
14
|
+
|
15
|
+
**Events**
|
16
|
+
|
17
|
+
- event `AuthorizedOperator` renamed to `OperatorAuthorizationChanged`
|
18
|
+
- event `RevokedOperator` renamed to `OperatorRevoked`
|
19
|
+
|
20
|
+
**Functions**
|
21
|
+
|
22
|
+
- new function `batchCalls(bytes[])`.
|
23
|
+
- new function `getTokenIdData(bytes32)`, `getTokenIdDataBatch(bytes32[])`, `setTokenIdData(bytes32,bytes)` and `setTokenIdDataBatch(bytes32[],bytes[])`.
|
24
|
+
- `version()` endpoint removed from `0.12.0`.
|
25
|
+
|
26
|
+
**Errors**
|
27
|
+
|
28
|
+
- new custom errors: `LSP4TokenTypeNotEditable()`, `LSP8BatchCallFailed(uint256)`, `LSP8TokenIdsDataEmptyArray()` and `LSP8TokenIdsDataLengthMismatch()`.
|
29
|
+
- custom error `LSP8TokenIdTypeNotEditable` renamed to `LSP8TokenIdSchemaNotEditable`
|
30
|
+
|
31
|
+
## List of ABI changes from `0.13.0` to `0.14.0`:
|
32
|
+
|
33
|
+
- custom error `LSP8TokenIdSchemaNotEditable` renamed to `LSP8TokenIdFormatNotEditable`.
|
34
|
+
- functions renamed as follow:
|
35
|
+
- `getTokenIdData(bytes32)` --> `getDataForTokenId(bytes32)`
|
36
|
+
- `getTokenIdDataBatch(bytes32[])` --> `getDataBatchForTokenId(bytes32[])`
|
37
|
+
- `setTokenIdData(bytes32,bytes)` --> `setDataForTokenId(bytes32,bytes)`
|
38
|
+
- `setTokenIdDataBatch(bytes32[],bytes[])` --> `setDataBatchForTokenId(bytes32[],bytes[])`
|
39
|
+
|
40
|
+
## List of ABI changes from `0.14.0` to `latest`:
|
41
|
+
|
42
|
+
- removed custom error `LSP8CannotSendToSelf()`.
|
43
|
+
- new custom errors `LSP8TokenOwnerChanged` and `LSP8RevokeOperatorNotAuthorized`.
|
@@ -80,6 +80,9 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
80
80
|
// Mapping a `tokenId` to its authorized operator addresses.
|
81
81
|
mapping(bytes32 => EnumerableSet.AddressSet) internal _operators;
|
82
82
|
|
83
|
+
// Mapping from `tokenId` to `dataKey` to `dataValue`
|
84
|
+
mapping(bytes32 => mapping(bytes32 => bytes)) internal _tokenIdData;
|
85
|
+
|
83
86
|
// --- Token queries
|
84
87
|
|
85
88
|
/**
|
@@ -683,7 +686,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
683
686
|
bytes32 dataKey,
|
684
687
|
bytes memory dataValue
|
685
688
|
) internal virtual {
|
686
|
-
|
689
|
+
_tokenIdData[tokenId][dataKey] = dataValue;
|
687
690
|
emit TokenIdDataChanged(tokenId, dataKey, dataValue);
|
688
691
|
}
|
689
692
|
|
@@ -698,7 +701,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
698
701
|
bytes32 tokenId,
|
699
702
|
bytes32 dataKey
|
700
703
|
) internal view virtual returns (bytes memory dataValues) {
|
701
|
-
return
|
704
|
+
return _tokenIdData[tokenId][dataKey];
|
702
705
|
}
|
703
706
|
|
704
707
|
/**
|
package/dist/index.cjs
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const INTERFACE_ID_LSP8 = "0x3a271706";
|
4
|
+
const INTERFACE_ID_LSP8_PREVIOUS = {
|
5
|
+
"v0.14.0": "0xecad9f75",
|
6
|
+
"v0.12.0": "0x30dc5278"
|
7
|
+
};
|
4
8
|
const LSP8DataKeys = {
|
5
9
|
LSP8TokenIdFormat: "0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d",
|
6
10
|
LSP8TokenMetadataBaseURI: "0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843",
|
@@ -28,6 +32,7 @@ const LSP8_TOKEN_ID_FORMAT = {
|
|
28
32
|
};
|
29
33
|
|
30
34
|
exports.INTERFACE_ID_LSP8 = INTERFACE_ID_LSP8;
|
35
|
+
exports.INTERFACE_ID_LSP8_PREVIOUS = INTERFACE_ID_LSP8_PREVIOUS;
|
31
36
|
exports.LSP8DataKeys = LSP8DataKeys;
|
32
37
|
exports.LSP8_TOKEN_ID_FORMAT = LSP8_TOKEN_ID_FORMAT;
|
33
38
|
exports.LSP8_TYPE_IDS = LSP8_TYPE_IDS;
|
package/dist/index.d.cts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
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
|
+
};
|
2
6
|
declare const LSP8DataKeys: {
|
3
7
|
LSP8TokenIdFormat: string;
|
4
8
|
LSP8TokenMetadataBaseURI: string;
|
@@ -26,4 +30,4 @@ declare const LSP8_TOKEN_ID_FORMAT: {
|
|
26
30
|
MIXED_DEFAULT_HASH: number;
|
27
31
|
};
|
28
32
|
|
29
|
-
export { INTERFACE_ID_LSP8, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
33
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
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
|
+
};
|
2
6
|
declare const LSP8DataKeys: {
|
3
7
|
LSP8TokenIdFormat: string;
|
4
8
|
LSP8TokenMetadataBaseURI: string;
|
@@ -26,4 +30,4 @@ declare const LSP8_TOKEN_ID_FORMAT: {
|
|
26
30
|
MIXED_DEFAULT_HASH: number;
|
27
31
|
};
|
28
32
|
|
29
|
-
export { INTERFACE_ID_LSP8, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
33
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
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
|
+
};
|
2
6
|
declare const LSP8DataKeys: {
|
3
7
|
LSP8TokenIdFormat: string;
|
4
8
|
LSP8TokenMetadataBaseURI: string;
|
@@ -26,4 +30,4 @@ declare const LSP8_TOKEN_ID_FORMAT: {
|
|
26
30
|
MIXED_DEFAULT_HASH: number;
|
27
31
|
};
|
28
32
|
|
29
|
-
export { INTERFACE_ID_LSP8, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
33
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
package/dist/index.mjs
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
const INTERFACE_ID_LSP8 = "0x3a271706";
|
2
|
+
const INTERFACE_ID_LSP8_PREVIOUS = {
|
3
|
+
"v0.14.0": "0xecad9f75",
|
4
|
+
"v0.12.0": "0x30dc5278"
|
5
|
+
};
|
2
6
|
const LSP8DataKeys = {
|
3
7
|
LSP8TokenIdFormat: "0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d",
|
4
8
|
LSP8TokenMetadataBaseURI: "0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843",
|
@@ -25,4 +29,4 @@ const LSP8_TOKEN_ID_FORMAT = {
|
|
25
29
|
MIXED_DEFAULT_HASH: 104
|
26
30
|
};
|
27
31
|
|
28
|
-
export { INTERFACE_ID_LSP8, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
32
|
+
export { INTERFACE_ID_LSP8, INTERFACE_ID_LSP8_PREVIOUS, LSP8DataKeys, LSP8_TOKEN_ID_FORMAT, LSP8_TYPE_IDS };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lukso/lsp8-contracts",
|
3
|
-
"version": "0.15.0
|
3
|
+
"version": "0.15.0",
|
4
4
|
"description": "Package for the LSP8 Identifiable Digital Asset standard",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "",
|
@@ -49,9 +49,9 @@
|
|
49
49
|
"dependencies": {
|
50
50
|
"@erc725/smart-contracts": "^7.0.0",
|
51
51
|
"@openzeppelin/contracts": "^4.9.3",
|
52
|
-
"@lukso/lsp1-contracts": "~0.15.0
|
53
|
-
"@lukso/lsp2-contracts": "~0.15.0
|
54
|
-
"@lukso/lsp4-contracts": "~0.15.0
|
55
|
-
"@lukso/lsp17contractextension-contracts": "~0.15.0
|
52
|
+
"@lukso/lsp1-contracts": "~0.15.0",
|
53
|
+
"@lukso/lsp2-contracts": "~0.15.0",
|
54
|
+
"@lukso/lsp4-contracts": "~0.15.0",
|
55
|
+
"@lukso/lsp17contractextension-contracts": "~0.15.0"
|
56
56
|
}
|
57
57
|
}
|