diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-22 20:00:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 20:00:19 +0800 |
commit | f823952d9f0cc1e37dec465111db976c7a1830b2 (patch) | |
tree | e16fd2565c56d2a0f0c9d11e9fbc63c98f3120be /solc/CommandLineInterface.cpp | |
parent | a95f057e37b746359a7426e95da32e3236f0603a (diff) | |
parent | ba7d698ee67181afc92fd90d18487245cb303389 (diff) | |
download | dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar.gz dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar.bz2 dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar.lz dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar.xz dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.tar.zst dexon-solidity-f823952d9f0cc1e37dec465111db976c7a1830b2.zip |
Merge pull request #2404 from ethereum/methodidentifiers
Clean up method identifiers handling in CLI/CompilerStack
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index e37922c6..0dbedd3c 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -281,9 +281,10 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract) if (!m_args.count(g_argSignatureHashes)) return; + Json::Value methodIdentifiers = m_compiler->methodIdentifiers(_contract); string out; - for (auto const& it: m_compiler->contractDefinition(_contract).interfaceFunctions()) - out += toHex(it.first.ref()) + ": " + it.second->externalSignature() + "\n"; + for (auto const& name: methodIdentifiers.getMemberNames()) + out += methodIdentifiers[name].asString() + ": " + name + "\n"; if (m_args.count(g_argOutputDir)) createFile(m_compiler->filesystemFriendlyName(_contract) + ".signatures", out); @@ -889,7 +890,7 @@ void CommandLineInterface::handleCombinedJSON() contractData[g_strSrcMapRuntime] = map ? *map : ""; } if (requests.count(g_strSignatureHashes)) - contractData[g_strSignatureHashes] = m_compiler->functionHashes(m_compiler->contractDefinition(contractName)); + contractData[g_strSignatureHashes] = m_compiler->methodIdentifiers(contractName); if (requests.count(g_strNatspecDev)) contractData[g_strNatspecDev] = dev::jsonCompactPrint(m_compiler->natspec(contractName, DocumentationType::NatspecDev)); if (requests.count(g_strNatspecUser)) |