View Source Signet.DebugTrace.StructLog (Signet v1.2.6)

Summary

Functions

Deserializes a trace's struct-log into a struct.

Types

@type t() :: %Signet.DebugTrace.StructLog{
  depth: integer(),
  gas: integer(),
  gas_cost: integer(),
  op: atom(),
  pc: integer(),
  stack: [binary()]
}

Functions

@spec deserialize(map()) :: t() | no_return()

Deserializes a trace's struct-log into a struct.

Examples

iex> %{
...>   "depth" => 1,
...>   "gas" => 599978565,
...>   "gasCost" => 3,
...>   "op" => "PUSH1",
...>   "pc" => 2,
...>   "stack" => ["0x80"]
...> }
...> |> Signet.DebugTrace.StructLog.deserialize()
%Signet.DebugTrace.StructLog{
  depth: 1,
  gas: 599978565,
  gas_cost: 3,
  op: :PUSH1,
  pc: 2,
  stack: [~h[0x80]]
}