diff --git a/apps/explorer/lib/explorer/chain/log.ex b/apps/explorer/lib/explorer/chain/log.ex index 717044d66b..3e996e2d37 100644 --- a/apps/explorer/lib/explorer/chain/log.ex +++ b/apps/explorer/lib/explorer/chain/log.ex @@ -117,7 +117,9 @@ defmodule Explorer.Chain.Log do def decode(log, transaction) do case log.first_topic do - "0x" <> <> -> + "0x" <> hex_part -> + {number, ""} = Integer.parse(hex_part, 16) + <> = :binary.encode_unsigned(number) find_candidates(method_id, log, transaction) _ -> @@ -125,11 +127,11 @@ defmodule Explorer.Chain.Log do end end - defp find_candidates(_method_id, log, transaction) do + defp find_candidates(method_id, log, transaction) do candidates_query = from( contract_method in ContractMethod, - # where: contract_method.identifier == ^method_id, + where: contract_method.identifier == ^method_id, limit: 3 )