LUKSO Expert
Complete knowledge base for building on LUKSO — the blockchain for creative economies,
digital identity, and new social standards.
Quick Facts
- - Chain ID: 42 (mainnet) / 4201 (testnet)
- Native token: LYX
- Consensus: Proof of Stake (32 LYX per validator)
- EVM compatible: Yes, unmodified Ethereum execution layer
- Unique: Universal Profiles (smart contract accounts) instead of EOAs
- Founder: Fabian Vogelsteller (also created ERC-20 and ERC-725)
Core Concepts
LUKSO extends Ethereum with LSP standards (LUKSO Standard Proposals) that enable:
- - Smart accounts (Universal Profiles) with built-in permissions, metadata, and social features
- Flexible tokens (LSP7/LSP8) with safety features like
force parameter and universal receiver hooks - Gasless transactions via relay service (LSP25)
- On-chain social graph via followers system (LSP26)
- Profile customization via The Grid (LSP28)
Architecture Overview
CODEBLOCK0
Reference Files
Load these based on what you need:
LSP Standards (references/lsp-standards.md)
Complete reference for ALL LSP standards (LSP0-LSP28+). Includes interfaces,
function signatures, and implementation details. Read when working with any
specific LSP or needing to understand the standards architecture.
Developer Patterns (references/dev-patterns.md)
Practical code examples and implementation guides. Covers UP creation, token
operations, permissions, gasless transactions, and common pitfalls. Read when
writing code or debugging LUKSO-specific issues.
Ecosystem (references/ecosystem.md)
Projects, team, community channels, grants, and chain infrastructure. Read when
answering ecosystem questions or looking for project information.
Contracts & Repos (references/contracts-and-repos.md)
Deployed contract addresses, GitHub repositories, NPM packages, and API endpoints.
Read when looking up addresses, ABIs, or integration endpoints.
Key Contract Addresses (Mainnet)
| Contract | Address |
|---|
| LSP26 Follower System | INLINECODE5 |
| Envio GraphQL |
https://envio.lukso-mainnet.universal.tech/v1/graphql |
Full address list in INLINECODE7
Common Operations Quick Reference
Resolve username to UP address
CODEBLOCK1
Check UP count
CODEBLOCK2
Follow a profile (LSP26)
CODEBLOCK3
Important Gotchas
- 1.
force parameter (LSP7/LSP8): Set to true to send tokens to any address.
Set to
false (default) to only send to UPs with a Universal Receiver — prevents
accidental sends to EOAs or contracts that can't handle them.
- 2. LSP6 Permissions: Permissions are bitmask-based. Common mistake: granting
CALL permission but forgetting
EXECUTE_RELAY_CALL for gasless transactions.
- 3. ERC725Y data encoding: Use
@erc725/erc725.js for encoding — manual encoding
is error-prone, especially for VerifiableURI and array types.
- 4. Gas estimation: UP transactions go through KeyManager proxy, so gas estimates
can be off. Add 20-30% buffer.
Developer Resources
- - Docs: https://docs.lukso.tech
- GitHub: https://github.com/lukso-network
- Medium: https://medium.com/lukso
- Discord: https://discord.gg/lukso
- Testnet faucet: https://faucet.testnet.lukso.network
LUKSO 专家
基于LUKSO构建的完整知识库——面向创意经济、数字身份和新社交标准的区块链。
快速事实
- - 链ID: 42(主网)/ 4201(测试网)
- 原生代币: LYX
- 共识机制: 权益证明(每个验证者需32 LYX)
- EVM兼容: 是,未修改的以太坊执行层
- 独特之处: 使用通用档案(智能合约账户)替代外部拥有账户
- 创始人: Fabian Vogelsteller(同时也是ERC-20和ERC-725的创建者)
核心概念
LUKSO通过LSP标准(LUKSO标准提案)扩展以太坊,实现:
- - 智能账户(通用档案)内置权限、元数据和社交功能
- 灵活代币(LSP7/LSP8)具备安全特性,如force参数和通用接收器钩子
- 无Gas交易通过中继服务(LSP25)
- 链上社交图谱通过关注者系统(LSP26)
- 档案自定义通过网格系统(LSP28)
架构概览
通用档案 (LSP0/ERC725Account)
├── 密钥管理器 (LSP6) — 权限层
│ ├── 控制器 — 具有特定权限的地址
│ └── 允许调用/地址 — 细粒度访问控制
├── 档案数据 (LSP3) — 名称、描述、头像、链接
├── 通用接收器 (LSP1) — 接收交易的钩子
├── 拥有的资产 (LSP5) — 拥有的代币/NFT注册表
├── 发行的资产 (LSP12) — 创建的代币/NFT注册表
└── 网格系统 (LSP28) — 可自定义的档案布局
参考文件
根据需求加载以下文件:
LSP标准 (references/lsp-standards.md)
所有LSP标准(LSP0-LSP28+)的完整参考。包含接口、函数签名和实现细节。在处理特定LSP或需要理解标准架构时阅读。
开发者模式 (references/dev-patterns.md)
实用代码示例和实现指南。涵盖UP创建、代币操作、权限、无Gas交易和常见陷阱。在编写代码或调试LUKSO特定问题时阅读。
生态系统 (references/ecosystem.md)
项目、团队、社区渠道、资助和链基础设施。在回答生态系统问题或查找项目信息时阅读。
合约与仓库 (references/contracts-and-repos.md)
已部署的合约地址、GitHub仓库、NPM包和API端点。在查找地址、ABI或集成端点时阅读。
关键合约地址(主网)
| 合约 | 地址 |
|---|
| LSP26 关注者系统 | 0xf01103E5a9909Fc0DBe8166dA7085e0285daDDcA |
| Envio GraphQL |
https://envio.lukso-mainnet.universal.tech/v1/graphql |
完整地址列表见 references/contracts-and-repos.md
常见操作快速参考
将用户名解析为UP地址
graphql
Envio GraphQL
query { Profile(where: {name: {_eq: username}}) { id name } }
检查UP数量
graphql
query { Profile_aggregate { aggregate { count } } }
关注档案(LSP26)
javascript
const LSP26 = 0xf01103E5a9909Fc0DBe8166dA7085e0285daDDcA;
const calldata = lsp26Contract.methods.follow(targetAddress).encodeABI();
await universalProfile.methods.execute(0, LSP26, 0, calldata).send({from: controller});
重要注意事项
- 1. force参数(LSP7/LSP8):设为true可向任何地址发送代币。设为false(默认)仅向具有通用接收器的UP发送——防止意外发送到无法处理代币的EOA或合约。
- 2. LSP6权限:权限基于位掩码。常见错误:授予CALL权限但忘记授予EXECUTERELAYCALL权限以支持无Gas交易。
- 3. ERC725Y数据编码:使用@erc725/erc725.js进行编码——手动编码容易出错,特别是对于VerifiableURI和数组类型。
- 4. Gas估算:UP交易通过KeyManager代理,因此Gas估算可能不准确。建议增加20-30%的缓冲。
开发者资源
- - 文档: https://docs.lukso.tech
- GitHub: https://github.com/lukso-network
- Medium: https://medium.com/lukso
- Discord: https://discord.gg/lukso
- 测试网水龙头: https://faucet.testnet.lukso.network