Merge pull request #3376 from poanetwork/vb-fix-contract-nested-inputs

Fix contract nested inputs
pull/3377/head
Victor Baranov 4 years ago committed by GitHub
commit bf53cf51fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .dialyzer-ignore
  2. 1
      CHANGELOG.md
  3. 10
      apps/explorer/lib/explorer/smart_contract/reader.ex

@ -21,7 +21,7 @@ lib/block_scout_web/views/layout_view.ex:142: The call 'Elixir.Poison.Parser':'p
lib/block_scout_web/views/layout_view.ex:228: The call 'Elixir.Poison.Parser':'parse!'
lib/block_scout_web/controllers/api/rpc/transaction_controller.ex:21
lib/block_scout_web/controllers/api/rpc/transaction_controller.ex:22
lib/explorer/smart_contract/reader.ex:336
lib/explorer/smart_contract/reader.ex:330
lib/indexer/fetcher/token_total_supply_on_demand.ex:16
lib/explorer/exchange_rates/source.ex:41
lib/explorer/exchange_rates/source/coin_gecko.ex:148

@ -8,6 +8,7 @@
### Fixes
- [#3376](https://github.com/poanetwork/blockscout/pull/3376) - Fix contract nested inputs
- [#3375](https://github.com/poanetwork/blockscout/pull/3375) - Prevent terminating of tokens/contracts process
- [#3374](https://github.com/poanetwork/blockscout/pull/3374) - Fix find block timestamp query
- [#3373](https://github.com/poanetwork/blockscout/pull/3373) - Fix horizontal scroll in Tokens table

@ -266,17 +266,11 @@ defmodule Explorer.SmartContract.Reader do
defp format_input_type(input_type) do
case input_type do
{:array, {type, size}, array_size} ->
Atom.to_string(type) <> Integer.to_string(size) <> "[" <> Integer.to_string(array_size) <> "]"
{:array, type, array_size} ->
Atom.to_string(type) <> "[" <> Integer.to_string(array_size) <> "]"
{:array, {type, size}} ->
Atom.to_string(type) <> Integer.to_string(size) <> "[]"
format_input_type(type) <> "[" <> Integer.to_string(array_size) <> "]"
{:array, type} ->
Atom.to_string(type) <> "[]"
format_input_type(type) <> "[]"
{type, size} ->
Atom.to_string(type) <> Integer.to_string(size)

Loading…
Cancel
Save