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.

BlockAccessIndex

Position within the set of all changes in a Block.

25
BlockAccessIndex = U32

VersionedHash

32
VersionedHash = Hash32

Bloom

34
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:
38
    <snip>
44
    return rlp.encode(
45
        (
46
            raw_account_data.nonce,
47
            raw_account_data.balance,
48
            storage_root,
49
            raw_account_data.code_hash,
50
        )
51
    )

Authorization

The authorization for a set code transaction.

54
@final
55
@slotted_freezable
56
@dataclass
class Authorization:

chain_id

62
    chain_id: U256

address

63
    address: Address

nonce

64
    nonce: U64

y_parity

65
    y_parity: U8

r

66
    r: U256

s

67
    s: U256