Quiz Entry - updated: 2026.07.30
What is gas, and which operations cost it?
Gas is the unit measuring the computational work a transaction requires; you pay for it in the chain's native token. Anything that changes blockchain state costs gas; pure reads do not.
Every operation on an EVM chain has a gas cost, and the more work an operation does, the more gas it burns. What costs gas:
- Deploying a contract — you are writing new code into the chain's state (much more than the ~21,000 gas of a plain transfer, because you put lots of data and computation on-chain).
- Changing state — writing a storage variable, pushing to an array, updating a mapping.
- Any transaction in general — because it modifies the blockchain.
What is free: a standalone view/pure read, since it changes nothing. A concrete illustration — making store do extra work (favoriteNumber = favoriteNumber + 1) visibly raises its gas cost versus a plain assignment. Gas is ultimately what makes on-chain computation something you must economise.
Go deeper:
ethereum.org: gas and fees — how gas is metered, priced, and limited.
Ethereum (Wikipedia) — the platform whose EVM meters every operation.