Merge remote-tracking branch 'origin' into update-deps-last

pull/3210/head
Victor Baranov 4 years ago
commit 7840e8666e
  1. 2
      CHANGELOG.md
  2. 4
      apps/block_scout_web/assets/css/_helpers.scss
  3. 3
      apps/block_scout_web/lib/block_scout_web/schema/types.ex
  4. 2
      apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex
  5. 17
      apps/explorer/lib/explorer/smart_contract/reader.ex

@ -7,6 +7,8 @@
- [#3145](https://github.com/poanetwork/blockscout/pull/3145) - Pending txs per address API endpoint
### Fixes
- [#3209](https://github.com/poanetwork/blockscout/pull/3209) - GraphQL: fix internal server error at request of internal transactions at address
- [#3207](https://github.com/poanetwork/blockscout/pull/3207) - Fix read contract bytes array type output
- [#3203](https://github.com/poanetwork/blockscout/pull/3203) - Improve "get mined blocks" query performance
- [#3202](https://github.com/poanetwork/blockscout/pull/3202) - Fix contracts verification with experimental features enabled
- [#3201](https://github.com/poanetwork/blockscout/pull/3201) - Connect to Metamask button

@ -33,3 +33,7 @@
.hidden {
display: none!important;
}
.word-break-all {
word-break: break-all;
}

@ -156,6 +156,9 @@ defmodule BlockScoutWeb.Schema.Types do
%{last: last}, child_complexity ->
last * child_complexity
%{}, _child_complexity ->
0
end)
end
end

@ -60,7 +60,7 @@
<div data-function-response></div>
</div>
<% else %>
<span class="py-2">
<span class="py-2 word-break-all">
<%= if outputs?(function["outputs"]) do %>
<%= for output <- function["outputs"] do %>
<%= if address?(output["type"]) do %>

@ -321,8 +321,21 @@ defmodule Explorer.SmartContract.Reader do
Map.put_new(output, "value", bytes_to_string(value))
end
defp new_value(%{"type" => "bytes" <> _number} = output, values, index) do
Map.put_new(output, "value", bytes_to_string(Enum.at(values, index)))
defp new_value(%{"type" => "bytes" <> number_rest} = output, values, index) do
if String.contains?(number_rest, "[]") do
values_array = Enum.at(values, index)
values_array_formatted =
Enum.map(values_array, fn value ->
bytes_to_string(value)
end)
values_array_formatted_3 = values_array_formatted ++ values_array_formatted ++ values_array_formatted
Map.put_new(output, "value", values_array_formatted_3)
else
Map.put_new(output, "value", bytes_to_string(Enum.at(values, index)))
end
end
defp new_value(%{"type" => "bytes"} = output, values, index) do

Loading…
Cancel
Save