Get block number

Get block number on Values

Ethereum
Ethereum
Base
Base

Reads onchain state

Ready to run on Base

Returns the number of the block this plug executes in. It is the chain height at execution, useful as a monotonic counter. Reach for it to stamp a stored record, to key storage by block, or to require a minimum number of blocks has passed since a stored earlier value.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

Takes nothing — it reads the caller's own position.

More plugs on Base

Bridge from Base · 6 plugs

More on Values · 6