From 0e11e5af10de880340a005f63f778909c8664c90 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 25 Aug 2017 10:41:48 +0100 Subject: Include all overloaded events in ABI --- libsolidity/ast/AST.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libsolidity/ast') diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 2e4ae72a..a805322b 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -176,11 +176,19 @@ vector const& ContractDefinition::interfaceEvents() cons m_interfaceEvents.reset(new vector()); for (ContractDefinition const* contract: annotation().linearizedBaseContracts) for (EventDefinition const* e: contract->events()) - if (eventsSeen.count(e->name()) == 0) + { + /// NOTE: this requires the "internal" version of an Event, + /// though here internal strictly refers to visibility, + /// and not to function encoding (jump vs. call) + auto const& function = e->functionType(true); + solAssert(function, ""); + string eventSignature = function->externalSignature(); + if (eventsSeen.count(eventSignature) == 0) { - eventsSeen.insert(e->name()); + eventsSeen.insert(eventSignature); m_interfaceEvents->push_back(e); } + } } return *m_interfaceEvents; } -- cgit