Skip to content

Commit

Permalink
docs: fix + document syntax to import Solidity constants
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Feb 5, 2025
1 parent 7ec72e7 commit 71361a8
Show file tree
Hide file tree
Showing 20 changed files with 263 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/lsp-smart-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm install @lukso/lsp-smart-contracts

## Available Constants & Types

The `@lukso/lsp-smart-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP Standards. You can import and access them as follows:
The `@lukso/lsp-smart-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP Standards. You can import and access them as follows.

```js
import {
Expand Down
20 changes: 19 additions & 1 deletion packages/lsp0-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm install @lukso/lsp0-contracts

## Available Constants & Types

The `@lukso/lsp0-contracts` npm package contains useful constants such as InterfaceIds, and ERC725Y Data Keys related to the LSP0 Standard. You can import and access them as follow:
The `@lukso/lsp0-contracts` npm package contains useful constants such as interface Ids, and ERC725Y data keys related to the LSP0 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -20,3 +22,19 @@ import {
ERC1271_VALUES,
} from "@lukso/lsp0-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP0,
_INTERFACEID_ERC1271,
_ERC1271_SUCCESSVALUE,
_ERC1271_FAILVALUE,
_TYPEID_LSP0_VALUE_RECEIVED,
_TYPEID_LSP0_OwnershipTransferStarted,
_TYPEID_LSP0_OwnershipTransferred_SenderNotification,
_TYPEID_LSP0_OwnershipTransferred_RecipientNotification
} from "@lukso/lsp0-contracts/contracts/LSP0Constants.soll";
```
16 changes: 15 additions & 1 deletion packages/lsp1-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ npm install @lukso/lsp1-contracts

## Available Constants & Types

The `@lukso/lsp1-contracts` npm package contains useful constants such as InterfaceIds, and ERC725Y Data Keys related to the LSP1 Standard. You can import and access them as follow:
The `@lukso/lsp1-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP1 Standard. You can import and access them as follows.

In Javascript.

```js
import { INTERFACE_ID_LSP1, LSP1DataKeys } from "@lukso/lsp1-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP1,
_INTERFACEID_LSP1_DELEGATE,
_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX,
_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY
} from "@lukso/lsp1-contracts/contracts/LSP1Constants.sol";
```
14 changes: 13 additions & 1 deletion packages/lsp11-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ npm install @lukso/lsp11-contracts

## Available Constants & Types

The `@lukso/lsp11-contracts` npm package contains useful constants such as interface ID related to the LSP11 standard. You can import and access them as follows:
The `@lukso/lsp11-contracts` npm package contains useful constants such as interface ID related to the LSP11 standard. You can import and access them as follows.

In Javascript.

```js
import { INTERFACE_ID_LSP11 } from "@lukso/lsp11-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP11,
LSP11_VERSION
} from "@lukso/lsp11-contracts/contracts/LSP11Constants.sol";
```
14 changes: 13 additions & 1 deletion packages/lsp12-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ npm install @lukso/lsp12-contracts

## Available Constants & Types

The `@lukso/lsp12-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP12 Standard. You can import and access them as follow:
The `@lukso/lsp12-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP12 Standard. You can import and access them as follows.

In Javascript.

```js
import { LSP12DataKeys } from "@lukso/lsp12-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_LSP12_ISSUED_ASSETS_ARRAY_KEY,
_LSP12_ISSUED_ASSETS_MAP_KEY_PREFIX
} from "@lukso/lsp12-contracts/contracts/LSP12Constants.sol";
```
16 changes: 15 additions & 1 deletion packages/lsp14-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ npm install @lukso/lsp14-contracts

## Available Constants & Types

The `@lukso/lsp14-contracts` npm package contains useful constants such as InterfaceIds, and ERC725Y Data Keys related to the LSP14 Standard. You can import and access them as follow:
The `@lukso/lsp14-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP14 Standard. You can import and access them as follows.

In Javascript.

