iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

Quiz

Check your grasp of EVM, gas, and the common pitfalls of writing smart contracts.

Sample questions

EXAMPLE
# Web3 quiz

1) Ether and gas: which statement is true?
   a) Gas is paid in dollars  b) Gas price + gas used = fee
   c) Gas is free at off-peak  d) Gas is the same as ether

2) An ERC-20 transfer event is emitted by:
   a) the sender  b) the receiver
   c) the token contract  d) the validator

3) Reentrancy is mitigated primarily by:
   a) onlyOwner modifier
   b) checks-effects-interactions ordering and/or a reentrancy guard
   c) using a proxy
   d) higher gas limit

4) Which Solidity feature changed default behaviour to revert on overflow?
   a) constructor  b) modifier
   c) Solidity 0.8 (built-in checked math)
   d) immutable

5) An upgradeable proxy pattern relies on:
   a) self-destruct
   b) delegatecall to an implementation contract
   c) inline assembly only
   d) view functions

6) The address(0) is often used to represent:
   a) the deployer  b) burn / sentinel value
   c) the chain ID  d) a multisig

7) eth_call vs eth_sendTransaction:
   a) call writes state, send reads
   b) call reads state without a tx, send creates a tx
   c) both write state
   d) call is for L2 only

8) A merkle proof verifies:
   a) gas usage  b) inclusion of a leaf in a known root
   c) signature validity  d) chain reorgs

Answers: 1b, 2c, 3b, 4c, 5b, 6b, 7b, 8b.

Why it matters

Audit before you deploy. Most exploited contracts had clean tests but were not threat-modeled - read recent post-mortems before you ship anything that holds value.

Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.

Example

Example
// 3 questions per lesson.
Try it Yourself »

Discussion

Loading…