Prepare for the Blockchain Developer Certification. Master blockchain concepts with flashcards and multiple choice questions. Explanation-based learning for your success!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What type of data does the storage in EVM hold?

  1. Local variables defined inside functions

  2. State variables

  3. Function arguments

  4. Temporary data during execution

The correct answer is: State variables

The storage in the Ethereum Virtual Machine (EVM) primarily holds state variables. Here’s why this is significant: State variables are essential components of a smart contract as they retain data across function calls and transactions. Unlike local variables or temporary data, which exist only during the execution of a function and are discarded afterward, state variables are stored on the blockchain and persist for as long as the smart contract is deployed. This allows contracts to maintain a record of their state and enables various functionalities, such as tracking balances, managing permissions, and maintaining other critical information that needs to be consistent throughout the life cycle of the contract. Additionally, local variables and function arguments are stored in memory and are transient; they do not persist as part of the contract’s state. Temporary data during execution, like data stored in memory for quick access during function execution, also does not contribute to the storage state on the blockchain as it is not written to permanent storage. Thus, state variables are the fundamental type of data held in EVM storage, forming the backbone of the smart contract's data management.