```js
import { LSP14_TYPE_IDS, INTERFACE_ID_LSP14 } from "@lukso/lsp14-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP14,
_TYPEID_LSP14_OwnershipTransferStarted,
_TYPEID_LSP14_OwnershipTransferred_SenderNotification,
_TYPEID_LSP14_OwnershipTransferred_RecipientNotification
} from "@lukso/lsp14-contracts/contracts/LSP14Constants.sol";
```
2 changes: 1 addition & 1 deletion packages/lsp17-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm install @lukso/lsp17-contracts

## Available Constants & Types

The `@lukso/lsp17-contracts` npm package contains useful constants such as interface IDs related to the LSP17 Extensions. You can import and access them as follows:
The `@lukso/lsp17-contracts` npm package contains useful constants such as interface IDs related to the LSP17 Extensions. You can import and access them as follows.

```js
import { INTERFACE_ID_LSP17Extension } from "@lukso/lsp17-contracts";
Expand Down
15 changes: 14 additions & 1 deletion packages/lsp17contractextension-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm install @lukso/lsp17contractextension-contracts

## Available Constants & Types

The `@lukso/lsp17contractextension-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP17 Standard. You can import and access them as follows:
The `@lukso/lsp17contractextension-contracts` npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP17 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -19,3 +21,14 @@ import {
LSP17DataKeys,
} from "@lukso/lsp17contractextension-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP17_EXTENDABLE,
_INTERFACEID_LSP17_EXTENSION,
_LSP17_EXTENSION_PREFIX
} from "@lukso/lsp17-contracts/contracts/LSP17Constants.sol";
```
15 changes: 14 additions & 1 deletion packages/lsp2-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ npm install @lukso/lsp2-contracts

## Available Constants & Types

The `@lukso/lsp2-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP2 Standard. You can import and access them as follow:
The `@lukso/lsp2-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP2 Standard. You can import and access them as follows.

In Javascript.

```js
import { LSP2ArrayKey, Verification } from "@lukso/lsp2-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_KECCAK256_UTF8,
_KECCAK256_BYTES,
_KECCAK256_ECDSA
} from "@lukso/lsp2-contracts/contracts/LSP2Constants.sol";
```
17 changes: 16 additions & 1 deletion packages/lsp20-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm i @lukso/lsp20-contracts

## Available Constants & Types

The `@lukso/lsp20-contracts` npm package contains useful constants such as InterfaceIds, and specific constants related to the LSP20 Standard. You can import and access them as follow:
The `@lukso/lsp20-contracts` npm package contains useful constants such as interface IDs, and specific constants related to the LSP20 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -19,3 +21,16 @@ import {
INTERFACE_ID_LSP20CallVerification,
} from "@lukso/lsp20-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP20_CALL_VERIFICATION,
_INTERFACEID_LSP20_CALL_VERIFIER,
_LSP20_VERIFY_CALL_SUCCESS_VALUE_WITH_POST_VERIFICATION,
_LSP20_VERIFY_CALL_SUCCESS_VALUE_WITHOUT_POST_VERIFICATION,
_LSP20_VERIFY_CALL_RESULT_SUCCESS_VALUE
} from "@lukso/lsp20-contracts/contracts/LSP20Constants.sol";
```
14 changes: 13 additions & 1 deletion packages/lsp25-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ npm i @lukso/lsp25-contracts

## Available Constants & Types

The `@lukso/lsp25-contracts` npm package contains useful constants such as InterfaceIds, and specific constants related to the LSP25 Standard. You can import and access them as follow:
The `@lukso/lsp25-contracts` npm package contains useful constants such as interface IDs, and specific constants related to the LSP25 Standard. You can import and access them as follows.

In Javascript.

```js
import { LSP25_VERSION, INTERFACE_ID_LSP25 } from "@lukso/lsp25-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP25,
LSP25_VERSION
} from "@lukso/lsp25-contracts/contracts/LSP25Constants.sol";
```
15 changes: 14 additions & 1 deletion packages/lsp26-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ npm i @lukso/lsp26-contracts

## Available Constants & Types

The `@lukso/lsp26-contracts` npm package contains useful constants such as interface IDs, and specific constants related to the LSP26 Standard. You can import and access them as follows:
The `@lukso/lsp26-contracts` npm package contains useful constants such as interface IDs, and specific constants related to the LSP26 Standard. You can import and access them as follows.

