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 happens if you forget to include gas when sending a transaction?

  1. The transaction automatically gets approved

  2. The transaction will fail

  3. The transaction gets prioritized by miners

  4. The amount of Ether sent is doubled

The correct answer is: The transaction will fail

When a transaction is sent on the Ethereum network, it requires gas as compensation for the miners who process and validate this transaction. Gas serves as a fee mechanism, ensuring that miners prioritize and execute transactions in order of the gas price offered. If a transaction is initiated without specifying gas, or if insufficient gas is provided, the transaction cannot be processed by the network. In this case, it would essentially fail, meaning it will not be included in a block and therefore not executed. The reasons may vary, such as exceeding the maximum block gas limit or simply not providing enough incentive for miners to pick up the transaction. Additionally, it's important to note that since the transaction does not go through, the Ether or tokens intended to be sent remain in the sender's account. Thus, failing to include gas prevents the transaction from being completed rather than resulting in other outcomes like approval, prioritization, or changes in the transaction amount.