The smart contracts are public and open source on GitHub.
They are available as a npm package
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.
@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.
This modular design also helps in making the codebase easier to navigate and understand for developers using it.
npm install @lukso/lsp-smart-contracts
yarn add @lukso/lsp-smart-contracts
pnpm add @lukso/lsp-smart-contracts
Overall the contracts can be divided by their usage.
Types of contracts
If you are using base contracts and are deploying proxies for your application, it is recommended to use a factory pattern to deploy and initialize the proxies to avoid potential front-running issues.
The LSP16 Universal Factory or LSP23 Linked Contract Deployment can help you achieve this.
@lukso/lsp-smart-contracts repository contains two types of contracts:
|Standard contracts||One contract deployed per user. Deployed and initialized via a |
|Base contracts||Deploy one contract for all users. To be used as base contract behind proxies. Initialized via a |
Some of the LSP standards do not have a contract implementation as they represent Metadata-Standards to be used in the implementation contracts.
Each contracts are not just related to one specific section. They could be used in different fashion and combination, with the Universal Profile, Digital Asset, and NFT 2.0 contracts.
For instance, the Universal Profile Browser extension comprises a set of contracts allow a better representation of the identity on the blockchain and better control over it.