From b6ddde9372c897c1eafc24ee16e3aa6aeec3f2f6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 7 Oct 2015 16:40:54 +0200 Subject: Allow four indexed arguments for anynomous events. --- libsolidity/TypeChecker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libsolidity') diff --git a/libsolidity/TypeChecker.cpp b/libsolidity/TypeChecker.cpp index fe6fb970..2afa5649 100644 --- a/libsolidity/TypeChecker.cpp +++ b/libsolidity/TypeChecker.cpp @@ -554,7 +554,9 @@ bool TypeChecker::visit(EventDefinition const& _eventDef) { if (var->isIndexed()) numIndexed++; - if (numIndexed > 3) + if (_eventDef.isAnonymous() && numIndexed > 4) + typeError(_eventDef, "More than 4 indexed arguments for anonymous event."); + else if (!_eventDef.isAnonymous() && numIndexed > 3) typeError(_eventDef, "More than 3 indexed arguments for event."); if (!type(*var)->canLiveOutsideStorage()) typeError(*var, "Type is required to live outside storage."); -- cgit v1.2.3