View Source Signet.Trace.Action (Signet v0.2.0-alpha4)

Summary

Functions

Deserializes a trace sub-action into a struct.

Types

@type t() :: %Signet.Trace.Action{
  call_type: String.t(),
  from: <<_::160>>,
  gas: integer(),
  input: binary(),
  to: <<_::160>>,
  value: integer()
}

Functions

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

Deserializes a trace sub-action into a struct.

Examples

iex> %{
...>   "callType" => "call",
...>   "from" => "0x83806d539d4ea1c140489a06660319c9a303f874",
...>   "gas" => "0x1a1f8",
...>   "input" => "0x",
...>   "to" => "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
...>   "value" => "0x7a16c911b4d00000"
...> }
...> |> Signet.Trace.Action.deserialize()
%Signet.Trace.Action{
  call_type: "call",
  from: Signet.Util.decode_hex!("0x83806d539d4ea1c140489a06660319c9a303f874"),
  gas: 0x01a1f8,
  input: <<>>,
  to: Signet.Util.decode_hex!("0x1c39ba39e4735cb65978d4db400ddd70a72dc750"),
  value: 0x7a16c911b4d00000,
}