diff options
author | arkpar <arkadiy@ethdev.com> | 2015-01-31 21:41:11 +0800 |
---|---|---|
committer | arkpar <arkadiy@ethdev.com> | 2015-01-31 21:41:11 +0800 |
commit | d6d7c9219b66c252c64528db615faafb4ddc650c (patch) | |
tree | fcadfa5314d6eb2376d9f36cbb1a37160ff3d79e /AST.cpp | |
parent | 6c8b5cabdc9e3f48d95e945d093a480c2ab5032e (diff) | |
download | dexon-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.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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) |