diff options
author | chriseth <chris@ethereum.org> | 2017-06-08 17:14:58 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-16 19:12:43 +0800 |
commit | 080be885f835462f0074b05c617fa670402b067a (patch) | |
tree | 125e42f6e50dda15b327137233d14da2ec25110d /libsolidity/interface/ABI.cpp | |
parent | 22f85d5af371bb621f8735957b7519d14e3b40c9 (diff) | |
download | dexon-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.cpp | 5 |
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; |