From 04ae8cf52b30f135317c1bd4e7e3d4c608887f18 Mon Sep 17 00:00:00 2001 From: zachdaniel Date: Mon, 3 Dec 2018 15:58:09 -0500 Subject: [PATCH] fix: match more explicitly on ABI decoding result --- apps/explorer/lib/explorer/chain/log.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/log.ex b/apps/explorer/lib/explorer/chain/log.ex index b2dc8ca639..b6c5c00a2d 100644 --- a/apps/explorer/lib/explorer/chain/log.ex +++ b/apps/explorer/lib/explorer/chain/log.ex @@ -5,7 +5,7 @@ defmodule Explorer.Chain.Log do require Logger - alias ABI.Event + alias ABI.{Event, FunctionSelector} alias Explorer.Chain.{Address, Data, Hash, Transaction} @required_attrs ~w(address_hash data index transaction_hash)a @@ -117,7 +117,7 @@ defmodule Explorer.Chain.Log do def decode(_log, _transaction), do: {:error, :contract_not_verified} defp find_and_decode(abi, log, transaction) do - with {selector, mapping} <- + with {%FunctionSelector{} = selector, mapping} <- abi |> ABI.parse_specification(include_events?: true) |> Event.find_and_decode(