Unit 2: Blockchain application templates - Practice Quiz

CSC307 — Blockchain Architecture And Design-I 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is a blockchain application template primarily used for?

introduction to blockchain and application templates Easy
A. Replacing the need for any programming
B. Providing a pre-built starting structure for building blockchain apps
C. Mining new cryptocurrency blocks automatically
D. Encrypting a user's hard drive

2 A blockchain is best described as a:

introduction to blockchain and application templates Easy
A. Distributed, append-only ledger of records
B. Standard spreadsheet file
C. Local web browser cache
D. Single centralized database server

3 Which statement best explains an application template?

explanation of application templates Easy
A. A reusable blueprint with boilerplate code and configuration
B. A consensus algorithm
C. A finished product that cannot be modified
D. A type of cryptocurrency wallet

4 What does boilerplate code in a template refer to?

explanation of application templates Easy
A. Standard reusable code included by default
B. Network mining rewards
C. Encrypted private keys
D. Code that must always be deleted

5 Which is a key benefit of using blockchain application templates?

benefits and use cases Easy
A. Removal of the need for testing
B. Elimination of all security concerns
C. Faster development through reusable components
D. Guaranteed infinite transaction speed

6 Which of the following is a common use case for blockchain applications?

benefits and use cases Easy
A. Supply chain tracking
B. Editing photos offline
C. Formatting a hard disk
D. Printing paper documents

7 How do templates help maintain consistency across projects?

benefits and use cases Easy
A. By disabling version control
B. By randomizing file names
C. By enforcing standard structure and conventions
D. By hiding all source code permanently

8 Which framework is commonly used as a template base for Ethereum smart contract projects?

examples of popular blockchain application templates Easy
A. Truffle
B. Notepad
C. Microsoft Excel
D. Photoshop

9 Which of these is an example of a popular smart contract programming language used in templates?

examples of popular blockchain application templates Easy
A. Solidity
B. CSS
C. SQL
D. HTML

10 A DApp template typically helps developers build what kind of application?

examples of popular blockchain application templates Easy
A. A spreadsheet macro
B. A printer driver
C. A decentralized application
D. A single-user desktop game

11 What is the first step in setting up a blockchain development environment?

setting up development environment Easy
A. Selling cryptocurrency
B. Installing the required tools and software
C. Deleting the operating system
D. Deploying to the main network immediately

12 Which runtime is commonly required to run tools like Truffle?

setting up development environment Easy
A. Adobe Reader
B. Microsoft Word
C. VLC Player
D. Node.js

13 Why is a code editor like VS Code useful in a development environment?

setting up development environment Easy
A. For mining blocks faster
B. For storing private keys securely
C. For generating random passwords
D. For writing and editing smart contract code

14 What does a local blockchain environment allow developers to do?

setting up blockchain environment Easy
A. Test applications without using the real network
B. Permanently store files for free
C. Automatically earn real money
D. Replace the internet connection

15 Which tool provides a personal local Ethereum blockchain for testing?

setting up blockchain environment Easy
A. Chrome
B. Gmail
C. Ganache
D. Zoom

16 What is MetaMask primarily used as?

installing necessary software (e.g., Ganache, Truffle, Metamask) Easy
A. A browser-based cryptocurrency wallet
B. A smart contract compiler
C. A video editing tool
D. A database server

17 Which command is commonly used to install Truffle globally?

installing necessary software (e.g., Ganache, Truffle, Metamask) Easy
A. apt get truffle
B. npm install -g truffle
C. pip install truffle
D. truffle download now

18 Ganache is often provided in which two forms?

installing necessary software (e.g., Ganache, Truffle, Metamask) Easy
A. A spreadsheet and a slideshow
B. A desktop app and a command-line tool
C. A printer and a scanner
D. A game and a movie

19 In Truffle, which file is typically used to configure networks?

configuring blockchain development networks Easy
A. styles.css
B. readme.txt
C. index.html
D. truffle-config.js

20 When connecting MetaMask to a local Ganache network, which detail must usually match?

