• #A
    #B
    #C
    #D
    Explanation:
    CALLCODE is deprecated due to unsafe context handling. It remains callable for backward compatibility but should never be used in new designs.
  • #A
    #B
    #C
    #D
    Explanation:
    EXTCODESIZE returns zero for EOAs and non-zero for deployed contracts. This distinction is commonly used for contract detection, though it has edge cases.
  • #A
    #B
    #C
    #D
    Explanation:
    GASLEFT returns the amount of gas remaining in the current execution context. It is commonly used for gas-aware logic and debugging.
  • #A
    #B
    #C
    #D
    Explanation:
    bytes32 always occupies a full 32-byte storage slot. Smaller types may be packed together, but bytes32 always stands alone.
  • #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.
  • #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.
  • #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.
  • #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
  • #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.
  • #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.
  • #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.
  • #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.
  • #A
    #B
    #C
    #D
    Explanation:
    Storage persists on-chain across transactions and blocks. Memory and calldata are temporary and cleared after execution completes.
  • #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.
  • #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.
Home Channels Search Login Register