Skip to content

Commit

Permalink
docs: generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
YamenMerhi committed Dec 5, 2023
1 parent 22a79cd commit a56a99f
Show file tree
Hide file tree
Showing 7 changed files with 508 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,50 +246,54 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys

<br/>

### getOperatorsOf
### getDataBatchForTokenIds

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Function signature: `getOperatorsOf(bytes32)`
- Function selector: `0x49a6078d`
- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
- Function selector: `0x1d26fce6`

:::

```solidity
function getOperatorsOf(bytes32 tokenId) external view returns (address[]);
function getDataBatchForTokenIds(
bytes32[] tokenIds,
bytes32[] dataKeys
) external view returns (bytes[] dataValues);
```

Returns all `operator` addresses that are allowed to transfer or burn a specific `tokenId` on behalf of its owner.
_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._

#### Parameters

| Name | Type | Description |
| --------- | :-------: | -------------------------------------- |
| `tokenId` | `bytes32` | The token ID to get the operators for. |
| Name | Type | Description |
| ---------- | :---------: | ----------- |
| `tokenIds` | `bytes32[]` | - |
| `dataKeys` | `bytes32[]` | - |

#### Returns

| Name | Type | Description |
| ---- | :---------: | ------------------------------------------------------------------------------------------------------------ |
| `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. |
| Name | Type | Description |
| ------------ | :-------: | ----------------------------------------------------------------- |
| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |

<br/>

### getTokenIdData
### getDataForTokenId

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#gettokeniddata)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Function signature: `getTokenIdData(bytes32,bytes32)`
- Function selector: `0xe7bb5942`
- Function signature: `getDataForTokenId(bytes32,bytes32)`
- Function selector: `0x16e023b3`

:::

```solidity
function getTokenIdData(
function getDataForTokenId(
bytes32 tokenId,
bytes32 dataKey
) external view returns (bytes dataValues);
Expand All @@ -312,38 +316,34 @@ _Retrieves data for a specific `tokenId` and `dataKey`._

<br/>

### getTokenIdDataBatch
### getOperatorsOf

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#gettokeniddatabatch)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Function signature: `getTokenIdDataBatch(bytes32[],bytes32[])`
- Function selector: `0xc797c777`
- Function signature: `getOperatorsOf(bytes32)`
- Function selector: `0x49a6078d`

:::

```solidity
function getTokenIdDataBatch(
bytes32[] tokenIds,
bytes32[] dataKeys
) external view returns (bytes[] dataValues);
function getOperatorsOf(bytes32 tokenId) external view returns (address[]);
```

_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
Returns all `operator` addresses that are allowed to transfer or burn a specific `tokenId` on behalf of its owner.

#### Parameters

| Name | Type | Description |
| ---------- | :---------: | ----------- |
| `tokenIds` | `bytes32[]` | - |
| `dataKeys` | `bytes32[]` | - |
| Name | Type | Description |
| --------- | :-------: | -------------------------------------- |
| `tokenId` | `bytes32` | The token ID to get the operators for. |

#### Returns

| Name | Type | Description |
| ------------ | :-------: | ----------------------------------------------------------------- |
| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
| Name | Type | Description |
| ---- | :---------: | ------------------------------------------------------------------------------------------------------------ |
| `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. |

<br/>

Expand Down Expand Up @@ -559,65 +559,65 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a

<br/>

### setTokenIdData
### setDataBatchForTokenIds

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#settokeniddata)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Function signature: `setTokenIdData(bytes32,bytes32,bytes)`
- Function selector: `0x3b38c1d7`
- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
- Function selector: `0xbe9f0e6f`

:::

```solidity
function setTokenIdData(
bytes32 tokenId,
bytes32 dataKey,
bytes dataValue
function setDataBatchForTokenIds(
bytes32[] tokenIds,
bytes32[] dataKeys,
bytes[] dataValues
) external nonpayable;
```

_Sets data for a specific `tokenId` and `dataKey`._
_Sets data in batch for multiple `tokenId` and `dataKey` pairs._

#### Parameters

| Name | Type | Description |
| ----------- | :-------: | ---------------------------------------- |
| `tokenId` | `bytes32` | The unique identifier for a token. |
| `dataKey` | `bytes32` | The key for the data to set. |
| `dataValue` | `bytes` | The value to set for the given data key. |
| Name | Type | Description |
| ------------ | :---------: | ----------- |
| `tokenIds` | `bytes32[]` | - |
| `dataKeys` | `bytes32[]` | - |
| `dataValues` | `bytes[]` | - |

<br/>

### setTokenIdDataBatch
### setDataForTokenId

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#settokeniddatabatch)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Function signature: `setTokenIdDataBatch(bytes32[],bytes32[],bytes[])`
- Function selector: `0xae0646d7`
- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
- Function selector: `0xd6c1407c`

:::

```solidity
function setTokenIdDataBatch(
bytes32[] tokenIds,
bytes32[] dataKeys,
bytes[] dataValues
function setDataForTokenId(
bytes32 tokenId,
bytes32 dataKey,
bytes dataValue
) external nonpayable;
```

_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
_Sets data for a specific `tokenId` and `dataKey`._

#### Parameters

| Name | Type | Description |
| ------------ | :---------: | ----------- |
| `tokenIds` | `bytes32[]` | - |
| `dataKeys` | `bytes32[]` | - |
| `dataValues` | `bytes[]` | - |
| Name | Type | Description |
| ----------- | :-------: | ---------------------------------------- |
| `tokenId` | `bytes32` | The unique identifier for a token. |
| `dataKey` | `bytes32` | The key for the data to set. |
| `dataValue` | `bytes` | The value to set for the given data key. |

<br/>

Expand Down Expand Up @@ -894,7 +894,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```

The ERC725Y data key `_LSP8_TOKENID_SCHEMA_KEY` cannot be changed
The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.

<br/>
Expand Down Expand Up @@ -1115,10 +1115,10 @@ all the parameters in the calldata packed encoded.

<br/>

### \_setTokenIdData
### \_setDataForTokenId

```solidity
function _setTokenIdData(
function _setDataForTokenId(
bytes32 tokenId,
bytes32 dataKey,
bytes dataValue
Expand Down Expand Up @@ -1146,10 +1146,10 @@ The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated

<br/>

### \_getTokenIdData
### \_getDataForTokenId

```solidity
function _getTokenIdData(
function _getDataForTokenId(
bytes32 tokenId,
bytes32 dataKey
) internal view returns (bytes dataValues);
Expand Down Expand Up @@ -1990,22 +1990,22 @@ Error occurs when sending native tokens to the LSP8 contract without sending any

<br/>

### LSP8TokenIdSchemaNotEditable
### LSP8TokenIdFormatNotEditable

:::note References

- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidschemanoteditable)
- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
- Error signature: `LSP8TokenIdSchemaNotEditable()`
- Error hash: `0xce0c7552`
- Error signature: `LSP8TokenIdFormatNotEditable()`
- Error hash: `0x3664800a`

:::

```solidity
error LSP8TokenIdSchemaNotEditable();
error LSP8TokenIdFormatNotEditable();
```

Reverts when trying to edit the data key `LSP8TokenIdSchema` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdSchema` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.

<br/>

Expand Down
Loading

0 comments on commit a56a99f

Please sign in to comment.