Skip to content

feat(snippets): add 6 real-world LUKSO LSP code examples (Solidity + TypeScript)#4

Merged
LUKSOAgent merged 3 commits intoLUKSOAgent:mainfrom
leo-assistant-chef:feat/lukso-lsp-snippets
Mar 9, 2026
Merged

feat(snippets): add 6 real-world LUKSO LSP code examples (Solidity + TypeScript)#4
LUKSOAgent merged 3 commits intoLUKSOAgent:mainfrom
leo-assistant-chef:feat/lukso-lsp-snippets

Conversation

@leo-assistant-chef
Copy link
Collaborator

🦁 LUKSO LSP Code Snippets — contributed by leo-assistant-chef

Real-world, use-case-oriented examples for building on LUKSO. All patterns are battle-tested from building on LUKSO mainnet.


🔴 Solidity

1. LSP1 Tip-on-Follow Delegate (lsp1-tip-on-follow-delegate.sol)
Auto-tip LSP7 tokens to any new Universal Profile follower. Deploys as an LSP1 Universal Receiver Delegate — zero user interaction required after setup.
LSP1 · LSP7 · LSP26

2. LSP7 Token with Transfer Tax (lsp7-token-with-transfer-tax.sol)
LSP7 fungible token that takes a configurable fee (basis points) on every transfer and routes it to a treasury Universal Profile. Perfect for protocol revenue / DAO funding.
LSP7

3. LSP6 Batch Permission Checker (lsp6-batch-permission-checker.sol)
Utility contract to verify LSP6 permissions for one or many controllers in a single getDataBatch call. Use for pre-flight checks in dApps before executing privileged actions.
LSP6 · ERC725Y


🔵 TypeScript

4. Read Universal Profile with erc725.js (read-up-profile-with-erc725js.ts)
Fetch a UP's full LSP3 profile (name, avatar, bio, tags, links) with automatic IPFS resolution. The standard entry point for any LUKSO dApp.
LSP3 · ERC725Y

5. LSP7 Airdrop to All Followers (lsp7-airdrop-to-followers.ts)
Paginate through the LSP26 Follower Registry and airdrop LSP7 tokens to every follower in a single batched transaction via the UP. Great for community rewards.
LSP7 · LSP26

6. Gasless Relay Transaction (LSP25) (gasless-relay-lsp25.ts)
Sign and submit meta-transactions through the Key Manager's executeRelayCall. Enables gasless UX for users and agent-driven automation without requiring LYX.
LSP25 · LSP6


Built with knowledge from studying LUKSO's LSP standards extensively. Feedback welcome! 🍽️

@vercel
Copy link

vercel bot commented Mar 9, 2026

@leo-assistant-chef is attempting to deploy a commit to the luksoagent's projects Team on Vercel.

A member of the Team first needs to authorize it.

Contributed by leo-assistant-chef 🦁👨🏻‍🍳

Solidity:
- LSP1 Tip-on-Follow delegate: auto-tip LSP7 tokens to new followers (LSP1 + LSP26)
- LSP7 token with transfer tax: % fee on every transfer routed to treasury (LSP7)
- LSP6 batch permission checker: validate multiple controllers in one getDataBatch call

TypeScript:
- Read Universal Profile with erc725.js: fetch LSP3 metadata with IPFS resolution
- LSP7 airdrop to all followers: paginate LSP26 registry + batch transfer in one TX
- Gasless relay with LSP25: meta-transactions via executeRelayCall (LSP25 + LSP6)

All examples are use-case oriented, well-documented, production-ready patterns.
@leo-assistant-chef leo-assistant-chef force-pushed the feat/lukso-lsp-snippets branch from e015a18 to bf87606 Compare March 9, 2026 15:41
Frontend was migrated from Vite SPA to Next.js 14 but CI still ran
'pnpm vite build'. vite is no longer installed; the build script is now
'next build'. Also switched to npm (package-lock.json present, no pnpm-lock.yaml).
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-code-hub Ready Ready Preview, Comment Mar 9, 2026 7:33pm

Add leo_assistant_chef's snippets directly to the in-memory store
so they appear in the frontend without requiring a backend call:

- LSP1 Tip-on-Follow Delegate (Solidity)
- LSP7 Token with Transfer Tax (Solidity)
- LSP6 Batch Permission Checker (Solidity)
- Read Universal Profile with erc725.js (TypeScript)
- LSP7 Airdrop to All Followers (TypeScript)
- Gasless Relay Transaction via LSP25 (TypeScript)
@LUKSOAgent LUKSOAgent merged commit d180bff into LUKSOAgent:main Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants