From c5d14ce933e3f1d4814c73cbb6d7fe7062caaa06 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 9 Jan 2015 17:02:39 +0100 Subject: [PATCH] Work in prgress for creating natspec in alethzero at contract creation --- CompilerStack.cpp | 7 +++++++ CompilerStack.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/CompilerStack.cpp b/CompilerStack.cpp index 174f9cd22..547e5fe21 100644 --- a/CompilerStack.cpp +++ b/CompilerStack.cpp @@ -200,6 +200,13 @@ bytes CompilerStack::staticCompile(std::string const& _sourceCode, bool _optimiz return stack.compile(_sourceCode, _optimize); } +dev::h256 CompilerStack::getContractCodeHash(std::string const& _contractName) +{ + //LTODO + (void) _contractName; + return dev::h256(""); +} + void CompilerStack::reset(bool _keepSources) { m_parseSuccessful = false; diff --git a/CompilerStack.h b/CompilerStack.h index afc9a5162..6b60f1dd3 100644 --- a/CompilerStack.h +++ b/CompilerStack.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace dev { namespace solidity { @@ -104,6 +105,9 @@ public: /// scanning the source code - this is useful for printing exception information. static bytes staticCompile(std::string const& _sourceCode, bool _optimize = false); + /// Get the runtime context's code hash for a contract. LTODO + dev::h256 getContractCodeHash(std::string const& _contractName); + private: /** * Information pertaining to one source unit, filled gradually during parsing and compilation.