โ† All Blockchain Technology Flashcard Decks

FREE Blockchain Developer Smart Contract Development Questions and Answers Flashcards

6 cards from real Blockchain Technology practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 FREE Blockchain Developer Smart Contract Development Questions and Answers flashcards as text
  1. What is the primary purpose of the 'require' statement in Solidity smart contracts?

    Answer: To validate conditions and revert the transaction if not met

    The 'require' statement checks a condition and reverts the entire transaction with remaining gas refunded if the condition evaluates to false.

  2. Which design pattern is used to allow upgrading smart contract logic while preserving stored data?

    Answer: Proxy pattern

    The proxy pattern delegates calls to an implementation contract, allowing the logic to be swapped while the proxy retains all state and the same address.

  3. What happens when a smart contract function marked as 'view' attempts to modify state?

    Answer: The compiler throws an error

    The Solidity compiler enforces that 'view' functions cannot modify state and will produce a compilation error if state modification is attempted.

  4. In Solidity, what is the maximum size of a deployed smart contract's bytecode on Ethereum mainnet?

    Answer: 24,576 bytes

    EIP-170 introduced a contract size limit of 24,576 bytes (24 KB) to prevent denial-of-service attacks on the network.

  5. Which vulnerability occurs when a contract makes an external call before updating its own state?

    Answer: Reentrancy attack

    Reentrancy occurs when an external call allows the called contract to re-enter the calling function before state updates are completed.

  6. What is the purpose of the 'indexed' keyword for event parameters in Solidity?

    Answer: It allows the parameter to be used as a filter when searching logs

    Indexed event parameters are stored as topics in the transaction log, enabling efficient filtering and searching of events by those values.