diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d801ee54a..e5f96f4efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Fixes +- [#3347](https://github.com/poanetwork/blockscout/pull/3347) - Contract interaction: fix encoding of bytes output - [#3346](https://github.com/poanetwork/blockscout/pull/3346) - Fix inventory tab pagination - [#3344](https://github.com/poanetwork/blockscout/pull/3344) - Fix logs search on address page - [#3342](https://github.com/poanetwork/blockscout/pull/3342) - Fix mobile styles for contract code tab diff --git a/apps/explorer/lib/explorer/smart_contract/reader.ex b/apps/explorer/lib/explorer/smart_contract/reader.ex index 8d82b58f30..266c6c1828 100644 --- a/apps/explorer/lib/explorer/smart_contract/reader.ex +++ b/apps/explorer/lib/explorer/smart_contract/reader.ex @@ -449,6 +449,10 @@ defmodule Explorer.SmartContract.Reader do Map.put_new(output, "value", bytes_to_string(Enum.at(values, index))) end + defp new_value(%{"type" => :bytes} = output, values, index) do + Map.put_new(output, "value", bytes_to_string(Enum.at(values, index))) + end + defp new_value(output, [value], _index) do Map.put_new(output, "value", value) end