aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorarkpar <arkadiy@ethdev.com>2015-01-31 21:41:11 +0800
committerarkpar <arkadiy@ethdev.com>2015-01-31 21:41:11 +0800
commitd6d7c9219b66c252c64528db615faafb4ddc650c (patch)
treefcadfa5314d6eb2376d9f36cbb1a37160ff3d79e /AST.cpp
parent6c8b5cabdc9e3f48d95e945d093a480c2ab5032e (diff)
downloaddexon-solidity-d6d7c9219b66c252c64528db615faafb4ddc650c.tar.gz
dexon-solidity-d6d7c9219b66c252c64528db615faafb4ddc650c.tar.zst
dexon-solidity-d6d7c9219b66c252c64528db615faafb4ddc650c.zip
json and solidity ABI generted for events
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/AST.cpp b/AST.cpp
index d7bfb0d3..10464726 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -152,6 +152,23 @@ void ContractDefinition::checkIllegalOverrides() const
}
}
+std::vector<ASTPointer<EventDefinition>> const& ContractDefinition::getInterfaceEvents() const
+{
+ if (!m_interfaceEvents)
+ {
+ set<string> eventsSeen;
+ m_interfaceEvents.reset(new std::vector<ASTPointer<EventDefinition>>());
+ for (ContractDefinition const* contract: getLinearizedBaseContracts())
+ for (ASTPointer<EventDefinition> const& e: contract->getEvents())
+ if (eventsSeen.count(e->getName()) == 0)
+ {
+ eventsSeen.insert(e->getName());
+ m_interfaceEvents->push_back(e);
+ }
+ }
+ return *m_interfaceEvents;
+}
+
vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::getInterfaceFunctionList() const
{
if (!m_interfaceFunctionList)