configuring blockchain development networks Easy
A. The RPC URL and network ID
B. The keyboard language
C. The screen resolution
D. The user's email address

21 A developer wants to quickly build a token-based crowdfunding dApp without writing every smart contract from scratch. Which approach best fits the concept of a blockchain application template?

introduction to blockchain and application templates Medium
A. Starting with a pre-built, reusable project scaffold that already includes common contract patterns and configuration
B. Manually mining each block on the mainnet to validate the design
C. Writing a brand new consensus algorithm before beginning development
D. Deploying raw bytecode directly without any development framework

22 Why does blockchain's property of immutability make the use of tested application templates especially valuable?

introduction to blockchain and application templates Medium
A. Because deployed contract code is hard to change, so starting from vetted templates reduces costly post-deployment bugs
B. Because immutability automatically fixes bugs after deployment
C. Because immutability removes the need to test code before launch
D. Because templates allow blocks to be rewritten freely once mined

23 A template provides placeholders for token name, symbol, and total supply that a developer fills in. What software engineering concept does this most directly demonstrate?

explanation of application templates Medium
A. Hash collision resolution
B. Proof-of-work consensus
C. Parameterization of reusable code
D. Peer-to-peer gossip propagation

24 Which statement best distinguishes a blockchain application template from a library?

explanation of application templates Medium
A. There is no difference; the terms are fully interchangeable
B. A template cannot contain any smart contract code, but a library always does
C. A template is a full starting project structure you customize, while a library is reusable code you import into your project
D. A library provides a complete runnable project, while a template is only a single function

25 A startup must ship a supply-chain tracking dApp under a tight deadline with a small team. Which benefit of application templates is most relevant to this situation?

benefits and use cases Medium
A. Removal of the need for any form of testing
B. Faster time-to-market through reduced boilerplate development
C. Automatic conversion of the dApp into a centralized database
D. Guaranteed elimination of all gas fees on deployment

26 Which scenario is the least appropriate use case for adopting a generic off-the-shelf blockchain application template without modification?

benefits and use cases Medium
A. A basic multi-signature wallet
B. A highly specialized protocol with novel cryptographic requirements not covered by existing patterns
C. A simple NFT minting collection
D. A standard ERC-20 fungible token launch

27 How do standardized templates (such as those following ERC standards) improve interoperability across the ecosystem?

benefits and use cases Medium
A. They disable external calls between contracts entirely
B. They prevent any other contract from interacting with the deployed code
C. They ensure contracts expose common interfaces that wallets and exchanges already understand
D. They force all tokens to share a single global balance

28 A developer imports audited ERC-721 base contracts to build an NFT marketplace. Which widely used library of contract templates are they most likely relying on?

examples of popular blockchain application templates Medium
A. MetaMask Extension
B. OpenZeppelin Contracts
C. Ganache CLI
D. Infura RPC

29 Which pairing of a popular template type with its typical use case is correct?

examples of popular blockchain application templates Medium
A. DAO governance template → disabling all voting mechanisms
B. ERC-20 template → fungible token / cryptocurrency
C. Multisig wallet template → single-owner key custody only
D. ERC-721 template → fungible stablecoin issuance

30 A team wants a ready-made full-stack starter that wires together smart contracts, a React front end, and deployment scripts so they can prototype quickly. Which category of template fits best?

examples of popular blockchain application templates Medium
A. A standalone block explorer
B. A dApp boilerplate / starter kit
C. A standalone mining pool configuration
D. A hardware wallet firmware image

31 Before installing most Ethereum development tools like Truffle, which runtime must typically be present on the system?

setting up development environment Medium
A. A full Bitcoin Core node
B. A relational database server
C. Node.js and its package manager npm
D. A compiled C++ graphics driver

32 A developer runs npm install -g truffle and later wants the install to affect only one project instead of the whole machine. What is the key difference they should understand?

setting up development environment Medium
A. The -g flag installs globally for all projects, while omitting it installs locally into the current project
B. The -g flag downloads source code but never installs it
C. Omitting -g uninstalls the package from every project
D. The -g flag installs the package only inside the current folder

