From 12bf6043d5b6745470ca807ba4e4cbf6ea56caa4 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 10:57:19 +0300 Subject: [PATCH 1/3] preload smart contract for logs decoding --- .../block_scout_web/controllers/transaction_log_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index 0a87d12493..20272b4311 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -11,7 +11,7 @@ defmodule BlockScoutWeb.TransactionLogController do def index(conn, %{"transaction_id" => transaction_hash_string, "type" => "JSON"} = params) do with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), {:ok, transaction} <- - Chain.hash_to_transaction(transaction_hash) do + Chain.hash_to_transaction(transaction_hash, [necessity_by_association: %{[to_address: :smart_contract] => :optional}]) do full_options = Keyword.merge( [ From ab64fc4b226ab905da4e0b7d10e34da1ec54ab56 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 11:02:22 +0300 Subject: [PATCH 2/3] mix format --- .../block_scout_web/controllers/transaction_log_controller.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index 20272b4311..96d626b140 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -11,7 +11,9 @@ defmodule BlockScoutWeb.TransactionLogController do def index(conn, %{"transaction_id" => transaction_hash_string, "type" => "JSON"} = params) do with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), {:ok, transaction} <- - Chain.hash_to_transaction(transaction_hash, [necessity_by_association: %{[to_address: :smart_contract] => :optional}]) do + Chain.hash_to_transaction(transaction_hash, + necessity_by_association: %{[to_address: :smart_contract] => :optional} + ) do full_options = Keyword.merge( [ From b74e07decb4047020c4a4b83998d517225aa28b8 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 11:04:47 +0300 Subject: [PATCH 3/3] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b2dbee4bc..f03c39c275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2410](https://github.com/poanetwork/blockscout/pull/2410) - preload smart contract for logs decoding - [#2398](https://github.com/poanetwork/blockscout/pull/2398) - show only one decoded candidate - [#2395](https://github.com/poanetwork/blockscout/pull/2395) - new block loading animation - [#2389](https://github.com/poanetwork/blockscout/pull/2389) - Reduce Lodash lib size (86% of lib methods are not used)