Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Introduction to Truffle and smart contracts development

CSC307 — Blockchain Architecture And Design-I 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 overview of Truffle framework Easy

    What is Truffle primarily used for in blockchain development?

  2. Question 2 of 60 overview of Truffle framework Easy

    Which programming language is Truffle itself built on and run with?

  3. Question 3 of 60 overview of Truffle framework Easy

    Which command is commonly used to install Truffle globally?

  4. Question 4 of 60 overview of Truffle framework Easy

    In a Truffle project, which configuration file stores network and compiler settings?

  5. Question 5 of 60 overview of Truffle framework Easy

    Which Truffle command initializes a new, empty project structure?

  6. Question 6 of 60 creating a simple smart contract Easy

    Which programming language is most commonly used to write Ethereum smart contracts?

  7. Question 7 of 60 creating a simple smart contract Easy

    What is the typical file extension for a Solidity smart contract?

  8. Question 8 of 60 creating a simple smart contract Easy

    Which keyword is used to declare a smart contract in Solidity?

  9. Question 9 of 60 creating a simple smart contract Easy

    Which statement declares the Solidity compiler version in a contract?

  10. Question 10 of 60 creating a simple smart contract Easy

    In which folder of a Truffle project are smart contract source files placed?

  11. Question 11 of 60 compiling and deploying smart contracts Easy

    Which Truffle command compiles the smart contracts in a project?

  12. Question 12 of 60 compiling and deploying smart contracts Easy

    Which Truffle command deploys contracts to a configured network?

  13. Question 13 of 60 compiling and deploying smart contracts Easy

    What is produced when a Solidity contract is compiled?

  14. Question 14 of 60 compiling and deploying smart contracts Easy

    In which folder are the migration scripts stored in a Truffle project?

  15. Question 15 of 60 compiling and deploying smart contracts Easy

    What does ABI stand for in the context of smart contracts?

  16. Question 16 of 60 using application templates Easy

    What is the main benefit of using an application template (box) in Truffle?

  17. Question 17 of 60 using application templates Easy

    What are reusable Truffle project templates commonly called?

  18. Question 18 of 60 overview of popular blockchain application templates Easy

    Which command is used to download a Truffle Box template into a project?

  19. Question 19 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Easy

    Which blockchain platform is known for being permissioned and enterprise-focused?

  20. Question 20 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Easy

    Which platform is a public blockchain that popularized smart contracts using Solidity?

  21. Question 21 of 60 overview of Truffle framework Medium

    A developer wants a single toolset that handles smart contract compilation, automated testing, and scriptable deployment for Ethereum. Which role does the Truffle framework primarily serve?

  22. Question 22 of 60 overview of Truffle framework Medium

    In a Truffle project, which configuration file is used to define networks, compiler versions, and deployment settings?

  23. Question 23 of 60 overview of Truffle framework Medium

    A team wants a local in-memory blockchain to test contracts quickly without spending real ETH. Which tool in the Truffle ecosystem is designed for this?

  24. Question 24 of 60 overview of Truffle framework Medium

    Which Truffle command would a developer use to scaffold a new project using a predefined Truffle Box template?

  25. Question 25 of 60 creating a simple smart contract Medium

    In which directory of a standard Truffle project should Solidity source files (.sol) be placed?

  26. Question 26 of 60 creating a simple smart contract Medium

    A simple contract begins with pragma solidity ^0.8.0;. What does the caret (^) in the version pragma indicate?

  27. Question 27 of 60 creating a simple smart contract Medium

    Consider a state variable declared as uint256 public count; in a Solidity contract. What does the public keyword automatically provide?

  28. Question 28 of 60 creating a simple smart contract Medium

    A developer writes a function intended to receive Ether directly. Which function modifier must be included for the function to accept ETH?

  29. Question 29 of 60 compiling and deploying smart contracts Medium

    After running truffle compile, where does Truffle place the resulting contract artifacts (ABI and bytecode)?

  30. Question 30 of 60 compiling and deploying smart contracts Medium

    Which command deploys contracts to a configured network by running the scripts in the migrations/ folder?

  31. Question 31 of 60 compiling and deploying smart contracts Medium

    A migration script contains deployer.deploy(MyContract, 100);. What does the value 100 represent?

  32. Question 32 of 60 compiling and deploying smart contracts Medium

    A developer runs truffle migrate a second time without changes and notices contracts are not redeployed. Which flag forces all migrations to run again from the beginning?

  33. Question 33 of 60 compiling and deploying smart contracts Medium

    Why does deploying a smart contract to a public Ethereum network require gas, while compiling it locally does not?

  34. Question 34 of 60 using application templates Medium

    What is the primary advantage of starting a dApp from a Truffle Box rather than an empty project?

  35. Question 35 of 60 using application templates Medium

    A developer unboxes the react Truffle Box. Which combination of concerns does this template typically address out of the box?

  36. Question 36 of 60 using application templates Medium

    When choosing an application template for a new project, which factor is MOST important to evaluate first?

  37. Question 37 of 60 overview of popular blockchain application templates Medium

    An enterprise consortium needs a permissioned blockchain where participant identities are known and controlled. Which platform's templates are most appropriate?

  38. Question 38 of 60 overview of popular blockchain application templates Medium

    Which characteristic distinguishes an ERC-20 token template from an ERC-721 token template?

  39. Question 39 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Medium

    A key difference between Ethereum and Hyperledger Fabric templates is their approach to data visibility. Which statement is correct?

  40. Question 40 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Medium

    On which platform are smart contracts commonly called "chaincode" and written in general-purpose languages like Go or Java?

  41. Question 41 of 60 overview of Truffle framework Hard

    In a Truffle project, a developer sets networks in truffle-config.js with network_id: "*" for the development network. What is the precise consequence of using the wildcard versus a fixed numeric id?

  42. Question 42 of 60 overview of Truffle framework Hard

    A team wants deterministic, repeatable deployments where migration state is persisted on-chain. Which Truffle mechanism records which migrations have already run?

  43. Question 43 of 60 creating a simple smart contract Hard

    Given a Solidity contract with uint8 public counter; incremented in a loop, at what value does an unchecked increment wrap in Solidity versus earlier versions?

  44. Question 44 of 60 creating a simple smart contract Hard

    A contract declares constructor() payable {} and a non-payable function deposit(). A user sends 1 ETH with a call to deposit(). What happens?

  45. Question 45 of 60 compiling and deploying smart contracts Hard

    During truffle compile, the artifact JSON contains both bytecode and deployedBytecode. What is the key difference between them?

  46. Question 46 of 60 compiling and deploying smart contracts Hard

    A deployment fails with "exceeds block gas limit". Which action is most likely to resolve it without changing contract logic?

  47. Question 47 of 60 compiling and deploying smart contracts Hard

    In a migration script, deployer.deploy(A); deployer.deploy(B, A.address); sometimes fails with A.address undefined. What is the correct pattern?

  48. Question 48 of 60 compiling and deploying smart contracts Hard

    A contract compiles cleanly but truffle migrate reverts in the constructor only on a public testnet, not on Ganache. Which cause is most plausible?

  49. Question 49 of 60 using application templates Hard

    A developer runs truffle unbox <box>. What does unboxing an application template primarily provide beyond raw contract files?

  50. Question 50 of 60 using application templates Hard

    When a Truffle Box ships with a truffle-box.json file, what is its main role during truffle unbox?

  51. Question 51 of 60 using application templates Hard

    A team forks a React Truffle Box but their front-end cannot find the deployed contract address after redeploying. What is the most likely fix?

  52. Question 52 of 60 overview of popular blockchain application templates Hard

    Which statement best contrasts a DApp starter template targeting Ethereum with a chaincode template targeting Hyperledger Fabric?

  53. Question 53 of 60 overview of popular blockchain application templates Hard

    A template advertises "upgradeable contracts." Which architectural pattern is almost certainly in use?

  54. Question 54 of 60 overview of popular blockchain application templates Hard

    A token template implements ERC-20 but exposes a mint() callable by anyone. What is the primary security flaw?

  55. Question 55 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Hard

    In Hyperledger Fabric, a chaincode template reads a key, modifies it, and writes it back. Under high concurrency, two transactions in the same block touch the same key. What determines the outcome?

  56. Question 56 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Hard

    An Ethereum template uses tx.origin for authorization. Why is this considered an edge-case vulnerability compared to msg.sender?

  57. Question 57 of 60 discussion on popular templates (e.g., Ethereum, Hyperledger) Hard

    Which difference most directly explains why a Fabric chaincode cannot rely on Math.random() or system time the way off-chain code might?

  58. Question 58 of 60 compiling and deploying smart contracts Hard

    Two contracts in a project pin different pragma ranges: ^0.8.0 and >=0.7.0 <0.9.0. The config sets compilers.solc.version: "0.8.19". What is the result?

  59. Question 59 of 60 overview of Truffle framework Hard

    In the Truffle console, calling a view function returns a value immediately, but calling a state-changing function returns a transaction object instead of the new state. Why?

  60. Question 60 of 60 creating a simple smart contract Hard

    A contract stores a dynamic string[] public names;. A developer worries about gas when iterating over it in a function to find a match. What is the fundamental risk?

That's unit 3

Answer a few questions and your score shows up here.