33 Why is using a version manager and consistent tool versions recommended when setting up a blockchain development environment for a team?

setting up development environment Medium
A. It reduces "works on my machine" issues caused by mismatched compiler and tool versions
B. It automatically audits all smart contracts for security
C. It replaces the need for any source control system
D. It guarantees that gas fees drop to zero on mainnet

34 A developer wants to test contract deployment repeatedly without spending real ETH or waiting for block times. What type of blockchain environment should they set up first?

setting up blockchain environment Medium
A. The Ethereum mainnet
B. A public block explorer archive node
C. A hardware wallet cold-storage vault
D. A local development blockchain

35 What is the main advantage of a local blockchain environment deterministically generating the same set of accounts and private keys on each startup (e.g., via a fixed mnemonic)?

setting up blockchain environment Medium
A. It increases the real monetary value of the test ETH
B. Reproducible test setups where scripts and wallets can rely on known addresses
C. It permanently stores transactions after the process stops
D. It makes those keys secure enough to use on mainnet

36 A test network like Sepolia differs from a local Ganache chain primarily in that it:

setting up blockchain environment Medium
A. Cannot be used to deploy smart contracts at all
B. Is a shared public testnet with real network latency and block times, using valueless test ETH
C. Charges real monetary gas fees in production ETH
D. Runs entirely offline on the developer's own machine

37 In a typical Ethereum development stack, which tool is primarily responsible for compiling, migrating, and testing smart contracts?

installing necessary software (e.g., Ganache, Truffle, Metamask) Medium
A. MetaMask
B. Etherscan
C. Truffle
D. Ganache

38 A developer has installed Ganache, Truffle, and MetaMask. Which tool acts as the browser-based wallet that signs transactions and connects a dApp front end to the blockchain?

installing necessary software (e.g., Ganache, Truffle, Metamask) Medium
A. Solidity compiler
B. Ganache
C. Truffle
D. MetaMask

39 What is the core role of Ganache in a local development workflow where it quickly spins up a personal Ethereum blockchain with ten pre-funded accounts, instant mining, and a full transaction log for debugging?

installing necessary software (e.g., Ganache, Truffle, Metamask) Medium
A. It is the primary Solidity source-code editor
B. It serves as the production mainnet validator client
C. It is a hardware device for cold key storage
D. It provides a local in-memory/personal blockchain for testing

40 To connect MetaMask to a local Ganache instance running on the default port, which configuration value must the custom network's RPC URL typically point to?

configuring blockchain development networks Medium
A. ftp://localhost:21
B. https://mainnet.ethereum.org
C. http://127.0.0.1:7545
D. http://127.0.0.1:3306

41 A developer configures Truffle's networks entry for Ganache with network_id: "5777" but Ganache is running with network id 1337. Migrations fail. Which change correctly resolves the mismatch while preserving strict network targeting?

configuring blockchain development networks Hard
A. Set network_id: "*" so Truffle accepts any id and bypasses validation entirely
B. Restart Ganache with --chainId 5777 which also overrides the network id field
C. Delete the network_id key so Truffle auto-detects by querying net_version
D. Change the Truffle network_id to 1337 to match Ganache's configured chain id

42 When installing Truffle globally with npm install -g truffle, a developer sees EACCES permission errors on Linux. Which solution avoids the error without introducing system-wide security risks?

installing necessary software (e.g., Ganache, Truffle, Metamask) Hard
A. Install Truffle inside node_modules of the OS root filesystem manually
B. Run the install command with sudo so npm can write to protected global directories
C. Reconfigure npm's global prefix to a user-owned directory and update PATH
D. Change ownership of /usr/lib/node_modules to root:root recursively

43 A team runs Ganache CLI with --deterministic. What is the primary consequence they must account for when sharing this configuration across developers?

setting up blockchain environment Hard
A. Gas prices are locked to zero, disabling all fee-related testing scenarios
B. Block times become fixed at seconds to mimic Ethereum mainnet precisely
C. All developers derive identical accounts and private keys, which must never be reused on mainnet
D. Each developer gets a unique random mnemonic that must be exchanged securely

