Frontend Minting and Integration Flashcards
7 cards from real NFT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Frontend Minting and Integration flashcards as text
What advantage does a library like wagmi or RainbowKit provide over raw window.ethereum calls in a React NFT app?
Answer: Hooks and connectors that manage wallet state, caching, and multiple wallet types
wagmi/RainbowKit abstract connection logic, caching, and multi-wallet support into reusable React hooks.
Why is hardcoding a contract ABI's full source unnecessary, and a minimal 'human-readable ABI' often sufficient on the frontend?
Answer: Only the function and event signatures the app calls are needed to encode/decode calls
The frontend only needs the signatures of the functions and events it interacts with to encode calls.
What is a key reason to never embed a private key in frontend JavaScript for signing mint transactions?
Answer: Frontend code is public, so the key would be exposed and funds stolen
Client-side code is fully visible to users, so any embedded private key would be immediately compromised.
When polling for a newly minted NFT to appear in a user's gallery, why add a short delay or retry after confirmation?
Answer: Indexers and metadata gateways may need time to reflect the new token
Off-chain indexers and gateways can lag the chain, so a retry handles eventual consistency.
What does setting up an event listener with contract.on('Transfer', ...) enable in a live minting UI?
Answer: Real-time updates as mints happen, including the live supply count
Subscribing to Transfer events lets the UI update supply and activity in real time without polling.
Why should a public sale frontend read 'totalSupply' and 'maxSupply' from the contract rather than trusting a hardcoded number?
Answer: To accurately show remaining mints and prevent attempts after sellout
Reading live supply values keeps the UI accurate and stops users from minting past the cap.
What is the benefit of using a dedicated RPC provider (e.g., Alchemy/Infura) for read calls instead of relying only on the injected wallet provider?
Answer: Higher reliability and rate limits for data reads independent of the user's wallet
Dedicated RPC providers offer reliable, higher-throughput reads decoupled from the user's wallet connection.