ethereum.forks.paris.fork_typesethereum.forks.shanghai.fork_types
Ethereum Types.
.. contents:: Table of Contents :backlinks: none :local:
Introduction
Types reused throughout the specification, which are specific to Ethereum.
Bloom¶
| 19 | Bloom = Bytes256 |
|---|
encode_account ¶
Encode Account dataclass.
Storage is not stored in the Account dataclass, so Accounts cannot be
encoded without providing a storage root.
def encode_account(raw_account_data: Account, storage_root: Bytes) -> Bytes:
| 23 | """ |
|---|---|
| 24 | Encode `Account` dataclass. |
| 25 | |
| 26 | Storage is not stored in the `Account` dataclass, so `Accounts` cannot be |
| 27 | encoded without providing a storage root. |
| 28 | """ |
| 29 | return rlp.encode( |
| 30 | ( |
| 31 | raw_account_data.nonce, |
| 32 | raw_account_data.balance, |
| 33 | storage_root, |
| 34 | raw_account_data.code_hash, |
| 35 | ) |
| 36 | ) |