In Javascript.

```js
import { INTERFACE_ID_LSP26, LSP26_TYPE_IDS } from "@lukso/lsp26-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_LSP26,
_TYPEID_LSP26_FOLLOW,
_TYPEID_LSP26_UNFOLLOW
} from "@lukso/lsp26-contracts/contracts/LSP26Constants.sol";
```
15 changes: 14 additions & 1 deletion packages/lsp3-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm install @lukso/lsp3-contracts

## Available Constants & Types

The `@lukso/lsp3-contracts` npm package contains useful constants such as ERC725Y data keys related to the LSP3 Standard. You can import and access them as follows:
The `@lukso/lsp3-contracts` npm package contains useful constants such as ERC725Y data keys related to the LSP3 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -23,3 +25,14 @@ import {
AssetMetadata,
} from "@lukso/lsp3-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_LSP3_SUPPORTED_STANDARDS_KEY,
_LSP3_SUPPORTED_STANDARDS_VALUE,
_LSP3_PROFILE_KEY
} from "@lukso/lsp3-contracts/contracts/LSP3Constants.sol";
```
23 changes: 22 additions & 1 deletion packages/lsp4-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm install @lukso/lsp4-contracts

## Available Constants & Types

The `@lukso/lsp4-contracts` npm package contains useful constants such as ERC725Y data keys related to the LSP4 Standard. You can import and access them as follows:
The `@lukso/lsp4-contracts` npm package contains useful constants such as ERC725Y data keys related to the LSP4 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -25,3 +27,22 @@ import {
AttributeMetadata,
} from "@lukso/lsp4-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_LSP4_TOKEN_TYPE_TOKEN,
_LSP4_TOKEN_TYPE_NFT,
_LSP4_TOKEN_TYPE_COLLECTION,
_LSP4_SUPPORTED_STANDARDS_KEY,
_LSP4_SUPPORTED_STANDARDS_VALUE,
_LSP4_TOKEN_NAME_KEY,
_LSP4_TOKEN_SYMBOL_KEY,
_LSP4_TOKEN_TYPE_KEY,
_LSP4_CREATORS_ARRAY_KEY,
_LSP4_CREATORS_MAP_KEY_PREFIX,
_LSP4_METADATA_KEY
} from "@lukso/lsp4-contracts/contracts/LSP4Constants.sol";
```
14 changes: 13 additions & 1 deletion packages/lsp5-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ npm install @lukso/lsp5-contracts

## Available Constants & Types

The `@lukso/lsp5-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP5 Standard. You can import and access them as follow:
The `@lukso/lsp5-contracts` npm package contains useful constants such as ERC725Y Data Keys related to the LSP5 Standard. You can import and access them as follows.

In Javascript.

```js
import { LSP5DataKeys } from "@lukso/lsp5-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_LSP5_RECEIVED_ASSETS_ARRAY_KEY,
_LSP5_RECEIVED_ASSETS_MAP_KEY_PREFIX
} from "@lukso/lsp5-contracts/contracts/LSP5Constants.sol";
```
15 changes: 14 additions & 1 deletion packages/lsp6-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ npm install @lukso/lsp6-contracts

## Available Constants & Types

The `@lukso/lsp6-contracts` npm package contains useful constants such as InterfaceIds or ERC725Y Data Keys related to the LSP6 Standard. You can import and access them as follow:
The `@lukso/lsp6-contracts` npm package contains useful constants such as interface IDs or ERC725Y Data Keys related to the LSP6 Standard. You can import and access them as follows.

In Javascript.

```js
import {
Expand All @@ -23,3 +25,14 @@ import {
LSP6PermissionName,
} from "@lukso/lsp6-contracts";
```

In Solidity.

<!-- prettier-ignore -->
```solidity
import {
_INTERFACEID_ERC1271,
_ERC1271_SUCCESSVALUE,
_ERC1271_FAILVALUE
} from "@lukso/lsp6-contracts/contracts/constants.sol";
```
Loading

0 comments on commit 71361a8

Please sign in to comment.