|
|
@ -105,32 +105,38 @@ |
|
|
|
<div data-function-response></div> |
|
|
|
<div data-function-response></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% else %> |
|
|
|
<% else %> |
|
|
|
<%= if outputs?(function["outputs"]) do %> |
|
|
|
<%= cond do %> |
|
|
|
<% length = Enum.count(function["outputs"]) %> |
|
|
|
<%= outputs?(function["outputs"]) -> %> |
|
|
|
<%= for {output, index} <- Enum.with_index(function["outputs"]) do %> |
|
|
|
<% length = Enum.count(function["outputs"]) %> |
|
|
|
<%= if address?(output["type"]) do %> |
|
|
|
<%= for {output, index} <- Enum.with_index(function["outputs"]) do %> |
|
|
|
<div class="py-2 word-break-all"> |
|
|
|
<%= if address?(output["type"]) do %> |
|
|
|
<%= link( |
|
|
|
|
|
|
|
output["value"], |
|
|
|
|
|
|
|
to: address_path(@conn, :show, output["value"])) %><%= if length > 1 and index < length - 1 do %>, <% end %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% else %> |
|
|
|
|
|
|
|
<%= if output["type"] == "uint256" do %> |
|
|
|
|
|
|
|
<div class="py-2 word-break-all"> |
|
|
|
<div class="py-2 word-break-all"> |
|
|
|
<div data-wei-ether-converter> |
|
|
|
<%= link( |
|
|
|
<span data-conversion-unit data-original-value="<%= output["value"] %>"><%= output["value"] %></span> |
|
|
|
output["value"], |
|
|
|
<span class="py-2 px-2"> |
|
|
|
to: address_path(@conn, :show, output["value"])) %><%= if length > 1 and index < length - 1 do %>, <% end %> |
|
|
|
<input class="wei-ether" type="checkbox" autocomplete="off"> |
|
|
|
</div> |
|
|
|
<span class="d-inline-block" data-conversion-text-wei><%= gettext("WEI")%></span> |
|
|
|
|
|
|
|
<span class="d-none" data-conversion-text-eth><%= gettext("ETH")%></span> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% else %> |
|
|
|
<% else %> |
|
|
|
<%= raw(values_only(output["value"], output["type"], output["components"])) %> |
|
|
|
<%= if output["type"] == "uint256" do %> |
|
|
|
|
|
|
|
<div class="py-2 word-break-all"> |
|
|
|
|
|
|
|
<div data-wei-ether-converter> |
|
|
|
|
|
|
|
<span data-conversion-unit data-original-value="<%= output["value"] %>"><%= output["value"] %></span> |
|
|
|
|
|
|
|
<span class="py-2 px-2"> |
|
|
|
|
|
|
|
<input class="wei-ether" type="checkbox" autocomplete="off"> |
|
|
|
|
|
|
|
<span class="d-inline-block" data-conversion-text-wei><%= gettext("WEI")%></span> |
|
|
|
|
|
|
|
<span class="d-none" data-conversion-text-eth><%= gettext("ETH")%></span> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% else %> |
|
|
|
|
|
|
|
<%= raw(values_only(output["value"], output["type"], output["components"])) %> |
|
|
|
|
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% error?(function["outputs"]) -> %> |
|
|
|
|
|
|
|
<% {:error, text_error} = function["outputs"] %> |
|
|
|
|
|
|
|
<div class="alert alert-danger py-2 word-break-all" style="margin-bottom: 0;"><%= text_error %></div> |
|
|
|
|
|
|
|
<% true -> %> |
|
|
|
|
|
|
|
<% nil %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|