ethereum.eth_types

Ethereum Types

Introduction

Types re-used throughout the specification, which are specific to Ethereum.

Module Contents

Classes

Transaction

Atomic operation performed on the block chain.

Account

State associated with an address.

Header

Header portion of a block on the chain.

Block

A complete block.

Log

Data record produced during the execution of a transaction.

Receipt

Result of a transaction.

Attributes

Address

Root

Hash32

Hash64

Storage

Bloom

TX_BASE_COST

TX_DATA_COST_PER_NON_ZERO

TX_DATA_COST_PER_ZERO

EMPTY_ACCOUNT

State

Module Details

Address

ethereum.eth_types.Address

Root

ethereum.eth_types.Root

Hash32

ethereum.eth_types.Hash32

Hash64

ethereum.eth_types.Hash64

Storage

ethereum.eth_types.Storage

Bloom

ethereum.eth_types.Bloom

TX_BASE_COST

ethereum.eth_types.TX_BASE_COST = 21000

TX_DATA_COST_PER_NON_ZERO

ethereum.eth_types.TX_DATA_COST_PER_NON_ZERO = 68

TX_DATA_COST_PER_ZERO

ethereum.eth_types.TX_DATA_COST_PER_ZERO = 4

Transaction

Atomic operation performed on the block chain.

class ethereum.eth_types.Transaction
nonce :ethereum.base_types.U256
gas_price :ethereum.base_types.U256
gas :ethereum.base_types.U256
to :Optional[Address]
value :ethereum.base_types.U256
data :ethereum.base_types.Bytes
v :ethereum.base_types.U256
r :ethereum.base_types.U256
s :ethereum.base_types.U256

Account

State associated with an address.

class ethereum.eth_types.Account
nonce :ethereum.base_types.Uint
balance :ethereum.base_types.Uint
code :bytes
storage :Storage

EMPTY_ACCOUNT

ethereum.eth_types.EMPTY_ACCOUNT

Block

A complete block.

class ethereum.eth_types.Block
header :Header
transactions :List[Transaction]
ommers :List[Header]

Log

Data record produced during the execution of a transaction.

class ethereum.eth_types.Log
address :Address
topics :List[Hash32]
data :bytes

Receipt

Result of a transaction.

class ethereum.eth_types.Receipt
post_state :Root
cumulative_gas_used :ethereum.base_types.Uint
bloom :Bloom
logs :List[Log]

State

ethereum.eth_types.State