Work in prgress for creating natspec in alethzero at contract creation

This commit is contained in:
Lefteris Karapetsas 2015-01-09 17:02:39 +01:00
parent 24a2335c01
commit c5d14ce933
2 changed files with 11 additions and 0 deletions

View File

@ -200,6 +200,13 @@ bytes CompilerStack::staticCompile(std::string const& _sourceCode, bool _optimiz
return stack.compile(_sourceCode, _optimize); return stack.compile(_sourceCode, _optimize);
} }
dev::h256 CompilerStack::getContractCodeHash(std::string const& _contractName)
{
//LTODO
(void) _contractName;
return dev::h256("");
}
void CompilerStack::reset(bool _keepSources) void CompilerStack::reset(bool _keepSources)
{ {
m_parseSuccessful = false; m_parseSuccessful = false;

View File

@ -28,6 +28,7 @@
#include <memory> #include <memory>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <libdevcore/Common.h> #include <libdevcore/Common.h>
#include <libdevcore/FixedHash.h>
namespace dev { namespace dev {
namespace solidity { namespace solidity {
@ -104,6 +105,9 @@ public:
/// scanning the source code - this is useful for printing exception information. /// scanning the source code - this is useful for printing exception information.
static bytes staticCompile(std::string const& _sourceCode, bool _optimize = false); 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: private:
/** /**
* Information pertaining to one source unit, filled gradually during parsing and compilation. * Information pertaining to one source unit, filled gradually during parsing and compilation.