feat(snippets): add 6 real-world LUKSO LSP code examples (Solidity + TypeScript)#4
Merged
LUKSOAgent merged 3 commits intoLUKSOAgent:mainfrom Mar 9, 2026
Conversation
|
@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.
e015a18 to
bf87606
Compare
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🦁 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 · LSP262. 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.
LSP73. LSP6 Batch Permission Checker (
lsp6-batch-permission-checker.sol)Utility contract to verify LSP6 permissions for one or many controllers in a single
getDataBatchcall. 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 · ERC725Y5. 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 · LSP266. 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 · LSP6Built with knowledge from studying LUKSO's LSP standards extensively. Feedback welcome! 🍽️