Part II · Accounts, transactions, contracts

Gas, nonce and block explorers

By KangPublished: Chain snapshot: , block 12117419

This chapter answers one question: how do you tell that something really landed on-chain?

Where the starting funds came from

At the start of the lab, account A received 0.05 SepETH (testnet ETH) at 2026-11-11 15:58:24 Singapore time, in block 12110419:

A service that hands out free test coins is called a faucet. The sending address has no official name tag in the explorer, so this book only states the address and amount you can verify and does not guess which brand it belongs to. Test coins have no market value; the lab spent no real money.

Gas: the metering fee for execution

Gas is the unit that measures the work the EVM does. Think of posting a parcel: the price depends not only on whether you send it, but on handling cost and how busy things are.

Under the EIP-1559 fee market:

  • fee paid = gasUsed × effective gas price
  • effective gas price ≈ base fee + tip
  • gasUsed × base fee is burned (removed from circulation, credited to nobody); gasUsed × tip goes to the validator that includes the block.

Which part is larger depends on the base fee and tip at the time; there is no fixed ratio. Check it against the five real Counter transactions from the lab (all values in wei):

Transaction Base fee Tip Effective price Burned To validator Total fee
Deploy Counter 20 50 70 33,052,820 82,632,050 115,684,870
First increment 18 50 68 2,290,122 6,361,450 8,651,572
reset 20 50 70 472,520 1,181,300 1,653,820
increment (1 wei tip) 20 1 21 2,544,580 127,229 2,671,809
increment (2 wei tip) 24 2 26 703,416 58,618 762,034

Sepolia was quiet then: the base fee was only around 20 wei while the default tip was 50 wei, so in the first three transactions the tip was the larger part (about 71% of the deployment fee went to the validator). Only after the tip was cut to 1 wei did the burned part dominate again. The same 127,229-gas increment cost 8,651,572 wei with a 50 wei tip and 2,671,809 wei with a 1 wei tip: the difference is the tip, not the computation.

Nonce: the account’s transaction counter

For an ordinary externally owned account, the nonce is the sequence number of the account’s transactions. It starts at 0 and goes up by one for every transaction that gets mined; it orders transactions and prevents the same one from being replayed.

At the snapshot, account A’s nonce was 20. That means A had sent 20 mined transactions using nonces 0 through 19, and its next transaction would use nonce 20. It is not “a balance of 20”, and not “20 successful calls” (nonce 15 was a deliberately failing transaction that still used up a nonce). Account B’s nonce was 3 (nonces 0, 1 and 2 used).

A real lesson about a “stuck” transaction

The lower the tip, the more likely a transaction waits at the back of the queue when the network is busy. The lab practised this on purpose:

Only the transaction that was finally mined is visible on-chain. A replaced transaction never enters any block and leaves no successful receipt. That is why this book never treats the hash of an unmined transaction as fact: a hash shown by your wallet or script only says “sent”, not “landed”.

What to look at in a block explorer

(See Figure 2 in Chapter 5 for the whole flow.)

  1. Network: make sure it is Sepolia (the address bar reads sepolia.etherscan.io). Do not confuse testnet and mainnet.
  2. Status: success or failure. A failed transaction may still have consumed gas.
  3. From / To: who sent it and which account or contract it went to.
  4. Method / Logs: which function was called and which events were emitted. An event is not always the final state of an asset (Chapters 11–12 show an event with a net change of zero).
  5. Block / Transaction Hash: the block that contains it and its unique identifier.

Judge the on-chain result by status, events and balance changes together, never just because a program or bot says “success”.