diff --git a/docs/contracts/introduction.md b/docs/contracts/introduction.md index 71c9f4a3c..c2637e117 100644 --- a/docs/contracts/introduction.md +++ b/docs/contracts/introduction.md @@ -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). github badge -> -> They are available as a npm package [`@lukso/lsp-smart-contracts`](https://www.npmjs.com/package/@lukso/lsp-smart-contracts). npm badge - -
- **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. +
+ +
+ +| Package | Version | +| :----------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`@lukso/lsp-smart-contracts`](https://github.com/lukso-network/lsp-smart-contracts) | npm badge | +| [`@lukso/lsp0-contracts`](https://github.com/lukso-network/lsp0-contracts) | npm badge | +| [`@lukso/lsp1-contracts`](https://github.com/lukso-network/lsp1-contracts) | npm badge | +| [`@lukso/lsp1delegate-contracts`](https://github.com/lukso-network/lsp1delegate-contracts) | npm badge | +| [`@lukso/lsp2-contracts`](https://github.com/lukso-network/lsp2-contracts) | npm badge | +| [`@lukso/lsp3-contracts`](https://github.com/lukso-network/lsp3-contracts) | npm badge | +| [`@lukso/lsp4-contracts`](https://github.com/lukso-network/lsp4-contracts) | npm badge | +| [`@lukso/lsp5-contracts`](https://github.com/lukso-network/lsp5-contracts) | npm badge | +| [`@lukso/lsp6-contracts`](https://github.com/lukso-network/lsp6-contracts) | npm badge | +| [`@lukso/lsp7-contracts`](https://github.com/lukso-network/lsp7-contracts) | npm badge | +| [`@lukso/lsp8-contracts`](https://github.com/lukso-network/lsp8-contracts) | npm badge | +| [`@lukso/lsp9-contracts`](https://github.com/lukso-network/lsp9-contracts) | npm badge | + +
+ +
+ +| Package | Version | +| :------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`@lukso/lsp10-contracts`](https://github.com/lukso-network/lsp10-contracts) | npm badge | +| [`@lukso/lsp11-contracts`](https://github.com/lukso-network/lsp11-contracts) | npm badge | +| [`@lukso/lsp12-contracts`](https://github.com/lukso-network/lsp12-contracts) | npm badge | +| [`@lukso/lsp14-contracts`](https://github.com/lukso-network/lsp14-contracts) | npm badge | +| [`@lukso/lsp16-contracts`](https://github.com/lukso-network/lsp16-contracts) | npm badge | +| [`@lukso/lsp17-contracts`](https://github.com/lukso-network/lsp17-contracts) | npm badge | +| [`@lukso/lsp17contractextension-contracts`](https://github.com/lukso-network/lsp17contractextension-contracts) | npm badge | +| [`@lukso/lsp20-contracts`](https://github.com/lukso-network/lsp20-contracts) | npm badge | +| [`@lukso/lsp23-contracts`](https://github.com/lukso-network/lsp23-contracts) | npm badge | +| [`@lukso/lsp25-contracts`](https://github.com/lukso-network/lsp25-contracts) | npm badge | +| [`@lukso/lsp26-contracts`](https://github.com/lukso-network/lsp26-contracts) | npm badge | +| [`@lukso/universalprofile-contracts`](https://github.com/lukso-network/universalprofile-contracts) | npm badge | + +
+ +
+ ## Installation +### with npm, yarn or pnpm + +To get all the LSP smart contracts, install the `@lukso/lsp-smart-contracts`. + @@ -52,6 +92,53 @@ pnpm add @lukso/lsp-smart-contracts +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. + + + + +```bash +npm install @lukso/lsp7-contracts +``` + + + + + +```bash +yarn add @lukso/lsp7-contracts +``` + + + + + +```bash +pnpm add @lukso/lsp7-contracts +``` + + + + + +### 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.