The outcome of a message call: EEVM.run/2, EEVM.call/4, or
EEVM.create/3.
| Field | Description |
|---|---|
status | :success, :revert, or {:halt, reason} (see status/0) |
return_data | Bytes from RETURN or REVERT (see EEVM.revert_reason/1); empty after a halt |
gas_used | Gas the code consumed, after the refund. A message call has no transaction, so unlike EEVM.TransactionResult.gas_used this excludes the intrinsic gas (21,000 plus calldata) |
gas_left | Gas remaining from the :gas limit |
logs | Logs emitted, in order; empty unless status is :success |
db | The EEVM.Database after the call, writes still in its overlay; unchanged unless status is :success |
changes | db's pending writes as an EEVM.StateChanges; message calls never commit them |
contract_address | The new contract's address after a successful EEVM.create/3, else nil |
trace | The EEVM.Tracer when run with tracer:, else nil |
stack | The final stack, top first, when run with debug: true, else nil |
Summary
Types
How execution ended: :success after STOP or RETURN, :revert after
REVERT, or {:halt, reason} after an exceptional halt, which consumes all
gas. reason is an EEVM.Error.halt_reason/0, such as :out_of_gas or
:invalid_opcode.
Types
@type status() :: :success | :revert | {:halt, EEVM.Error.halt_reason()}
How execution ended: :success after STOP or RETURN, :revert after
REVERT, or {:halt, reason} after an exceptional halt, which consumes all
gas. reason is an EEVM.Error.halt_reason/0, such as :out_of_gas or
:invalid_opcode.
@type t() :: %EEVM.CallResult{ changes: EEVM.StateChanges.t(), contract_address: non_neg_integer() | nil, db: EEVM.Database.t(), gas_left: non_neg_integer(), gas_used: non_neg_integer(), logs: [EEVM.Block.Bloom.log_entry()], return_data: binary(), stack: [non_neg_integer()] | nil, status: status(), trace: EEVM.Tracer.t() | nil }