nft-blockchain
Skill4 starsChanged 10 days agoApache-2.0View on GitHub
NFTs and Web3 in Decentraland scenes: NftShape picture frames, wallet and token-gating checks, MANA/ERC20/NFT payments and marketplace orders (dcl-crypto-toolkit), and smart-contract calls (eth-connect). Use for anything wallet, token or chain related.
- Installs packages
In this repository37 other files it gives its agents.
- add-3d-modelsSkill
- add-interactivitySkill
- advanced-inputSkill
- advanced-renderingSkill
- animations-tweensSkill
- audio-analysisSkill
- audio-videoSkill
- authoritative-serverSkill
- avatar-animationsSkill
- build-uiSkill
- camera-controlSkill
- compositesSkill
- create-sceneSkill
- creator-hub-mcpSkill
- dcl-gddSkill
- dcl-prototypeSkill
- deploy-sceneSkill
- deploy-worldsSkill
- fontsSkill
- lighting-environmentSkill
- migrate-sdk6-to-sdk7Skill
- multiplayer-syncSkill
- npcsSkill
- optimize-sceneSkill
- particle-systemSkill
- player-avatarSkill
- player-physicsSkill
- promote-sceneSkill
- report-sdk-issueSkill
- scene-feedbackSkill
- scene-retroSkill
- scene-runtimeSkill
- script-componentsSkill
- sdk-scenesSkill
- smart-wearablesSkill
- unity-explorer-mcpSkill
- wearablesSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Use getPlayer() from @dcl/sdk/src/players to get the player's Ethereum address via player.userId.
- Very specific: line 39
Use requestManager.eth_gasPrice() and requestManager.eth_getBalance() from eth-connect to check current gas prices and account ETH balances …
- Very specific: line 43
Use sendAsync from ~system/EthereumController for low-level Ethereum RPC calls not covered by eth-connect helpers …
- Very specific: line 61
Import: import * as crypto from 'dcl-crypto-toolkit'.
- Very specific: line 67
By NFT ownership: Use crypto.nft.checkTokens(contractAddress, tokenIds?) — returns whether the player holds tokens of that contract.
- Very specific: line 69
By MANA balance: Check crypto.mana.myBalance() (or crypto.currency.balance(contractAddress, address) for other ERC20 tokens) to gate access …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NFT and Blockchain in Decentraland
Display NFT Artwork
Use NftShape to show an NFT in a decorative picture frame. Provide the NFT URN and choose a frame style. The image is loaded automatically from the NFT's metadata (fetched through Decentraland's OpenSea proxy, opensea.decentraland.org) — any NFT that OpenSea supports can be displayed, across multiple chains.
NFT URN format: urn:decentraland:<chain>:<contractStandard>:<contractAddress>:<tokenId>
- Example:
urn:decentraland:ethereum:erc721:0x06012c8cf97bead5deae237070f9587f8e7a266d:558536 <chain>supported values (forwarded verbatim to the OpenSea v2 API; unrecognized chains are rejected):ethereum,matic,klaytn,bsc,arbitrum,arbitrum_nova,avalanche,optimism,solana,base,blast,zora.<contractStandard>is typicallyerc721. The image is served from the OpenSea response, so contracts OpenSea indexes aserc1155also resolve.
Frame styles: NftFrameType.* (classic, baroque, gold, metal, wood, minimal, pins, tape, canvas, none…). Code and the full enum: {baseDir}/references/blockchain-patterns.md → Display NFT.
Check Player Wallet
Use getPlayer() from @dcl/sdk/src/players to get the player's Ethereum address via player.userId. Always check isGuest before any blockchain interaction -- guest players don't have a connected wallet. Code: {baseDir}/references/blockchain-patterns.md → Check Player Wallet.
Signed Requests
Authenticated backend calls: signedFetch / getHeaders (scene-runtime → HTTP). A POST-and-parse example: {baseDir}/references/blockchain-patterns.md → Signed Requests.
Smart Contract Interaction
For direct smart contract calls, use eth-connect with createEthereumProvider from @dcl/sdk/ethereum-provider. Store ABIs in separate files, create a contract instance via ContractFactory, then call read (no gas) or write (requires gas, prompts user to sign) functions. Code: {baseDir}/references/blockchain-patterns.md → Smart Contracts (setup, write, read).
npm install eth-connectWrap all async blockchain calls in executeTask(async () => { ... }) with a try/catch: the player can reject, gas can run short, the network can fail.
Gas Price and Balance
Use requestManager.eth_gasPrice() and requestManager.eth_getBalance() from eth-connect to check current gas prices and account ETH balances ({baseDir}/references/blockchain-patterns.md → Gas Price and Balance).
Custom RPC Calls
Use sendAsync from ~system/EthereumController for low-level Ethereum RPC calls not covered by eth-connect helpers ({baseDir}/references/blockchain-patterns.md → Custom RPC Calls).
Opening External URLs / NFT Dialogs
openExternalUrl and openNftDialog are restricted actions (scene-runtime → Restricted Actions).
Testing with Sepolia
Develop against the Sepolia testnet: set MetaMask to Sepolia, get test ETH from a faucet, and deploy contracts to Sepolia. Contract addresses differ between mainnet and Sepolia.
dcl-crypto-toolkit (Higher-Level API)
For common blockchain operations, use dcl-crypto-toolkit instead of raw eth-connect. It provides a cleaner API for the most frequent tasks.
npm install dcl-crypto-toolkitImport: import * as crypto from 'dcl-crypto-toolkit'. Modules: ethereum, mana, currency, nft, marketplace, services, wearable, contract. There is NO top-level crypto.signMessage.
Code for every row below: {baseDir}/references/blockchain-patterns.md → dcl-crypto-toolkit Examples.
Token Gating
By NFT ownership: Use crypto.nft.checkTokens(contractAddress, tokenIds?) — returns whether the player holds tokens of that contract. Omit tokenIds to check any token of the contract. Grant or deny access on the result. Code: {baseDir}/references/blockchain-patterns.md → Token Gating Patterns.
By MANA balance: Check crypto.mana.myBalance() (or crypto.currency.balance(contractAddress, address) for other ERC20 tokens) to gate access based on holdings.
Keep a free path. A paid or gated area sits beside free gameplay, and a free area shows what the paid one offers; paid upgrades add to the game rather than unlock it.
Quick Decision Guide
| Task | Use |
| Send MANA | crypto.mana.send() |
| Check own MANA balance | crypto.mana.myBalance() |
| Check any address's MANA balance | crypto.mana.balance(address) |
| Send any ERC20 token | crypto.currency.send() |
| Check ERC20 balance | crypto.currency.balance(contract, address) |
| ERC20 allowance | crypto.currency.* (check / set allowance) |
| Transfer an NFT, manage approvals | crypto.nft.transfer(), crypto.nft.* |
| Check NFT ownership / token gating | crypto.nft.checkTokens() |
| Buy from marketplace | crypto.marketplace.executeOrder() |
| List NFT for sale | crypto.marketplace.createOrder() |
| Cancel a listing, check authorization | crypto.marketplace.cancelOrder(), crypto.marketplace.* |
| Sign a message (EIP-712 typed data with the player's wallet) | crypto.ethereum.signMessageAdvanced() |
| Custom smart contract | eth-connect (see above) |
| Authenticated API call | signedFetch (scene-runtime) |
| Tip jar | {baseDir}/references/blockchain-patterns.md → Recipes |
Example scenes
Engine-team test scenes exercising these APIs against the real runtime:
- https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/5,90-scene-bounds-check —
NftShape.create()with a liveurn:decentraland:ethereum:erc721:<contract>:<tokenId>URN, mounted on a moving platform that carries it across the parcel boundary (so it also shows an NFT frame being culled out of bounds). - https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/80,-4-restricted-actions —
openNftDialog({ urn })andopenExternalUrldriven from React-ECS buttons, alongside every other RestrictedAction. Scenes need norequiredPermissionsfor either (that field only gates smart wearables). - https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/66,6-signed-fetch —
signedFetchon click; readsresponse.ok/.status/.bodyand inspects the auto-added signature headers; no permission needed in a scene.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

