diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-29 02:37:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-29 02:37:23 +0800 |
commit | 3d228e98f1fe9dfdbebab2537eb1d8bcc1340d0b (patch) | |
tree | 2d358a2584839c548830b87f0195139d9e74b586 | |
parent | ab06346e6ec645ed3ec709aa18169633207a1c02 (diff) | |
parent | c7cb00d49a1ed17434f836c5b44cd1d38c4a735f (diff) | |
download | dexon-solidity-3d228e98f1fe9dfdbebab2537eb1d8bcc1340d0b.tar.gz dexon-solidity-3d228e98f1fe9dfdbebab2537eb1d8bcc1340d0b.tar.zst dexon-solidity-3d228e98f1fe9dfdbebab2537eb1d8bcc1340d0b.zip |
Merge pull request #2838 from ethereum/statemutability-event
Mark event functions as nonpayable (and not view)
-rw-r--r-- | libsolidity/ast/Types.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 5e61cdee..65b09840 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -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; |