Skip to content

Commit af571ee

Browse files
committed
Add documentation
1 parent 4463954 commit af571ee

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 0.8.24 (unreleased)
22

33
Language Features:
4+
* Introduce global ``blobhash`` for retrieving the versioned blob hash of a given blob index within the transaction.
45
* Yul: Introduce builtin ``blobhash()`` for retrieving a versioned blob hash of a given blob index within the transaction.
56

67
Compiler Features:

docs/cheatsheet.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ Members of ``address``
5656
returns ``false`` on failure
5757
- ``<address payable>.transfer(uint256 amount)``: send given amount of Wei to :ref:`address`, throws on failure
5858

59-
.. index:: blockhash, block, block;basefree, block;chainid, block;coinbase, block;difficulty, block;gaslimit, block;number, block;prevrandao, block;timestamp
59+
.. index:: blockhash, blobhash, block, block;basefree, block;chainid, block;coinbase, block;difficulty, block;gaslimit, block;number, block;prevrandao, block;timestamp
6060
.. index:: gasleft, msg;data, msg;sender, msg;sig, msg;value, tx;gasprice, tx;origin
6161

6262
Block and Transaction Properties
6363
================================
6464

6565
- ``blockhash(uint blockNumber) returns (bytes32)``: hash of the given block - only works for 256 most recent blocks
66+
- ``blobhash(uint index) returns (bytes32)``: versioned blob hash of the given blob index. The versioned hash consists of a single byte (0x01) representing the blob hash version, followed by the last 31 bytes of the SHA256 hash of the KZG commitment (`EIP-4844 <https://eips.ethereum.org/EIPS/eip-4844>`_)
6667
- ``block.basefee`` (``uint``): current block's base fee (`EIP-3198 <https://eips.ethereum.org/EIPS/eip-3198>`_ and `EIP-1559 <https://eips.ethereum.org/EIPS/eip-1559>`_)
6768
- ``block.chainid`` (``uint``): current chain id
6869
- ``block.coinbase`` (``address payable``): current block miner's address

docs/using-the-compiler.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ at each version. Backward compatibility is not guaranteed between each version.
176176
- Introduces ``prevrandao()`` and ``block.prevrandao``, and changes the semantics of the now deprecated ``block.difficulty``, disallowing ``difficulty()`` in inline assembly (see `EIP-4399 <https://eips.ethereum.org/EIPS/eip-4399>`_).
177177
- ``shanghai`` (**default**)
178178
- Smaller code size and gas savings due to the introduction of ``push0`` (see `EIP-3855 <https://eips.ethereum.org/EIPS/eip-3855>`_).
179+
- ``cancun``
180+
- Introduces ``blobhash()`` in inline assembly and as global function to retrieve a versioned blob hash of a given blob index within a transaction (see `EIP-4844 <https://eips.ethereum.org/EIPS/eip-4844>`_).
179181

180182
.. index:: ! standard JSON, ! --standard-json
181183
.. _compiler-api:

0 commit comments

Comments
 (0)