ABI encoding functions are pure and should be usable in constants.

This commit is contained in:
chriseth
2018-05-15 14:45:54 +02:00
parent dce6224052
commit dac0029d16
5 changed files with 18 additions and 3 deletions
+2 -2
View File
@@ -1046,8 +1046,8 @@ public:
return *m_declaration;
}
bool hasDeclaration() const { return !!m_declaration; }
/// @returns true if the result of this function only depends on its arguments
/// and it does not modify the state.
/// @returns true if the result of this function only depends on its arguments,
/// does not modify the state and is a compile-time constant.
/// Currently, this will only return true for internal functions like keccak and ecrecover.
bool isPure() const;
bool isPayable() const { return m_stateMutability == StateMutability::Payable; }