• Difficulty - Medium
    Total Plays - 20
    Allowed Time - 10 sec
    Best time - 1.200

    Why does storage write order matter for structs?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Solidity packs struct variables tightly into storage slots based on declaration order. Reordering fields can change slot boundaries and break upgrade compatibility.
  • Difficulty - Medium
    Total Plays - 16
    Allowed Time - 10 sec
    Best time - 0.784

    What determines the base slot of a mapping?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    The base slot of a mapping is derived using keccak256(key . slot). This hashing ensures unique storage locations per key without collisions.
  • Difficulty - Medium
    Total Plays - 13
    Allowed Time - 10 sec
    Best time - 5.093

    Which operation causes storage slot re-packing?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Changing variable types alters how Solidity packs them into storage slots. This can shift offsets and corrupt existing storage layouts in upgradeable contracts.
  • Difficulty - Medium
    Total Plays - 20
    Allowed Time - 10 sec
    Best time - 1.638

    Which data location is read-only by default?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Calldata is immutable and cannot be modified by the callee. This makes it gas-efficient and safe for external function inputs
  • Difficulty - Medium
    Total Plays - 19
    Allowed Time - 10 sec
    Best time - 1.548 sec

    What happens to storage slots after contract self-destruct?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Storage is not automatically wiped when a contract self-destructs. The data remains on-chain and can be accessed again if a contract is redeployed at the same address.
  • Difficulty - Medium
    Total Plays - 22
    Allowed Time - 10 sec
    Best time - 1.455

    Why is bytes32 cheaper than string in storage?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    bytes32 has a fixed 32-byte size and fits into a single storage slot. string is dynamically sized and requires additional storage pointers and length metadata.
  • Difficulty - Medium
    Total Plays - 23
    Allowed Time - 10 sec
    Best time - 3.228

    Which operation resets a dynamic array length to zero?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Using delete on a dynamic array sets its length to zero. Storage slots may remain allocated but become inaccessible through the array.
  • Difficulty - Medium
    Total Plays - 19
    Allowed Time - 10 sec
    Best time - 3.454

    What does delete do to a mapping entry?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Deleting a mapping key resets its value to the default type value. The key itself still exists conceptually since mappings do not track keys.
  • Difficulty - Medium
    Total Plays - 18
    Allowed Time - 10 sec
    Best time - 1.444

    Which data location persists across transactions?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Storage persists on-chain across transactions and blocks. Memory and calldata are temporary and cleared after execution completes.
  • Difficulty - Medium
    Total Plays - 18
    Allowed Time - 10 sec
    Best time - 4.491

    What happens if a public variable name conflicts with a function name?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Public variables automatically generate getter functions. If a function shares the same name, the compiler prioritizes the variable-generated getter, shadowing the function definition.
  • Difficulty - Medium
    Total Plays - 18
    Allowed Time - 10 sec
    Best time - 3.013 sec

    Which keyword prevents further inheritance of a contract?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Solidity does not support a final or sealed keyword for contracts. Any contract can be inherited unless architectural constraints are enforced manually.
  • Difficulty - Medium
    Total Plays - 15
    Allowed Time - 10 sec
    Best time - 3.845

    Which function type cannot access msg.sender?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    pure functions cannot read blockchain context such as msg.sender or block.timestamp. They are restricted to computation based solely on input parameters and local variables
  • Difficulty - Medium
    Total Plays - 10
    Allowed Time - 10 sec
    Best time - 1.012 sec

    What breaks if virtual is omitted in multiple inheritance?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    Without the virtual keyword, a function cannot be overridden in derived contracts. This breaks the override chain and prevents proper polymorphic behavior in multiple inheritance scenarios.
  • Difficulty - Medium
    Total Plays - 6
    Allowed Time - 10 sec
    Best time - 10

    Which Solidity construct enforces compile-time immutability?

    Tip: Click "Play" to reveal options and start playing.

    #A
    #B
    #C
    #D
    Explanation:
    constant variables are evaluated at compile time and embedded directly into contract bytecode. This guarantees immutability and avoids any runtime storage access or gas cost.