44 An application template exposes configurable parameters for token supply, decimals, and mint authority. Why is a template with a hard-coded decimals = 18 and an externally settable totalSupply considered more composable than one hard-coding both?

explanation of application templates Hard
A. Hard-coding supply guarantees deflation, which all DeFi protocols require by default
B. Variable decimals reduce storage costs by allowing smaller integer types for balances
C. A fixed decimals standardizes value representation while a variable supply adapts to each deployment's economics
D. Fixing decimals breaks ERC-20 compliance, forcing custom integrations that increase flexibility

45 A Truffle project passes tests under truffle develop but fails against Ganache GUI with invalid opcode. The contract uses a Solidity feature introduced in a later EVM version. What is the most likely root cause?

setting up development environment Hard
A. The Ganache GUI mnemonic differs, causing deployment to a stale contract address
B. Truffle develop silently disables assertions that Ganache GUI enforces strictly
C. Ganache GUI uses a lower default gas limit than the built-in truffle develop chain
D. The evmVersion compiler setting targets an opcode the Ganache GUI's EVM does not support

46 MetaMask shows a nonce-too-high error after a developer resets their local Ganache chain mid-session. Which action correctly realigns MetaMask's transaction state?

installing necessary software (e.g., Ganache, Truffle, Metamask) Hard
A. Reinstall MetaMask to clear its cached provider and reconnect to the node
B. Reset the account's transaction history/nonce in MetaMask's advanced settings
C. Increase the gas price so the pending transaction overrides the stale nonce
D. Switch MetaMask to a different RPC URL then back to force a nonce refresh

47 A supply-chain consortium evaluates a blockchain template emphasizing immutability. Which scenario is the strongest argument AGAINST relying solely on on-chain immutability for their records?

benefits and use cases Hard
A. Immutable ledgers cannot store timestamps, breaking audit trail requirements
B. Erroneous or regulation-sensitive data (e.g., GDPR right-to-erasure) cannot be removed once committed
C. Immutability prevents multiple parties from reading the same record simultaneously
D. Immutable records increase storage costs, so off-chain databases are always cheaper

48 Comparing OpenZeppelin's ERC-721 template to a from-scratch NFT contract, which benefit is MOST specific to using the audited template rather than general code reuse?

examples of popular blockchain application templates Hard
A. It inherits community-reviewed implementations of security-critical hooks like _beforeTokenTransfer
B. It automatically lowers deployment gas costs below any custom implementation
C. It removes the need to specify a Solidity compiler version in the project
D. It guarantees the NFT metadata will render correctly on all marketplaces

49 A truffle-config.js defines a fork network using --fork of mainnet at a specific block. A test reading a Chainlink price feed returns stale data. What correctly explains this?

configuring blockchain development networks Hard
A. The fork resets oracle contracts to zero balances, invalidating their responses
B. The fork snapshots mainnet state at the pinned block, so the feed reflects that historical price
C. Forking disables all external contract calls, so the feed returns its default value
D. Chainlink feeds require a mainnet-only RPC and cannot be read on forks at all

50 Why does using a well-defined application template reduce the attack surface of a dApp more effectively than ad-hoc development, even when both pass unit tests?

introduction to blockchain and application templates Hard
A. Templates encode vetted patterns and invariants that unit tests alone may not exercise
B. Templates run on separate chains that are isolated from attacker transactions
C. Templates disable the delegatecall opcode, preventing all proxy-based exploits
D. Templates compile to smaller bytecode, mathematically eliminating overflow bugs

51 Two global tools, Truffle v5 and a plugin requiring web3@1.x, conflict with a project needing web3@4.x. What is the cleanest resolution?

installing necessary software (e.g., Ganache, Truffle, Metamask) Hard
A. Use project-local (non-global) dependency installation so each project pins its own web3
B. Upgrade the global Truffle so its bundled web3 overrides the project's version
C. Downgrade the project to web3@1.x to match the globally installed Truffle
D. Install both web3 versions globally and alias one via a shell environment variable

