lukso-expert
适用于 AI 代理的综合 LUKSO 区块链知识库。做任何代理 LUKSO 专家 — 涵盖所有 LSP 标准 (LSP0-LSP28)、通用配置文件、 智能合约开发、生态系统项目和开发人员工具。 使用时间: - 基于 LUKSO(智能合约、dApp、集成) - 使用通用配置文件(创建、权限、元数据) - 部署LSP7/LSP8令牌或与LSP7/LSP8令牌交互 - 设置无gas中继交易(LSP25) - 管理KeyManager权限(LSP6) - 使用网格 (LSP28)、追随者 (LSP26) 或任何 LSP 标准 - 回答有关 LUKSO 生态系统、项目或架构的问题 - 查找合约地址、ABI 或 API 端点 - 调试 LUKSO 特定问题(权限、编码、gas) 不要在以下情况下使用: - 使用非 LUKSO EVM 链(使用标准以太坊模式) - 与 LSP 标准无关的一般 Solidity 问题
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~luksoagent-lukso-expertcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~luksoagent-lukso-expert/file -o luksoagent-lukso-expert.md# 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
```
Universal Profile (LSP0/ERC725Account)
├── KeyManager (LSP6) — permission layer
│ ├── Controllers — addresses with specific permissions
│ └── Allowed calls/addresses — fine-grained access control
├── Profile Data (LSP3) — name, description, avatar, links
├── Universal Receiver (LSP1) — hooks for incoming transactions
├── Owned Assets (LSP5) — registry of tokens/NFTs owned
├── Issued Assets (LSP12) — registry of tokens/NFTs created
└── The Grid (LSP28) — customizable profile layout
```
## 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 | `0xf01103E5a9909Fc0DBe8166dA7085e0285daDDcA` |
| Envio GraphQL | `https://envio.lukso-mainnet.universal.tech/v1/graphql` |
> Full address list in `references/contracts-and-repos.md`
## Common Operations Quick Reference
### Resolve username to UP address
```graphql
# Envio GraphQL
query { Profile(where: {name: {_eq: "username"}}) { id name } }
```
### Check UP count
```graphql
query { Profile_aggregate { aggregate { count } } }
```
### Follow a profile (LSP26)
```javascript
const LSP26 = "0xf01103E5a9909Fc0DBe8166dA7085e0285daDDcA";
const calldata = lsp26Contract.methods.follow(targetAddress).encodeABI();
await universalProfile.methods.execute(0, LSP26, 0, calldata).send({from: controller});
```
## 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 上构建的完整知识库 —— LUKSO 是面向创意经济、数字身份和全新社交标准的区块链。
## 速览要点
- **Chain ID**:42(主网)/ 4201(测试网)
- **原生代币**:LYX
- **共识机制**:权益证明(Proof of Stake,每个验证者 32 LYX)
- **EVM 兼容**:是,未经修改的以太坊执行层
- **独特之处**:使用通用配置文件(Universal Profiles,智能合约账户)而非 EOA
- **创始人**:Fabian Vogelsteller(同时也是 ERC-20 和 ERC-725 的创建者)
## 核心概念
LUKSO 通过 **LSP 标准**(LUKSO Standard Proposals)扩展以太坊,实现:
- **智能账户**(通用配置文件),内置权限、元数据和社交功能
- **灵活代币**(LSP7/LSP8),具备 `force` 参数和通用接收钩子等安全特性
- **无 gas 交易**,通过中继服务实现(LSP25)
- **链上社交图谱**,通过追随者系统实现(LSP26)
- **配置文件定制**,通过 The Grid 实现(LSP28)
## 架构概览
```
Universal Profile (LSP0/ERC725Account)
├── KeyManager (LSP6) — permission layer
│ ├── Controllers — addresses with specific permissions
│ └── Allowed calls/addresses — fine-grained access control
├── Profile Data (LSP3) — name, description, avatar, links
├── Universal Receiver (LSP1) — hooks for incoming transactions
├── Owned Assets (LSP5) — registry of tokens/NFTs owned
├── Issued Assets (LSP12) — registry of tokens/NFTs created
└── The Grid (LSP28) — customizable profile layout
```
## 参考文件
根据你的需求加载以下文件:
### 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 Follower System | `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` 权限但忘记为无 gas 交易授予 `EXECUTE_RELAY_CALL`。
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