Skip to content

Commit

Permalink
Merge branch 'main' into tehnalogos-standard-detection-docs-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tehnalogos authored Sep 10, 2024
2 parents 76be598 + a7a3a31 commit 6b40459
Show file tree
Hide file tree
Showing 68 changed files with 296 additions and 162 deletions.
103 changes: 95 additions & 8 deletions docs/contracts/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,62 @@ import {ContractCardsGallery} from '@site/src/components/ContractCardsGallery';

# Smart Contracts

> The smart contracts are public and open source on [GitHub](https://github.com/lukso-network/lsp-smart-contracts). <a href="https://github.com/lukso-network/lsp-smart-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="github badge" class="shield-badge" src="https://img.shields.io/github/v/release/lukso-network/lsp-smart-contracts?logo=github&label=Github"/></a>
>
> They are available as a npm package [`@lukso/lsp-smart-contracts`](https://www.npmjs.com/package/@lukso/lsp-smart-contracts). <a href="https://www.npmjs.com/package/@lukso/lsp-smart-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp-smart-contracts.svg?style=flat&label=NPM&logo=npm"/></a>
<br/>

**Welcome to the LUKSO Smart Contracts documentation!**

In this section, you will find all the documentation and resources related to the `@lukso/lsp-smart-contracts`, the reference contract implementations in Solidity of the **[LUKSO Standard Proposals](../standards/introduction.md)**.
You will find on this page all the documentation and resources related to the `@lukso/lsp-smart-contracts`, the reference implementation in Solidity of the **[LSPs (LUKSO Standard Proposals)](../standards/introduction.md)**.

The `@lukso/lsp-smart-contracts` codebase is modular, with each LSP standard and features implemented in separate contracts. This allows smart contract developers to _"pick and choose"_ the contracts for the requirements and behaviors they need for their protocols and applications.
Each LSP standard and features are implemented in separate contracts under their own package. This allows developers to *"pick and choose"* the contracts for the requirements and behaviours they need for their protocols and applications. The `@lukso/lsp-smart-contracts` package also contains all the LSPs implementations listed below.

This modular design also helps in making the codebase easier to navigate and understand for developers using it.

<div style={{display: "flex", justifyContent: "space-between"}}>

<div style={{width: "**46**%"}}>

| Package | Version |
| :----------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@lukso/lsp-smart-contracts`](https://github.com/lukso-network/lsp-smart-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp-smart-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp-smart-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp0-contracts`](https://github.com/lukso-network/lsp0-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp0-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp0-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp1-contracts`](https://github.com/lukso-network/lsp1-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp1-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp1-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp1delegate-contracts`](https://github.com/lukso-network/lsp1delegate-contracts) | <a href="https://www.npmjs.com/package/@lukso/lspdelegate-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lspdelegate-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp2-contracts`](https://github.com/lukso-network/lsp2-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp2-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp2-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp3-contracts`](https://github.com/lukso-network/lsp3-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp3-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp3-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp4-contracts`](https://github.com/lukso-network/lsp4-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp4-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp4-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp5-contracts`](https://github.com/lukso-network/lsp5-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp5-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp5-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp6-contracts`](https://github.com/lukso-network/lsp6-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp6-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp6-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp7-contracts`](https://github.com/lukso-network/lsp7-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp7-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp7-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp8-contracts`](https://github.com/lukso-network/lsp8-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp8-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp8-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp9-contracts`](https://github.com/lukso-network/lsp9-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp9-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp9-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |

</div>

<div style={{width: "50%"}}>

| Package | Version |
| :------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@lukso/lsp10-contracts`](https://github.com/lukso-network/lsp10-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp10-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp10-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp11-contracts`](https://github.com/lukso-network/lsp11-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp11-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp11-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp12-contracts`](https://github.com/lukso-network/lsp12-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp12-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp12-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp14-contracts`](https://github.com/lukso-network/lsp14-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp14-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp14-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp16-contracts`](https://github.com/lukso-network/lsp16-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp16-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp16-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp17-contracts`](https://github.com/lukso-network/lsp17-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp17-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp17-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp17contractextension-contracts`](https://github.com/lukso-network/lsp17contractextension-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp17contractextension-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp17contractextension-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp20-contracts`](https://github.com/lukso-network/lsp20-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp20-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp20-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp23-contracts`](https://github.com/lukso-network/lsp23-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp23-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp23-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp25-contracts`](https://github.com/lukso-network/lsp25-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp25-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp25-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/lsp26-contracts`](https://github.com/lukso-network/lsp26-contracts) | <a href="https://www.npmjs.com/package/@lukso/lsp26-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/lsp26-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |
| [`@lukso/universalprofile-contracts`](https://github.com/lukso-network/universalprofile-contracts) | <a href="https://www.npmjs.com/package/@lukso/universalprofile-contracts" target="_blank" rel="noopener noreferrer"><img style={{verticalAlign: 'middle'}} alt="npm badge" class="shield-badge" src="https://img.shields.io/npm/v/@lukso/universalprofile-contracts.svg?style=flat&label=NPM&logo=npm"/></a> |

</div>

</div>

## Installation

### with npm, yarn or pnpm

To get all the LSP smart contracts, install the `@lukso/lsp-smart-contracts`.

<Tabs>
<TabItem value="npm" label="npm">

Expand Down Expand Up @@ -52,6 +92,53 @@ pnpm add @lukso/lsp-smart-contracts

</Tabs>

You can also install individual package based on the LSP that you need (see table above). For instance, if you only need the LSP7 Digital Asset contract implementation for your project, simply install the `@lukso/lsp7-contracts` package.

<Tabs>
<TabItem value="npm" label="npm">

```bash
npm install @lukso/lsp7-contracts
```

</TabItem>

<TabItem value="yarn" label="yarn">

```bash
yarn add @lukso/lsp7-contracts
```

</TabItem>

<TabItem value="pnpm" label="pnpm">

```bash
pnpm add @lukso/lsp7-contracts
```

</TabItem>

</Tabs>

### with Foundry

Currently, the monorepo structure of the LSP Smart Contracts create issues when installing via Foundry and forge. As a workaround, it is recommend to use the following method:

1. install the smart contract package with your preferred package manager as shown above (npm, yarn or pnpm).

```bash
npm i @lukso/lsp7-contracts
```

2. add the following in your `remappings.txt` or `foundry.toml`.

```txt title="remappings.txt"
@lukso/=node_modules/@lukso/
```

This will install the LUKSO LSP Solidity contracts in your `node_modules/` folder and forge will remap your `import @lukso/...` statements in your `.sol` files by locating the LSP contracts in the `node_modules/` folder.

## Overview

Overall the contracts can be divided by their usage.
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/onboarding/tools-and-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you want to experiment with simple code snippets for LSPs, please look at the

## Which tools can be used to develop dApps on LUKSO?

We have a [full set of tools](../../tools/getting-started/) and libraries that you can use to build on LSPs and interact with Universal Profiles. You can also [install the latest Universal Profile Extension](/install-up-browser-extension) to connect Universal Profiles with dApps.
We have a [full set of tools](../../tools/libraries/getting-started/) and libraries that you can use to build on LSPs and interact with Universal Profiles. You can also [install the latest Universal Profile Extension](/install-up-browser-extension) to connect Universal Profiles with dApps.

## Where can I get LYXt for test deployments?

Expand Down
2 changes: 1 addition & 1 deletion docs/learn/digital-assets/.assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ The `generateLSP4JSONVerifiableURI` will return you directly what needs to be se

## Encode the LSP4 Metadata

To encode the LSP4 Metadata with ease, you can use the 🛠️ [`erc725.js`](../../tools/erc725js/getting-started.md) library. The tool provides all necessary LSP Schemas and the `encodeData()` function.
To encode the LSP4 Metadata with ease, you can use the 🛠️ [`erc725.js`](../../tools/libraries/erc725js/getting-started.md) library. The tool provides all necessary LSP Schemas and the `encodeData()` function.

```js
import { ERC725 } from '@erc725/erc725.js';
Expand Down
2 changes: 1 addition & 1 deletion docs/learn/digital-assets/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem';

# Getting started building Tokens & NFTs

The LUKSO ecosystem offers smart contract developers a lot of [new standards](../../standards/introduction.md) and [tools](../../tools/getting-started.md) to build **powerful, modular, and standardized** blockchain applications.
The LUKSO ecosystem offers smart contract developers a lot of [new standards](../../standards/introduction.md) and [tools](../../tools/libraries/getting-started.md) to build **powerful, modular, and standardized** blockchain applications.

This page will guide you in setting up your development environment to build and deploy tokens and NFTs on LUKSO.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ To implement Cascade and Sense support, you can reference [this](./cascade-and-s

:::tip Convenience Tool

You can use the 🛠️ [`erc725.js`](../../../tools/erc725js/getting-started.md) library
You can use the 🛠️ [`erc725.js`](../../../tools/libraries/erc725js/getting-started.md) library
to encode the LSP4 Metadata. The tool provides all necessary LSP schemas as well as the `encodeData()` function.

:::
Expand Down
Loading

0 comments on commit 6b40459

Please sign in to comment.