@lukso/lsp8-contracts 0.16.2 → 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 CHANGED
@@ -10,7 +10,9 @@ npm install @lukso/lsp8-contracts
10
10
 
11
11
  ## Available Constants & Types
12
12
 
13
- The `@lukso/lsp8-contracts` npm package contains useful constants such as interface IDs or ERC725Y data keys related to the LSP8 Standard. You can import and access them as follows:
13
+ The `@lukso/lsp8-contracts` npm package contains useful constants such as interface IDs or ERC725Y data keys related to the LSP8 Standard. You can import and access them as follows.
14
+
15
+ In Javascript.
14
16
 
15
17
  ```js
16
18
  import {
@@ -21,3 +23,48 @@ import {
21
23
  LSP8_TOKEN_ID_FORMAT,
22
24
  } from "@lukso/lsp8-contracts";
23
25
  ```
26
+
27
+ In Solidity.
28
+
29
+ <!-- prettier-ignore -->
30
+ ```solidity
31
+ import {
32
+ _INTERFACEID_LSP8,
33
+ _INTERFACEID_LSP8_V0_12_0,
34
+ _INTERFACEID_LSP8_V0_14_0,
35
+ _LSP8_TOKENID_FORMAT_KEY,
36
+ _LSP8_TOKEN_METADATA_BASE_URI,
37
+ _LSP8_REFERENCE_CONTRACT,
38
+ _TYPEID_LSP8_TOKENSSENDER,
39
+ _TYPEID_LSP8_TOKENSRECIPIENT,
40
+ _TYPEID_LSP8_TOKENOPERATOR,
41
+ _LSP8_TOKENID_FORMAT_NUMBER,
42
+ _LSP8_TOKENID_FORMAT_STRING,
43
+ _LSP8_TOKENID_FORMAT_ADDRESS,
44
+ _LSP8_TOKENID_FORMAT_UNIQUE_ID,
45
+ _LSP8_TOKENID_FORMAT_HASH,
46
+ _LSP8_TOKENID_FORMAT_MIXED_DEFAULT_NUMBER,
47
+ _LSP8_TOKENID_FORMAT_MIXED_DEFAULT_STRING,
48
+ _LSP8_TOKENID_FORMAT_MIXED_DEFAULT_ADDRESS,
49
+ _LSP8_TOKENID_FORMAT_MIXED_DEFAULT_UNIQUE_ID,
50
+ _LSP8_TOKENID_FORMAT_MIXED_DEFAULT_HASH
51
+ } from "@lukso/lsp8-contracts/contracts/LSP8Constants.sol";
52
+ ```
53
+
54
+ ## Typescript types
55
+
56
+ You can also import the [type-safe ABI](https://abitype.dev/) from the `/abi` path.
57
+
58
+ ```ts
59
+ import {
60
+ // standard version
61
+ lsp8IdentifiableDigitalAssetAbi,
62
+ lsp8CappedSupplyAbi,
63
+ lsp8MintableAbi,
64
+ lsp8VotesAbi
65
+ // proxy version
66
+ lsp8CappedSupplyInitAbstractAbi,
67
+ lsp8IdentifiableDigitalAssetInitAbstractAbi,
68
+ lsp8MintableInitAbi,
69
+ } from '@lukso/lsp8-contracts/abi';
70
+ ```