MCPcopy Create free account
hub / github.com/argotorg/solidity / lastContractName

Method lastContractName

libsolidity/interface/CompilerStack.cpp:890–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890std::string const CompilerStack::lastContractName(std::optional<std::string> const& _sourceName) const
891{
892 solAssert(m_stackState >= AnalysisSuccessful, "Parsing was not successful.");
893 // try to find some user-supplied contract
894 std::string contractName;
895 for (auto const& it: m_sources)
896 if (_sourceName.value_or(it.first) == it.first)
897 for (auto const* contract: ASTNode::filteredNodes<ContractDefinition>(it.second.ast->nodes()))
898 contractName = contract->fullyQualifiedName();
899 return contractName;
900}
901
902evmasm::AssemblyItems const* CompilerStack::assemblyItems(std::string const& _contractName) const
903{

Callers 7

compileContractMethod · 0.80
testCreationTimeGasMethod · 0.80
testRunTimeGasMethod · 0.80
runMethod · 0.80
runTestMethod · 0.80

Calls 2

nodesMethod · 0.80
fullyQualifiedNameMethod · 0.80

Tested by 3

runMethod · 0.64
runTestMethod · 0.64