aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-17 02:19:34 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-17 17:51:03 +0800
commit2986ecbd753ad0e3f76c98280e68f7f9a464518f (patch)
treed5df83f4c6fef2b1a2b041a0c7f1beb48e4a0f23 /ExpressionCompiler.cpp
parentfc0bdc3d81189b52314c67e0b1d77c451b7b7091 (diff)
downloaddexon-solidity-2986ecbd753ad0e3f76c98280e68f7f9a464518f.tar.gz
dexon-solidity-2986ecbd753ad0e3f76c98280e68f7f9a464518f.tar.zst
dexon-solidity-2986ecbd753ad0e3f76c98280e68f7f9a464518f.zip
Added anonymous flag to event.
added test
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index a0a688bb..99673edd 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -542,9 +542,12 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
appendTypeConversion(*arguments[arg - 1]->getType(),
*function.getParameterTypes()[arg - 1], true);
}
- m_context << u256(h256::Arith(dev::sha3(function.getCanonicalSignature(event.getName()))));
- ++numIndexed;
- solAssert(numIndexed <= 4, "Too many indexed arguments.");
+ if (!event.IsAnonymous())
+ {
+ m_context << u256(h256::Arith(dev::sha3(function.getCanonicalSignature(event.getName()))));
+ ++numIndexed;
+ }
+ solAssert(numIndexed <= 4 - (event.IsAnonymous() ? 1 : 0), "Too many indexed arguments.");
// Copy all non-indexed arguments to memory (data)
m_context << u256(0);
for (unsigned arg = 0; arg < arguments.size(); ++arg)