aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/interface/ABI.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/interface/ABI.cpp b/libsolidity/interface/ABI.cpp
index 12f958fc..9fc2f4e8 100644
--- a/libsolidity/interface/ABI.cpp
+++ b/libsolidity/interface/ABI.cpp
@@ -38,6 +38,7 @@ Json::Value ABI::generate(ContractDefinition const& _contractDef)
method["name"] = it.second->declaration().name();
method["constant"] = it.second->isConstant();
method["payable"] = it.second->isPayable();
+ method["statemutability"] = stateMutabilityToString(it.second->stateMutability());
method["inputs"] = formatTypeList(
externalFunctionType->parameterNames(),
externalFunctionType->parameterTypes(),
@@ -57,6 +58,7 @@ Json::Value ABI::generate(ContractDefinition const& _contractDef)
auto externalFunction = FunctionType(*_contractDef.constructor(), false).interfaceFunctionType();
solAssert(!!externalFunction, "");
method["payable"] = externalFunction->isPayable();
+ method["statemutability"] = stateMutabilityToString(externalFunction->stateMutability());
method["inputs"] = formatTypeList(
externalFunction->parameterNames(),
externalFunction->parameterTypes(),
@@ -71,6 +73,7 @@ Json::Value ABI::generate(ContractDefinition const& _contractDef)
Json::Value method;
method["type"] = "fallback";
method["payable"] = externalFunctionType->isPayable();
+ method["statemutability"] = stateMutabilityToString(externalFunctionType->stateMutability());
abi.append(method);
}
for (auto const& it: _contractDef.interfaceEvents())