| name | alchemy-core-workflow-b |
| description | Build NFT collection explorer and smart contract interaction with Alchemy.
Use when fetching NFT metadata, building galleries, reading contract state,
or implementing NFT marketplace features.
Trigger: "alchemy NFT", "alchemy smart contract", "alchemy collection",
"alchemy NFT metadata", "alchemy contract read".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","blockchain","web3","alchemy","nft","smart-contracts"] |
| compatibility | Designed for Claude Code |
Alchemy Core Workflow B — NFT & Smart Contract Interaction
Overview
Build NFT collection explorers and smart contract read operations using Alchemy's NFT API and core JSON-RPC methods.
Prerequisites
- Completed
alchemy-install-auth setup
- Familiarity with
alchemy-core-workflow-a
- Understanding of ERC-721 and ERC-1155 standards
Instructions
Step 1: NFT Collection Explorer
import { Alchemy, Network } from 'alchemy-sdk';
const alchemy = new Alchemy({
apiKey: process.env.ALCHEMY_API_KEY,
network: Network.ETH_MAINNET,
});
async function exploreCollection(contractAddress: string) {
const metadata = await alchemy.nft.getContractMetadata(contractAddress);
return {
address: contractAddress,
name: metadata.name || 'Unknown',
symbol: metadata.symbol || '',
totalSupply: metadata.totalSupply || '0',
tokenType: metadata.tokenType,
floorPrice: metadata.openSeaMetadata?.floorPrice || ,
: metadata.?. || ,
: metadata.?. || ,
};
}
() {
response = alchemy..(contractAddress, { limit });
response..( ({
: nft.,
: nft. || ,
: nft.,
: nft.?. || nft.?.,
: nft.?.?. || [],
}));
}
= ;
().(.).(.);