aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/ABI.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-08 17:14:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-16 19:12:43 +0800
commit080be885f835462f0074b05c617fa670402b067a (patch)
tree125e42f6e50dda15b327137233d14da2ec25110d /libsolidity/interface/ABI.cpp
parent22f85d5af371bb621f8735957b7519d14e3b40c9 (diff)
downloaddexon-solidity-080be885f835462f0074b05c617fa670402b067a.tar.gz
dexon-solidity-080be885f835462f0074b05c617fa670402b067a.tar.zst
dexon-solidity-080be885f835462f0074b05c617fa670402b067a.zip
Function signatures containing structs.
Diffstat (limited to 'libsolidity/interface/ABI.cpp')
-rw-r--r--libsolidity/interface/ABI.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/interface/ABI.cpp b/libsolidity/interface/ABI.cpp
index 7c7496cd..c04de57e 100644
--- a/libsolidity/interface/ABI.cpp
+++ b/libsolidity/interface/ABI.cpp
@@ -120,12 +120,13 @@ Json::Value ABI::formatType(string const& _name, Type const& _type, bool _forLib
{
Json::Value ret;
ret["name"] = _name;
+ string suffix = (_forLibrary && _type.dataStoredIn(DataLocation::Storage)) ? " storage" : "";
if (_type.isValueType() || (_forLibrary && _type.dataStoredIn(DataLocation::Storage)))
- ret["type"] = _type.canonicalName(_forLibrary);
+ ret["type"] = _type.canonicalName() + suffix;
else if (ArrayType const* arrayType = dynamic_cast<ArrayType const*>(&_type))
{
if (arrayType->isByteArray())
- ret["type"] = _type.canonicalName(_forLibrary);
+ ret["type"] = _type.canonicalName() + suffix;
else
{
string suffix;