Working, albeit slowly, non-NatSpec transaction confirmations.

This commit is contained in:
Gav Wood 2015-02-15 01:00:09 +01:00
parent 41647fd75f
commit f27ecde256
2 changed files with 6 additions and 0 deletions

View File

@ -333,6 +333,11 @@ void CompilerStack::resolveImports()
swap(m_sourceOrder, sourceOrder); swap(m_sourceOrder, sourceOrder);
} }
std::string CompilerStack::defaultContractName() const
{
return getContract("").contract->getName();
}
CompilerStack::Contract const& CompilerStack::getContract(string const& _contractName) const CompilerStack::Contract const& CompilerStack::getContract(string const& _contractName) const
{ {
if (m_contracts.empty()) if (m_contracts.empty())

View File

@ -73,6 +73,7 @@ public:
void parse(std::string const& _sourceCode); void parse(std::string const& _sourceCode);
/// Returns a list of the contract names in the sources. /// Returns a list of the contract names in the sources.
std::vector<std::string> getContractNames() const; std::vector<std::string> getContractNames() const;
std::string defaultContractName() const;
/// Compiles the source units that were previously added and parsed. /// Compiles the source units that were previously added and parsed.
void compile(bool _optimize = false); void compile(bool _optimize = false);