A.1.8 Transaction Class

Basic Ethereum Data Store

Transactions are cryptographically signed instructions from accounts. An account will initiate a transaction to update the state of the Ethereum network. The simplest transaction is transferring ETH from one account to another.

An Ethereum transaction refers to an action initiated by an externally-owned account, in other words an account managed by a human, not a contract. For example, if Bob sends Alice 1 ETH, Bob's account must be debited and Alice's must be credited. This state-changing action takes place within a transaction.

Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM; after this happens, a miner will execute the transaction and propagate the resulting state change to the rest of the network.

Transactions require a fee and must be mined to become valid. To make this overview simpler we'll cover gas fees and mining elsewhere.

See: https://docs.google.com/spreadsheets/d/1ehCIQxjSZcVLnddDWHBzhPb8h83mHWZxvyX9eckghbU/edit#gid=1171362027

The Ethereum Transaction Class

Id

Return to Top

Description	ID
Data Type	text (tx-hash)
Example

“ |

Block Number

Return to Top

Description	Block height
Data Type	numeric
Example	4743012

Block Hash

Return to Top

Description	Hash of block header
Data Type	text
Example	0x06601603a88365782cdfc9b351625b81b44f009d71ecda705319d8eb52253b38

Hash

Return to Top

Description	Hash of transaction
Data Type	text
Example	0x000000005b6f5d20b1523bb8a153871fee2ded71a743998d38bdc5095d9d1d43

From

Return to Top

Description	The address for the sending account. Uses the web3.eth.defaultAccount property, if not specified.
Data Type	text
Example	0x804d39F546c5164Af7612C3Dca3683150E55bB78

To

Return to Top

Description	The destination address of the message, left undefined for a contract-creation transaction.
Data Type	text
Example	0xF32d328AF90D5ac22b1BbEDa4114Fd15b2fA09EE

Input

Return to Top

Description	Either a byte string containing the associated data of the message, or in the case of a contract-creation transaction, the initialisation code.
Data Type	text
Example	0x278b8c0e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d1ef6848f9e1200000000000000000000000000dd6c68bb32462e01705011a4e2ad1a60740f217f00000000000000000000000000000000000000000000 00000a15d4e62fd1100000000000000000000000000000000000000000000000000000000000004de624000000000000000000000000000000000000000 000000000000000000282e4ca000000000000000000000000000000000000000000000000000000000000001b2da74095f6c78e151a5410955079a0481d 939fda00e1f0b94b445c66dea0652a2b73c6bc213613e7cbb788f1e49d968fed95df4ffaa58fa1f4580e939885c624

Nonce

Return to Top

Description	Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. It is a scalar value equal to the number of transactions sent by the sender. The nonce in the transaction must be exactly one higher than the nonce in the sender account state essentially guarding against race conditions of two competing transactions trying to modify the same account state.
Data Type	Text
Example	31686

Gas

Return to Top

Description	The amount of gas to use for the transaction (unused gas is refunded). The gas limit sets an upper bound on the amount of gas the originator of the transaction is willing to pay for.
Data Type	Numeric
Example

” |

Gas Price

Return to Top

Description	The price of gas for this transaction in wei, defaults to the mean network gas price.
Data Type	Numeric
Example	70000000000

Transaction Index

Return to Top

Description	Integer of the transaction index position
Data Type	Numeric
Example	60

Value

Return to Top

Description	The value transferred for the transaction in Wei, also the endowment if it’s a contract-creation transaction.
Data Type	numeric
Example	1.538E+19

V

Return to Top

Description	Values corresponding to the signature of the transaction and used to determine the sender of the transaction
Data Type	Numeric
Example	0x1b

R

Return to Top

Description	Values corresponding to the signature of the transaction and used to determine the sender of the transaction
Data Type	text
Example	0xc78a9cabd379d83ef2eeebe2bd1ffd11755432244e9547b0fe608b6f99bc50cf

S

Return to Top

Description	Values corresponding to the signature of the transaction and used to determine the sender of the transaction
Data Type	Numeric
Example	0x2ae507ce22499f7bb165b576ac3539516b2917f5affa1e8e3822aa9302614848

Timestamp

Return to Top

Description	Timestamp of the transaction
Data Type	TimestampType
Example	2017-12-16 13:59:51+00

Creates

Return to Top

Description	TBD
Data Type
Example

Public Key

Return to Top

Description	Public hash key
Data Type	text
Example	0xe3dcf27ef4b9c0a4b773f289272c23e62c95827c5e5fec54c05d8af2b7d3ab0373070bbff30f99f4edf845b7ab6fe1af40ac3e7a4431dd21ef282a4713ddca89

Contract Address

Return to Top

Description	Address of contract reference
Data Type	text
Example	0x83C07b66DfB48FbF2fE8C2FF46c431fFC21F3Ac1

Cumulative Gas Used

Return to Top

Description	Real amount of gas used in the block up unit this tx-index
Data Type	text
Example	1569579

Gas Used

Return to Top

Description	Gas used for the transaction
Data Type	Numeric
Example	22787

Logs Bloom

Return to Top

Description	A kind of index about the data contained in the tx, used in native queries to the blockchain via the node
Data Type	text (tx-hash)
Example	0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000

Root

Return to Top

Description	TBD
Data Type	text
Example	0x3c77b032da4e0637b577bce870ea4587f247a34445b85669c25be302e8411e29

Status

Return to Top

Description	if the transaction was successfully mined/executed
Data Type	Boolean
Example	False