52 A developer sets Ganache gasLimit to but a deployment reverts with 'out of gas' despite the transaction requesting less. Which subtle cause best explains this?

setting up blockchain environment Hard
A. The block gas limit caps the sum of all transactions, exceeded by concurrent deploys
B. The RPC strips the gas field, forcing a default of for contract creation
C. Ganache rounds the gas limit down to the nearest power of two internally
D. Constructor logic consumes more gas than estimated due to dynamic storage writes

53 A proxy-upgradeable template separates logic and storage contracts. Why must the logic contract avoid declaring state variables in a different order than the storage layout expects after an upgrade?

explanation of application templates Hard
A. Solidity recompiles the proxy, which erases all prior state on reorder
B. Mismatched storage slots cause the new logic to read/write corrupted state
C. Reordering increases deployment cost beyond the block gas limit automatically
D. The proxy forbids any new variables, so order is the only permitted change

54 To test EIP-155 replay protection, a developer must ensure signed transactions include the chain id. In Ganache, which configuration pair must be consistent for signatures to validate correctly?

configuring blockchain development networks Hard
A. The RPC port and websocket port must be identical for signature parity
B. The gasPrice and blockTime must both be set to non-zero values
C. The networkId and the account mnemonic must share the same numeric seed
D. The chainId used for signing must match the node's configured chainId

55 A fintech evaluates a permissioned blockchain template versus a traditional replicated database for interbank settlement. Which factor MOST justifies the blockchain template despite its overhead?

benefits and use cases Hard
A. It enables shared, tamper-evident state among mutually distrusting parties without a single trusted operator
B. It provides unlimited transaction throughput exceeding any database system
C. It removes the need for any legal agreements between participating banks
D. It guarantees sub-millisecond finality superior to centralized clearinghouses

56 In a Truffle project, migrations run in numeric order and a later migration depends on an earlier contract's address. Why can hard-coding that address break the setup across environments?

setting up development environment Hard
A. Migrations ignore numeric order, so dependency addresses are random each run
B. Addresses are environment-specific; a redeploy on another network yields a different address
C. Hard-coded addresses exceed the -byte limit and overflow in testnets
D. Truffle encrypts addresses per environment, making literals unreadable elsewhere

57 A DAO governance template uses a token-weighted voting module. Which edge case most threatens its integrity and must be mitigated in the template design?

examples of popular blockchain application templates Hard
A. Proposals expire instantly, preventing any vote from being recorded on-chain
B. Voters holding zero tokens can still submit proposals, flooding the queue
C. Flash-loan borrowing of governance tokens within a single block to swing a vote
D. Token transfers automatically double-count votes for both sender and receiver

58 A developer adds a custom network to MetaMask pointing at Ganache but transactions silently fail to broadcast. The RPC URL and chain id are correct. Which overlooked setting is the most probable culprit?

installing necessary software (e.g., Ganache, Truffle, Metamask) Hard
A. MetaMask requires an ENS resolver address for any custom network to send transactions
B. The network's currency symbol field was left blank, blocking all signing
C. The MetaMask account was imported with a mismatched private key from Ganache
D. MetaMask caps custom networks to chain ids below , rejecting Ganache's id

59 Why is a 'template' in blockchain development conceptually closer to an inheritable base contract than to a copy-paste snippet, in terms of maintainability?

introduction to blockchain and application templates Hard
A. Snippets execute faster at runtime because they avoid virtual function dispatch
B. Base contracts hide bugs, whereas snippets expose them during compilation
C. Inheritance lets upstream security fixes propagate to all derived contracts on recompile
D. Templates can only be used once per project, enforcing clean architecture

60 A CI pipeline spins up Ganache fresh for each test suite, but intermittent failures occur when tests rely on block.timestamp for time-locked logic. What is the most robust fix within the test environment?

setting up blockchain environment Hard
A. Pin the system clock of the CI runner to a fixed date for all suites
B. Disable all time-based logic in contracts before running the CI tests
C. Add fixed sleep delays between tests so real time matches the lock period
D. Use Ganache's time-manipulation RPC (e.g., evm_increaseTime) to deterministically advance time