|
|
@ -418,10 +418,18 @@ defmodule Explorer.SmartContract.Reader do |
|
|
|
Map.put_new(output, "value", bytes_to_string(value)) |
|
|
|
Map.put_new(output, "value", bytes_to_string(value)) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp new_value(%{"type" => :address} = output, [value], _index) do |
|
|
|
|
|
|
|
Map.put_new(output, "value", bytes_to_string(value)) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp new_value(%{"type" => "address"} = output, values, index) do |
|
|
|
defp new_value(%{"type" => "address"} = output, values, index) do |
|
|
|
Map.put_new(output, "value", bytes_to_string(Enum.at(values, index))) |
|
|
|
Map.put_new(output, "value", bytes_to_string(Enum.at(values, index))) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp new_value(%{"type" => :address} = output, values, index) do |
|
|
|
|
|
|
|
Map.put_new(output, "value", bytes_to_string(Enum.at(values, index))) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp new_value(%{"type" => "bytes" <> number_rest} = output, values, index) do |
|
|
|
defp new_value(%{"type" => "bytes" <> number_rest} = output, values, index) do |
|
|
|
if String.contains?(number_rest, "[]") do |
|
|
|
if String.contains?(number_rest, "[]") do |
|
|
|
values_array = Enum.at(values, index) |
|
|
|
values_array = Enum.at(values, index) |
|
|
|