Skip to content

@receipts:block.baseFee

Base fee in wei of a sealed block, addressed by number or tag (default: latest).

On-chain (@receipts:block.baseFee!): Reads the block being written, and takes no arguments.

⚗️ Experimental — available at next.evmcrispr.com.

Returns: number

@receipts:block.baseFee(block? chain?)
NameTypeDescription
[block]number | stringBlock number or tag (default: latest)
[chain]chainChain to look on (default: current chain)
# Read the base fee of a sealed block
set $fee @receipts:block.baseFee(19426587 mainnet)

With ! and no arguments the read happens on-chain at assertion time: the base fee of the block being written, e.g. to gate a batch on fee conditions.

load receipts
assert @block.baseFee! <= 100e9 "base fee too high"