Merge pull request #2838 from ethereum/statemutability-event

Mark event functions as nonpayable (and not view)
This commit is contained in:
Alex Beregszaszi 2017-08-28 19:37:23 +01:00 committed by GitHub
commit 3d228e98f1

View File

@ -2030,7 +2030,9 @@ FunctionType::FunctionType(FunctionDefinition const& _function, bool _isInternal
}
FunctionType::FunctionType(VariableDeclaration const& _varDecl):
m_kind(Kind::External), m_stateMutability(StateMutability::View), m_declaration(&_varDecl)
m_kind(Kind::External),
m_stateMutability(StateMutability::View),
m_declaration(&_varDecl)
{
TypePointers paramTypes;
vector<string> paramNames;
@ -2090,7 +2092,9 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
}
FunctionType::FunctionType(EventDefinition const& _event):
m_kind(Kind::Event), m_stateMutability(StateMutability::View), m_declaration(&_event)
m_kind(Kind::Event),
m_stateMutability(StateMutability::NonPayable),
m_declaration(&_event)
{
TypePointers params;
vector<string> paramNames;