From a87dd17d0f485ae2738371020774fda68644ecea Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 29 Mar 2017 22:07:58 +0100 Subject: Move opcodes inside the bytecode section --- libsolidity/interface/StandardCompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libsolidity/interface/StandardCompiler.cpp') diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 9e425d36..e12b6444 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -266,13 +266,13 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) // @TODO: add assembly ostringstream unused; evmData["legacyAssembly"] = m_compilerStack.streamAssembly(unused, contractName, createSourceList(_input), true); - evmData["opcodes"] = solidity::disassemble(m_compilerStack.object(contractName).bytecode); evmData["methodIdentifiers"] = methodIdentifiers(m_compilerStack.contractDefinition(contractName)); // @TODO: add gasEstimates // EVM bytecode Json::Value bytecode(Json::objectValue); bytecode["object"] = m_compilerStack.object(contractName).toHex(); + bytecode["opcodes"] = solidity::disassemble(m_compilerStack.object(contractName).bytecode); auto sourceMap = m_compilerStack.sourceMapping(contractName); bytecode["sourceMap"] = sourceMap ? *sourceMap : ""; // @TODO: add linkReferences @@ -281,6 +281,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) // EVM deployed bytecode Json::Value deployedBytecode(Json::objectValue); deployedBytecode["object"] = m_compilerStack.runtimeObject(contractName).toHex(); + deployedBytecode["opcodes"] = solidity::disassemble(m_compilerStack.runtimeObject(contractName).bytecode); auto runtimeSourceMap = m_compilerStack.runtimeSourceMapping(contractName); deployedBytecode["sourceMap"] = runtimeSourceMap ? *runtimeSourceMap : ""; // @TODO: add linkReferences -- cgit