diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-07 01:02:56 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-19 22:57:36 +0800 |
commit | 4bf3cbb09a42131dba27b080a4917f30284959d3 (patch) | |
tree | 04623e38aee222c71192d42b132dc56a35fe621f /libsolidity/interface/CompilerStack.cpp | |
parent | 8169e149c98b14861cc6467f9f796010f617c521 (diff) | |
download | dexon-solidity-4bf3cbb09a42131dba27b080a4917f30284959d3.tar.gz dexon-solidity-4bf3cbb09a42131dba27b080a4917f30284959d3.tar.zst dexon-solidity-4bf3cbb09a42131dba27b080a4917f30284959d3.zip |
Use CompilerStack.contractABI directly
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 7887a2cb..1f235656 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -449,6 +449,11 @@ Json::Value const& CompilerStack::contractABI(string const& _contractName) const return metadata(_contractName, DocumentationType::ABIInterface); } +Json::Value const& CompilerStack::contractABI(Contract const& _contract) const +{ + return metadata(_contract, DocumentationType::ABIInterface); +} + Json::Value const& CompilerStack::metadata(string const& _contractName, DocumentationType _type) const { return metadata(contract(_contractName), _type); @@ -830,7 +835,7 @@ string CompilerStack::createOnChainMetadata(Contract const& _contract) const for (auto const& library: m_libraries) meta["settings"]["libraries"][library.first] = "0x" + toHex(library.second.asBytes()); - meta["output"]["abi"] = metadata(_contract, DocumentationType::ABIInterface); + meta["output"]["abi"] = contractABI(_contract); meta["output"]["userdoc"] = metadata(_contract, DocumentationType::NatspecUser); meta["output"]["devdoc"] = metadata(_contract, DocumentationType::NatspecDev); |