:mod:`ethereum.eth_types` ========================= .. py:module:: ethereum.eth_types Ethereum Types ^^^^^^^^^^^^^^ .. contents:: Table of Contents :backlinks: none :local: Introduction ------------ Types re-used throughout the specification, which are specific to Ethereum. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ethereum.eth_types.Transaction ethereum.eth_types.Account ethereum.eth_types.Header ethereum.eth_types.Block ethereum.eth_types.Log ethereum.eth_types.Receipt Attributes ~~~~~~~~~~ .. autoapisummary:: ethereum.eth_types.Address ethereum.eth_types.Root ethereum.eth_types.Hash32 ethereum.eth_types.Hash64 ethereum.eth_types.Storage ethereum.eth_types.Bloom ethereum.eth_types.TX_BASE_COST ethereum.eth_types.TX_DATA_COST_PER_NON_ZERO ethereum.eth_types.TX_DATA_COST_PER_ZERO ethereum.eth_types.EMPTY_ACCOUNT ethereum.eth_types.State Module Details --------------- Address ~~~~~~~ .. data:: Address Root ~~~~ .. data:: Root Hash32 ~~~~~~ .. data:: Hash32 Hash64 ~~~~~~ .. data:: Hash64 Storage ~~~~~~~ .. data:: Storage Bloom ~~~~~ .. data:: Bloom TX_BASE_COST ~~~~~~~~~~~~ .. data:: TX_BASE_COST :annotation: = 21000 TX_DATA_COST_PER_NON_ZERO ~~~~~~~~~~~~~~~~~~~~~~~~~ .. data:: TX_DATA_COST_PER_NON_ZERO :annotation: = 68 TX_DATA_COST_PER_ZERO ~~~~~~~~~~~~~~~~~~~~~ .. data:: TX_DATA_COST_PER_ZERO :annotation: = 4 Transaction ~~~~~~~~~~~ Atomic operation performed on the block chain. .. class:: Transaction .. attribute:: nonce :annotation: :ethereum.base_types.U256 .. attribute:: gas_price :annotation: :ethereum.base_types.U256 .. attribute:: gas :annotation: :ethereum.base_types.U256 .. attribute:: to :annotation: :Optional[Address] .. attribute:: value :annotation: :ethereum.base_types.U256 .. attribute:: data :annotation: :ethereum.base_types.Bytes .. attribute:: v :annotation: :ethereum.base_types.U256 .. attribute:: r :annotation: :ethereum.base_types.U256 .. attribute:: s :annotation: :ethereum.base_types.U256 Account ~~~~~~~ State associated with an address. .. class:: Account .. attribute:: nonce :annotation: :ethereum.base_types.Uint .. attribute:: balance :annotation: :ethereum.base_types.Uint .. attribute:: code :annotation: :bytes .. attribute:: storage :annotation: :Storage EMPTY_ACCOUNT ~~~~~~~~~~~~~ .. data:: EMPTY_ACCOUNT Header ~~~~~~ Header portion of a block on the chain. .. class:: Header .. attribute:: parent :annotation: :Hash32 .. attribute:: ommers :annotation: :Hash32 .. attribute:: coinbase :annotation: :Address .. attribute:: state_root :annotation: :Root .. attribute:: transactions_root :annotation: :Root .. attribute:: receipt_root :annotation: :Root .. attribute:: bloom :annotation: :Bloom .. attribute:: difficulty :annotation: :ethereum.base_types.Uint .. attribute:: number :annotation: :ethereum.base_types.Uint .. attribute:: gas_limit :annotation: :ethereum.base_types.Uint .. attribute:: gas_used :annotation: :ethereum.base_types.Uint .. attribute:: time :annotation: :ethereum.base_types.U256 .. attribute:: extra :annotation: :ethereum.base_types.Bytes .. attribute:: mix_digest :annotation: :ethereum.base_types.Bytes32 .. attribute:: nonce :annotation: :ethereum.base_types.Bytes8 Block ~~~~~ A complete block. .. class:: Block .. attribute:: header :annotation: :Header .. attribute:: transactions :annotation: :List[Transaction] .. attribute:: ommers :annotation: :List[Header] Log ~~~ Data record produced during the execution of a transaction. .. class:: Log .. attribute:: address :annotation: :Address .. attribute:: topics :annotation: :List[Hash32] .. attribute:: data :annotation: :bytes Receipt ~~~~~~~ Result of a transaction. .. class:: Receipt .. attribute:: post_state :annotation: :Root .. attribute:: cumulative_gas_used :annotation: :ethereum.base_types.Uint .. attribute:: bloom :annotation: :Bloom .. attribute:: logs :annotation: :List[Log] State ~~~~~ .. data:: State