mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support methodIdentifiers
This commit is contained in:
parent
f25efceaf8
commit
63b6d0099f
@ -99,6 +99,14 @@ StringMap createSourceList(Json::Value const& _input)
|
||||
return sources;
|
||||
}
|
||||
|
||||
Json::Value methodIdentifiers(ContractDefinition const& _contract)
|
||||
{
|
||||
Json::Value methodIdentifiers(Json::objectValue);
|
||||
for (auto const& it: _contract.interfaceFunctions())
|
||||
methodIdentifiers[it.second->externalSignature()] = toHex(it.first.ref());
|
||||
return methodIdentifiers;
|
||||
}
|
||||
|
||||
Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
|
||||
{
|
||||
m_compilerStack.reset(false);
|
||||
@ -259,7 +267,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
|
||||
ostringstream unused;
|
||||
evmData["legacyAssembly"] = m_compilerStack.streamAssembly(unused, contractName, createSourceList(_input), true);
|
||||
evmData["opcodes"] = solidity::disassemble(m_compilerStack.object(contractName).bytecode);
|
||||
// @TODO: add methodIdentifiers
|
||||
evmData["methodIdentifiers"] = methodIdentifiers(m_compilerStack.contractDefinition(contractName));
|
||||
// @TODO: add gasEstimates
|
||||
|
||||
// EVM bytecode
|
||||
|
Loading…
Reference in New Issue
Block a user