ethereum.forks.bpo5.fork_typesethereum.forks.amsterdam.fork_types
Ethereum Types.
.. contents:: Table of Contents :backlinks: none :local:
Introduction
Types reused throughout the specification, which are specific to Ethereum.
VersionedHash¶
| 24 | VersionedHash = Hash32 |
|---|
Bloom¶
| 26 | 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:
| 30 | """ |
|---|---|
| 31 | Encode `Account` dataclass. |
| 32 | |
| 33 | Storage is not stored in the `Account` dataclass, so `Accounts` cannot be |
| 34 | encoded without providing a storage root. |
| 35 | """ |
| 36 | return rlp.encode( |
| 37 | ( |
| 38 | raw_account_data.nonce, |
| 39 | raw_account_data.balance, |
| 40 | storage_root, |
| 41 | raw_account_data.code_hash, |
| 42 | ) |
| 43 | ) |
Authorization ¶
The authorization for a set code transaction.
| 46 | @slotted_freezable |
|---|
| 47 | @dataclass |
|---|
class Authorization:
chain_id¶
| 53 | chain_id: U256 |
|---|
address¶
| 54 | address: Address |
|---|
nonce¶
| 55 | nonce: U64 |
|---|
y_parity¶
| 56 | y_parity: U8 |
|---|
r¶
| 57 | r: U256 |
|---|
s¶
| 58 | s: U256 |
|---|