mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added anonymous to ABI
This commit is contained in:
parent
5a5577f5a5
commit
46cbb5525c
2
AST.h
2
AST.h
@ -570,7 +570,7 @@ public:
|
|||||||
|
|
||||||
std::vector<ASTPointer<VariableDeclaration>> const& getParameters() const { return m_parameters->getParameters(); }
|
std::vector<ASTPointer<VariableDeclaration>> const& getParameters() const { return m_parameters->getParameters(); }
|
||||||
ParameterList const& getParameterList() const { return *m_parameters; }
|
ParameterList const& getParameterList() const { return *m_parameters; }
|
||||||
bool IsAnonymous() const { return m_anonymous; }
|
bool isAnonymous() const { return m_anonymous; }
|
||||||
|
|
||||||
virtual TypePointer getType(ContractDefinition const* = nullptr) const override
|
virtual TypePointer getType(ContractDefinition const* = nullptr) const override
|
||||||
{
|
{
|
||||||
|
@ -542,7 +542,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
|||||||
appendTypeConversion(*arguments[arg - 1]->getType(),
|
appendTypeConversion(*arguments[arg - 1]->getType(),
|
||||||
*function.getParameterTypes()[arg - 1], true);
|
*function.getParameterTypes()[arg - 1], true);
|
||||||
}
|
}
|
||||||
if (!event.IsAnonymous())
|
if (!event.isAnonymous())
|
||||||
{
|
{
|
||||||
m_context << u256(h256::Arith(dev::sha3(function.getCanonicalSignature(event.getName()))));
|
m_context << u256(h256::Arith(dev::sha3(function.getCanonicalSignature(event.getName()))));
|
||||||
++numIndexed;
|
++numIndexed;
|
||||||
|
@ -70,7 +70,7 @@ std::unique_ptr<std::string> InterfaceHandler::getABIInterface(ContractDefinitio
|
|||||||
Json::Value event;
|
Json::Value event;
|
||||||
event["type"] = "event";
|
event["type"] = "event";
|
||||||
event["name"] = it->getName();
|
event["name"] = it->getName();
|
||||||
//todo add anonymous!;
|
event["anonymous"] = it->isAnonymous();
|
||||||
Json::Value params(Json::arrayValue);
|
Json::Value params(Json::arrayValue);
|
||||||
for (auto const& p: it->getParameters())
|
for (auto const& p: it->getParameters())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user