From b55cc001801579f4a52b73b1422acad7c5cff779 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 15 Sep 2015 12:27:29 +0200 Subject: Export runtime bytecode and version. --- solc/jsonCompiler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index b7bb9fe7..d265ed9c 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -36,6 +36,7 @@ #include #include #include +#include using namespace std; using namespace dev; @@ -169,6 +170,7 @@ string compile(string _input, bool _optimize) contractData["solidity_interface"] = compiler.solidityInterface(contractName); contractData["interface"] = compiler.interface(contractName); contractData["bytecode"] = compiler.object(contractName).toHex(); + contractData["runtimeBytecode"] = compiler.runtimeObject(contractName).toHex(); contractData["opcodes"] = eth::disassemble(compiler.object(contractName).bytecode); contractData["functionHashes"] = functionHashes(compiler.contractDefinition(contractName)); contractData["gasEstimates"] = estimateGas(compiler, contractName); @@ -188,6 +190,10 @@ static string outputBuffer; extern "C" { +extern char const* version() +{ + return VersionString.c_str(); +} extern char const* compileJSON(char const* _input, bool _optimize) { outputBuffer = compile(_input, _optimize); -- cgit