ethereum.forks.bpo1.fork_typesethereum.forks.bpo2.fork_types

Ethereum Types.

.. contents:: Table of Contents :backlinks: none :local:

Introduction

Types reused throughout the specification, which are specific to Ethereum.

VersionedHash

25
VersionedHash = Hash32

Bloom

27
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:
31
    <snip>
37
    return rlp.encode(
38
        (
39
            raw_account_data.nonce,
40
            raw_account_data.balance,
41
            storage_root,
42
            raw_account_data.code_hash,
43
        )
44
    )

Authorization

The authorization for a set code transaction.

47
@final
48
@slotted_freezable
49
@dataclass
class Authorization:

chain_id

55
    chain_id: U256

address

56
    address: Address

nonce

57
    nonce: U64

y_parity

58
    y_parity: U8

r

59
    r: U256

s

60
    s: U256