diff --git a/docs/learn/introduction.md b/docs/learn/introduction.md index be3e38a73..6c2424390 100644 --- a/docs/learn/introduction.md +++ b/docs/learn/introduction.md @@ -78,8 +78,8 @@ The benefits offered by the LUKSO Token standards are summarized in the table be :::success Interested to migrate? Visit our guides: -- [Migrate ERC20 to LSP7](./digital-assets/token/migrate-erc20-to-lsp7.md) -- [Migrate ERC721 to LSP8](./digital-assets/nft/migrate-erc721-to-lsp8.md) +- [Migrate ERC20 to LSP7](./migrate/migrate-erc20-to-lsp7.md) +- [Migrate ERC721 to LSP8](./migrate/migrate-erc721-to-lsp8.md) ::: ## Building on LUKSO diff --git a/docs/learn/digital-assets/token/migrate-erc20-to-lsp7.md b/docs/learn/migrate/migrate-erc20-to-lsp7.md similarity index 82% rename from docs/learn/digital-assets/token/migrate-erc20-to-lsp7.md rename to docs/learn/migrate/migrate-erc20-to-lsp7.md index fb2d2bacb..ba60a2227 100644 --- a/docs/learn/digital-assets/token/migrate-erc20-to-lsp7.md +++ b/docs/learn/migrate/migrate-erc20-to-lsp7.md @@ -1,6 +1,6 @@ --- -sidebar_label: 'Migrate from ERC20 to LSP7' -sidebar_position: 7 +sidebar_label: '🪙 ERC20 to LSP7' +sidebar_position: 2 description: Learn how to migrate your ERC20 token to the LSP7 Digital Asset standard on LUKSO. --- @@ -8,11 +8,11 @@ import Erc20LSP7Table from '@site/src/components/Erc20LSP7Table'; # 🪙 Migrate ERC20 to LSP7 -[LSP7DigitalAsset](../../../standards/tokens/LSP7-Digital-Asset.md) is a new token standard that offers a wider range of functionality compared to [ERC20](https://eips.ethereum.org/EIPS/eip-20), as described in the [standard section](../../../standards/tokens/LSP7-Digital-Asset.md). For migrating from ERC20 to LSP7, developers need to be aware of several key differences. +[LSP7DigitalAsset](../../standards/tokens/LSP7-Digital-Asset.md) is a new token standard that offers a wider range of functionality compared to [ERC20](https://eips.ethereum.org/EIPS/eip-20), as described in the [standard section](../../standards/tokens/LSP7-Digital-Asset.md). For migrating from ERC20 to LSP7, developers need to be aware of several key differences. :::info -If you need more details about the interface differences between ERC20 and LSP7, please visit our [contract overview](../../../contracts/overview/DigitalAssets#comparisons-with-erc20--erc721) page. +If you need more details about the interface differences between ERC20 and LSP7, please visit our [contract overview](../../contracts/overview/DigitalAssets#comparisons-with-erc20--erc721) page. ::: @@ -35,7 +35,7 @@ contract MyERC20Token is ERC20 { To create an LSP7 token, `LSP7` is imported from [@lukso/lsp7-contracts](https://www.npmjs.com/package/@lukso/lsp7-contracts) package, and inherited. -The constructor arguments definitions can be found explained in the [constructor API](../../../contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md#constructor) section. +The constructor arguments definitions can be found explained in the [constructor API](../../contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md#constructor) section. ```solidity title="LSP7 Token" // SPDX-License-Identifier: Apache-2.0 @@ -67,17 +67,17 @@ ERC20: `function transferFrom(address from, address to, uint256 amount);` LSP7: `function transfer(address from, address to, uint256 amount, bool force, bytes data);` -- For LSP7, **mint and transfer functions will have a `force` additional field**. For full compatibility with ERC20 behavior (where the recipient can be any address), set this to `true`. Setting it to `false` will only allow the transfer to smart contract addresses supporting the LSP1 interfaceId. (Check [LSP1UniversalReceiver section](../../../standards/tokens/LSP7-Digital-Asset.md#lsp1-token-hooks) in LSP7DigitalAsset for more info). +- For LSP7, **mint and transfer functions will have a `force` additional field**. For full compatibility with ERC20 behavior (where the recipient can be any address), set this to `true`. Setting it to `false` will only allow the transfer to smart contract addresses supporting the LSP1 interfaceId. (Check [LSP1UniversalReceiver section](../../standards/tokens/LSP7-Digital-Asset.md#lsp1-token-hooks) in LSP7DigitalAsset for more info). -- For LSP7, **mint, transfer, and burn functions will have `data` as an additional field**. For full compatibility with ERC20 behavior, set this to empty bytes. This data will only be relevant when the recipient is a smart contract address supporting the LSP1 interfaceId (Check [LSP1UniversalReceiver section](../../../standards/tokens/LSP7-Digital-Asset.md#lsp1-token-hooks) in LSP7DigitalAsset for more info), where the data will be sent and the recipient can act on it (e.g., reject the transfer, forward the tokens to a vault, etc.). +- For LSP7, **mint, transfer, and burn functions will have `data` as an additional field**. For full compatibility with ERC20 behavior, set this to empty bytes. This data will only be relevant when the recipient is a smart contract address supporting the LSP1 interfaceId (Check [LSP1UniversalReceiver section](../../standards/tokens/LSP7-Digital-Asset.md#lsp1-token-hooks) in LSP7DigitalAsset for more info), where the data will be sent and the recipient can act on it (e.g., reject the transfer, forward the tokens to a vault, etc.). -- **LSP7 metadata is generic**, in contrast to ERC20 where the metadata is limited to name and symbol. The [generic key-value store](../../../standards/lsp-background/erc725.md#erc725y-generic-data-keyvalue-store) in LSP7 allows for storing any possible data. +- **LSP7 metadata is generic**, in contrast to ERC20 where the metadata is limited to name and symbol. The [generic key-value store](../../standards/lsp-background/erc725.md#erc725y-generic-data-keyvalue-store) in LSP7 allows for storing any possible data. ## Interacting with Contracts :::info -To check function definitions and explanations of behavior and each parameter, check [API Reference](../../../contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md) section. +To check function definitions and explanations of behavior and each parameter, check [API Reference](../../contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md) section. ::: @@ -89,7 +89,7 @@ To interact with LSP7DigitalAsset contract, different functions should be called :::info -To check event definitions and explanations of behavior and each parameter, check [API Reference](../../../contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md) section. +To check event definitions and explanations of behavior and each parameter, check [API Reference](../../contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md) section. ::: @@ -113,7 +113,7 @@ const name = await token.name(); const symbol = await token.symbol(); ``` -In LSP7, the token name and symbol can be retrieved with [getData](../../../contracts/contracts/ERC725/ERC725.md#getdata) function, since LSP7 uses a generic metadata key value store: +In LSP7, the token name and symbol can be retrieved with [getData](../../contracts/contracts/ERC725/ERC725.md#getdata) function, since LSP7 uses a generic metadata key value store: ```javascript // LSP7 @@ -131,7 +131,7 @@ const symbol = ethers.toUtf8String(symbolValue); :::info -To learn more about setting and creating the LSP4Metadata JSON, check the [metadata](../../digital-assets/metadata-management/metadata-preparation.md) section. +To learn more about setting and creating the LSP4Metadata JSON, check the [metadata](../digital-assets/metadata-management/metadata-preparation.md) section. ::: diff --git a/docs/learn/digital-assets/nft/migrate-erc721-to-lsp8.md b/docs/learn/migrate/migrate-erc721-to-lsp8.md similarity index 84% rename from docs/learn/digital-assets/nft/migrate-erc721-to-lsp8.md rename to docs/learn/migrate/migrate-erc721-to-lsp8.md index 7f1a9b533..58fbb05b1 100644 --- a/docs/learn/digital-assets/nft/migrate-erc721-to-lsp8.md +++ b/docs/learn/migrate/migrate-erc721-to-lsp8.md @@ -1,6 +1,6 @@ --- -sidebar_label: 'Migrate from ERC721 to LSP8' -sidebar_position: 6 +sidebar_label: '🌅 ERC721 to LSP8' +sidebar_position: 3 description: Learn how to migrate your ERC721 token to the LSP8 Identifiable Digital Asset standard on LUKSO. --- @@ -8,11 +8,11 @@ import Erc721LSP8Table from '@site/src/components/Erc721LSP8Table'; # 🖼️ Migrate ERC721 to LSP8 -[LSP8IdentifiableDigitalAsset](../../../standards/tokens/LSP8-Identifiable-Digital-Asset.md) is a new token standard that offers a wider range of functionality compared to [ERC721](https://eips.ethereum.org/EIPS/eip-721), as described in the [standard section](../../../standards/tokens/LSP8-Identifiable-Digital-Asset.md). For migrating from ERC721 to LSP8, developers need to be aware of several key differences. +[LSP8IdentifiableDigitalAsset](../../standards/tokens/LSP8-Identifiable-Digital-Asset.md) is a new token standard that offers a wider range of functionality compared to [ERC721](https://eips.ethereum.org/EIPS/eip-721), as described in the [standard section](../../standards/tokens/LSP8-Identifiable-Digital-Asset.md). For migrating from ERC721 to LSP8, developers need to be aware of several key differences. :::info -If you need more details about the interface differences between ERC721 and LSP8, please visit our [contract overview](../../../contracts/overview/DigitalAssets#comparisons-with-erc20--erc721) page. +If you need more details about the interface differences between ERC721 and LSP8, please visit our [contract overview](../../contracts/overview/DigitalAssets#comparisons-with-erc20--erc721) page. ::: @@ -35,7 +35,7 @@ contract MyERC721Token is ERC721 { To create an LSP8 NFT, `LSP8` is imported from [@lukso/lsp8-contracts](https://www.npmjs.com/package/@lukso/lsp8-contracts) package, and inherited. -The constructor arguments definitions can be found explained in the [constructor API](../../../contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md#constructor) section. +The constructor arguments definitions can be found explained in the [constructor API](../../contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md#constructor) section. ```js // SPDX-License-Identifier: Apache-2.0 @@ -68,17 +68,17 @@ ERC721: `function transferFrom(address from, address to, uint256 tokenId);` LSP8: `function transfer(address from, address to, bytes32 tokenId, bool force, bytes data);` -- For LSP8, **mint and transfer functions will have a `force` additional field**. For full compatibility with ERC721 behavior (where the recipient can be any address), set this to `true`. Setting it to `false` will only allow the transfer to smart contract addresses supporting the LSP1 interfaceId. (Check [LSP1UniversalReceiver section](../../../standards/tokens/LSP8-Identifiable-Digital-Asset.md#lsp1-token-hooks) in LSP8IdentifiableDigitalAsset for more info). +- For LSP8, **mint and transfer functions will have a `force` additional field**. For full compatibility with ERC721 behavior (where the recipient can be any address), set this to `true`. Setting it to `false` will only allow the transfer to smart contract addresses supporting the LSP1 interfaceId. (Check [LSP1UniversalReceiver section](../../standards/tokens/LSP8-Identifiable-Digital-Asset.md#lsp1-token-hooks) in LSP8IdentifiableDigitalAsset for more info). -- For LSP8, **mint, transfer, and burn functions will have `data` as an additional field**. For full compatibility with ERC721 behavior, set this to empty bytes. This data will only be relevant when the recipient is a smart contract address supporting the LSP1 interfaceId (Check [LSP1UniversalReceiver section](../../../standards/tokens/LSP8-Identifiable-Digital-Asset.md#lsp1-token-hooks)in LSP8IdentifiableDigitalAsset for more info), where the data will be sent and the recipient can act on it (e.g., reject the transfer, forward the tokens to a vault, etc.). +- For LSP8, **mint, transfer, and burn functions will have `data` as an additional field**. For full compatibility with ERC721 behavior, set this to empty bytes. This data will only be relevant when the recipient is a smart contract address supporting the LSP1 interfaceId (Check [LSP1UniversalReceiver section](../../standards/tokens/LSP8-Identifiable-Digital-Asset.md#lsp1-token-hooks)in LSP8IdentifiableDigitalAsset for more info), where the data will be sent and the recipient can act on it (e.g., reject the transfer, forward the tokens to a vault, etc.). -- **LSP8 metadata is generic**, in contrast to ERC721 where the metadata is limited to name and symbol and tokenURI. The [generic key-value store](../../../standards/lsp-background/erc725.md#erc725y-generic-data-keyvalue-store) in LSP8 allows for storing any possible data. +- **LSP8 metadata is generic**, in contrast to ERC721 where the metadata is limited to name and symbol and tokenURI. The [generic key-value store](../../standards/lsp-background/erc725.md#erc725y-generic-data-keyvalue-store) in LSP8 allows for storing any possible data. ## Interacting with Contracts :::info -To check function definitions and explanations of behavior and each parameter, check [API Reference](../../../contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md) section. +To check function definitions and explanations of behavior and each parameter, check [API Reference](../../contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md) section. ::: @@ -90,7 +90,7 @@ To interact with LSP8IdentifiableDigitalAsset contract, different functions shou :::info -To check event definitions and explanations of behavior and each parameter, check [API Reference](../../../contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md) section. +To check event definitions and explanations of behavior and each parameter, check [API Reference](../../contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md) section. ::: @@ -116,7 +116,7 @@ const symbol = await token.symbol(); const tokenURI = await token.tokenURI(tokenId); ``` -In LSP8, the token name and symbol can be retrieved with [getData](../../../contracts/contracts/ERC725/ERC725.md#getdata) function, since LSP8 uses a generic metadata key value store: +In LSP8, the token name and symbol can be retrieved with [getData](../../contracts/contracts/ERC725/ERC725.md#getdata) function, since LSP8 uses a generic metadata key value store: ```javascript // LSP8 @@ -134,7 +134,7 @@ const symbol = ethers.toUtf8String(symbolValue); :::info -To learn more about setting and creating the LSP4Metadata JSON, check the [metadata](../../digital-assets/metadata-management/metadata-preparation.md) section. +To learn more about setting and creating the LSP4Metadata JSON, check the [metadata](../digital-assets/metadata-management/metadata-preparation.md) section. ::: diff --git a/docs/learn/migrate-to-lukso.md b/docs/learn/migrate/migrate-to-lukso.md similarity index 82% rename from docs/learn/migrate-to-lukso.md rename to docs/learn/migrate/migrate-to-lukso.md index c5d691f2d..b98dc4403 100644 --- a/docs/learn/migrate-to-lukso.md +++ b/docs/learn/migrate/migrate-to-lukso.md @@ -1,6 +1,6 @@ --- -sidebar_label: '🔀 Migrate to LUKSO' -sidebar_position: 6 +sidebar_label: '⛓ From other EVM Chains' +sidebar_position: 1 description: What to consider when building on LUKSO with LSPs (LUKSO Standard Proposals)? --- @@ -10,13 +10,13 @@ description: What to consider when building on LUKSO with LSPs (LUKSO Standard P This page gives an overview the differences between building on LUKSO vs other EVM chains. -For more information regarding the network and standards, see the [Introduction](./introduction.md) and [Concepts & Glossary](./concepts.md) pages. +For more information regarding the network and standards, see the [Introduction](../../standards/introduction.md) and [Concepts & Glossary](../concepts.md) pages. ::: ## Migrating from other EVM Chain -LUKSO is EVM-compatible, so any Ethereum smart contract can be redeployed on LUKSO by connecting to a [LUKSO RPC endpoint](../networks/mainnet/parameters). +LUKSO is EVM-compatible, so any Ethereum smart contract can be redeployed on LUKSO by connecting to a [LUKSO RPC endpoint](../../networks/mainnet/parameters). Developers are encouraged to use LSP standards to enhance the experience using their projects. Some codebases may need adjustments to convert ERC interactions to LSP interactions. More details are provided below. @@ -24,7 +24,7 @@ Developers are encouraged to use LSP standards to enhance the experience using t