-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update auto-generated docs for LSP8 package
- Loading branch information
Showing
9 changed files
with
600 additions
and
2,546 deletions.
There are no files selected for viewing
2,283 changes: 0 additions & 2,283 deletions
2,283
docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md
This file was deleted.
Oops, something went wrong.
122 changes: 61 additions & 61 deletions
122
...italAsset/LSP8IdentifiableDigitalAsset.md → ...contracts/LSP8IdentifiableDigitalAsset.md
Large diffs are not rendered by default.
Oops, something went wrong.
124 changes: 62 additions & 62 deletions
124
...leDigitalAsset/extensions/LSP8Burnable.md → ...lsp8/contracts/extensions/LSP8Burnable.md
Large diffs are not rendered by default.
Oops, something went wrong.
128 changes: 64 additions & 64 deletions
128
...gitalAsset/extensions/LSP8CappedSupply.md → .../contracts/extensions/LSP8CappedSupply.md
Large diffs are not rendered by default.
Oops, something went wrong.
124 changes: 62 additions & 62 deletions
124
...DigitalAsset/extensions/LSP8Enumerable.md → ...p8/contracts/extensions/LSP8Enumerable.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<!-- This file is auto-generated. Do not edit! --> | ||
<!-- Check `@lukso-network/lsp-smart-contracts/CONTRIBUTING.md#solidity-code-comments` for more information. --> | ||
|
||
# LSP1Utils | ||
|
||
:::info Standard Specifications | ||
|
||
[`LSP-1-Utils.sol`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-1-Utils.sol.md) | ||
|
||
::: | ||
:::info Solidity implementation | ||
|
||
[`LSP1Utils.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp1/contracts/LSP1Utils.sol) | ||
|
||
::: | ||
|
||
> LSP1 Utility library. | ||
LSP1Utils is a library of utility functions that can be used to notify the `universalReceiver` function of a contract that implements LSP1 and retrieve informations related to LSP1 `typeId`. Based on LSP1 Universal Receiver standard. | ||
|
||
## Internal Methods | ||
|
||
Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. | ||
|
||
Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. | ||
|
||
### notifyUniversalReceiver | ||
|
||
```solidity | ||
function notifyUniversalReceiver( | ||
address lsp1Implementation, | ||
bytes32 typeId, | ||
bytes data | ||
) internal nonpayable; | ||
``` | ||
|
||
Notify a contract at `lsp1Implementation` address by calling its `universalReceiver` function if this contract | ||
supports the LSP1 interface. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| -------------------- | :-------: | -------------------------------------------------------------------------------------------------- | | ||
| `lsp1Implementation` | `address` | The address of the contract to notify. | | ||
| `typeId` | `bytes32` | A `bytes32` typeId. | | ||
| `data` | `bytes` | Any optional data to send to the `universalReceiver` function to the `lsp1Implementation` address. | | ||
|
||
<br/> | ||
|
||
### getLSP1DelegateValue | ||
|
||
```solidity | ||
function getLSP1DelegateValue( | ||
mapping(bytes32 => bytes) erc725YStorage | ||
) internal view returns (bytes); | ||
``` | ||
|
||
_Retrieving the value stored under the ERC725Y data key `LSP1UniversalReceiverDelegate`._ | ||
|
||
Query internally the ERC725Y storage of a `ERC725Y` smart contract to retrieve | ||
the value set under the `LSP1UniversalReceiverDelegate` data key. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ---------------- | :-------------------------: | ----------------------------------------------------------- | | ||
| `erc725YStorage` | `mapping(bytes32 => bytes)` | A reference to the ERC725Y storage mapping of the contract. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---- | :-----: | -------------------------------------------------------------------------- | | ||
| `0` | `bytes` | The bytes value stored under the `LSP1UniversalReceiverDelegate` data key. | | ||
|
||
<br/> | ||
|
||
### getLSP1DelegateValueForTypeId | ||
|
||
```solidity | ||
function getLSP1DelegateValueForTypeId( | ||
mapping(bytes32 => bytes) erc725YStorage, | ||
bytes32 typeId | ||
) internal view returns (bytes); | ||
``` | ||
|
||
_Retrieving the value stored under the ERC725Y data key `LSP1UniversalReceiverDelegate:<type-id>` for a specific `typeId`._ | ||
|
||
Query internally the ERC725Y storage of a `ERC725Y` smart contract to retrieve | ||
the value set under the `LSP1UniversalReceiverDelegate:<bytes32>` data key for a specific LSP1 `typeId`. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ---------------- | :-------------------------: | ----------------------------------------------------------- | | ||
| `erc725YStorage` | `mapping(bytes32 => bytes)` | A reference to the ERC725Y storage mapping of the contract. | | ||
| `typeId` | `bytes32` | A bytes32 LSP1 `typeId`; | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---- | :-----: | ------------------------------------------------------------------------------------ | | ||
| `0` | `bytes` | The bytes value stored under the `LSP1UniversalReceiverDelegate:<bytes32>` data key. | | ||
|
||
<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<!-- This file is auto-generated. Do not edit! --> | ||
<!-- Check `@lukso-network/lsp-smart-contracts/CONTRIBUTING.md#solidity-code-comments` for more information. --> | ||
|
||
# LSP10Utils | ||
|
||
:::info Standard Specifications | ||
|
||
[`LSP-10-Utils.sol`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-10-Utils.sol.md) | ||
|
||
::: | ||
:::info Solidity implementation | ||
|
||
[`LSP10Utils.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp10/contracts/LSP10Utils.sol) | ||
|
||
::: | ||
|
||
> LSP10 Utility library. | ||
LSP5Utils is a library of functions that can be used to register and manage vaults received by an ERC725Y smart contract. Based on the LSP10 Received Vaults standard. | ||
|
||
## Internal Methods | ||
|
||
Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. | ||
|
||
Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. | ||
|
||
### generateReceivedVaultKeys | ||
|
||
:::caution Warning | ||
|
||
This function returns empty arrays when encountering errors. Otherwise the arrays will contain 3 data keys and 3 data values. | ||
|
||
::: | ||
|
||
```solidity | ||
function generateReceivedVaultKeys( | ||
address receiver, | ||
address vaultAddress | ||
) internal view returns (bytes32[] lsp10DataKeys, bytes[] lsp10DataValues); | ||
``` | ||
|
||
Generate an array of data keys/values pairs to be set on the receiver address after receiving vaults. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| -------------- | :-------: | ------------------------------------------------------------------------------ | | ||
| `receiver` | `address` | The address receiving the vault and where the LSP10 data keys should be added. | | ||
| `vaultAddress` | `address` | The address of the vault being received. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ----------------- | :---------: | --------------------------------------------------------------------- | | ||
| `lsp10DataKeys` | `bytes32[]` | An array data keys used to update the [LSP-10-ReceivedAssets] data. | | ||
| `lsp10DataValues` | `bytes[]` | An array data values used to update the [LSP-10-ReceivedAssets] data. | | ||
|
||
<br/> | ||
|
||
### generateSentVaultKeys | ||
|
||
:::caution Warning | ||
|
||
Returns empty arrays when encountering errors. Otherwise the arrays must have at least 3 data keys and 3 data values. | ||
|
||
::: | ||
|
||
```solidity | ||
function generateSentVaultKeys( | ||
address sender, | ||
address vaultAddress | ||
) internal view returns (bytes32[] lsp10DataKeys, bytes[] lsp10DataValues); | ||
``` | ||
|
||
Generate an array of data key/value pairs to be set on the sender address after sending vaults. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| -------------- | :-------: | ------------------------------------------------------------------------------ | | ||
| `sender` | `address` | The address sending the vault and where the LSP10 data keys should be updated. | | ||
| `vaultAddress` | `address` | The address of the vault that is being sent. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ----------------- | :---------: | --------------------------------------------------------------------- | | ||
| `lsp10DataKeys` | `bytes32[]` | An array data keys used to update the [LSP-10-ReceivedAssets] data. | | ||
| `lsp10DataValues` | `bytes[]` | An array data values used to update the [LSP-10-ReceivedAssets] data. | | ||
|
||
<br/> | ||
|
||
### getLSP10ArrayLengthBytes | ||
|
||
```solidity | ||
function getLSP10ArrayLengthBytes(contract IERC725Y erc725YContract) internal view returns (bytes); | ||
``` | ||
|
||
Get the raw bytes value stored under the `_LSP10_VAULTS_ARRAY_KEY`. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ----------------- | :-----------------: | ----------------------------------------------- | | ||
| `erc725YContract` | `contract IERC725Y` | The contract to query the ERC725Y storage from. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---- | :-----: | ----------------------------------------------- | | ||
| `0` | `bytes` | The raw bytes value stored under this data key. | | ||
|
||
<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<!-- This file is auto-generated. Do not edit! --> | ||
<!-- Check `@lukso-network/lsp-smart-contracts/CONTRIBUTING.md#solidity-code-comments` for more information. --> | ||
|
||
# LSP5Utils | ||
|
||
:::info Standard Specifications | ||
|
||
[`LSP-5-Utils.sol`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-5-Utils.sol.md) | ||
|
||
::: | ||
:::info Solidity implementation | ||
|
||
[`LSP5Utils.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp5/contracts/LSP5Utils.sol) | ||
|
||
::: | ||
|
||
> LSP5 Utility library. | ||
LSP5Utils is a library of functions that can be used to register and manage assets under an ERC725Y smart contract. Based on the LSP5 Received Assets standard. | ||
|
||
## Internal Methods | ||
|
||
Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. | ||
|
||
Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. | ||
|
||
### generateReceivedAssetKeys | ||
|
||
:::caution Warning | ||
|
||
Returns empty arrays when encountering errors. Otherwise the arrays must have 3 data keys and 3 data values. | ||
|
||
::: | ||
|
||
```solidity | ||
function generateReceivedAssetKeys( | ||
address receiver, | ||
address assetAddress, | ||
bytes4 assetInterfaceId | ||
) internal view returns (bytes32[] lsp5DataKeys, bytes[] lsp5DataValues); | ||
``` | ||
|
||
Generate an array of data key/value pairs to be set on the receiver address after receiving assets. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ------------------ | :-------: | ----------------------------------------------------------------------------- | | ||
| `receiver` | `address` | The address receiving the asset and where the LSP5 data keys should be added. | | ||
| `assetAddress` | `address` | The address of the asset being received (_e.g: an LSP7 or LSP8 token_). | | ||
| `assetInterfaceId` | `bytes4` | The interfaceID of the asset being received. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---------------- | :---------: | -------------------------------------------------------------------- | | ||
| `lsp5DataKeys` | `bytes32[]` | An array Data Keys used to update the [LSP-5-ReceivedAssets] data. | | ||
| `lsp5DataValues` | `bytes[]` | An array Data Values used to update the [LSP-5-ReceivedAssets] data. | | ||
|
||
<br/> | ||
|
||
### generateSentAssetKeys | ||
|
||
:::caution Warning | ||
|
||
Returns empty arrays when encountering errors. Otherwise the arrays must have at least 3 data keys and 3 data values. | ||
|
||
::: | ||
|
||
```solidity | ||
function generateSentAssetKeys( | ||
address sender, | ||
address assetAddress | ||
) internal view returns (bytes32[] lsp5DataKeys, bytes[] lsp5DataValues); | ||
``` | ||
|
||
Generate an array of Data Key/Value pairs to be set on the sender address after sending assets. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| -------------- | :-------: | ----------------------------------------------------------------------------- | | ||
| `sender` | `address` | The address sending the asset and where the LSP5 data keys should be updated. | | ||
| `assetAddress` | `address` | The address of the asset that is being sent. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---------------- | :---------: | -------------------------------------------------------------------- | | ||
| `lsp5DataKeys` | `bytes32[]` | An array Data Keys used to update the [LSP-5-ReceivedAssets] data. | | ||
| `lsp5DataValues` | `bytes[]` | An array Data Values used to update the [LSP-5-ReceivedAssets] data. | | ||
|
||
<br/> | ||
|
||
### getLSP5ArrayLengthBytes | ||
|
||
```solidity | ||
function getLSP5ArrayLengthBytes(contract IERC725Y erc725YContract) internal view returns (bytes); | ||
``` | ||
|
||
Get the raw bytes value stored under the `_LSP5_RECEIVED_ASSETS_ARRAY_KEY`. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| ----------------- | :-----------------: | ----------------------------------------------- | | ||
| `erc725YContract` | `contract IERC725Y` | The contract to query the ERC725Y storage from. | | ||
|
||
#### Returns | ||
|
||
| Name | Type | Description | | ||
| ---- | :-----: | ----------------------------------------------- | | ||
| `0` | `bytes` | The raw bytes value stored under this data key. | | ||
|
||
<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters