EEVM.TransactionResult (eevm v0.1.0)

Copy Markdown View Source

The outcome of a transaction that passed validation, returned by EEVM.transact/4. A transaction that fails validation returns {:error, reason} instead, and the database is unchanged.

FieldDescription
status:success, :revert, or {:halt, reason} (see EEVM.CallResult.status/0)
gas_usedGas the sender pays for, after the refund
gas_refundedGas left unused by execution
senderThe recovered sender address
contract_addressThe deployed contract's address, for a successful creation
return_dataThe top-level RETURN data, or the REVERT data when status is :revert (see EEVM.revert_reason/1); empty after a halt
logsLogs emitted, in order; empty unless status is :success
receiptThe EEVM.Block.Receipt, with cumulative_gas_used equal to gas_used
dbThe EEVM.Database after the transaction, fees and refunds included; committed when the backend implements EEVM.Database.commit/2
changesThe EEVM.StateChanges the transaction wrote
traceThe EEVM.Tracer when run with tracer:, else nil

post_state_db and logs_bloom are deprecated copies of db and receipt.logs_bloom, kept for one minor version.

Summary

Types

log_entry()

@type log_entry() :: EEVM.Block.Bloom.log_entry()

status()

@type status() :: EEVM.CallResult.status()

t()

@type t() :: %EEVM.TransactionResult{
  changes: EEVM.StateChanges.t() | nil,
  contract_address: non_neg_integer() | nil,
  db: EEVM.Database.t(),
  gas_refunded: non_neg_integer(),
  gas_used: non_neg_integer(),
  logs: [log_entry()],
  logs_bloom: EEVM.Block.Bloom.t(),
  post_state_db: EEVM.Database.t(),
  receipt: EEVM.Block.Receipt.t(),
  return_data: binary(),
  sender: non_neg_integer(),
  status: status(),
  trace: EEVM.Tracer.t() | nil
}