Include all overloaded events in ABI

This commit is contained in:
Alex Beregszaszi
2017-08-28 20:07:43 +01:00
parent 3d228e98f1
commit 0e11e5af10
3 changed files with 31 additions and 3 deletions
+10 -2
View File
@@ -176,11 +176,19 @@ vector<EventDefinition const*> const& ContractDefinition::interfaceEvents() cons
m_interfaceEvents.reset(new vector<EventDefinition const*>());
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;
}