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

Method yulCFGJson

libsolidity/interface/CompilerStack.cpp:1043–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1041}
1042
1043std::optional<Json> CompilerStack::yulCFGJson(std::string const& _contractName) const
1044{
1045 solAssert(m_stackState == CompilationSuccessful, "Compilation was not successful.");
1046 solUnimplementedAssert(!isExperimentalSolidity());
1047
1048 // NOTE: Intentionally not using LazyInit. The artifact can get very large and we don't want to
1049 // keep it around when compiling a large project containing many contracts.
1050 Contract const& currentContract = contract(_contractName);
1051 yulAssert(currentContract.contract);
1052 yulAssert(currentContract.yulIROptimized.has_value() == currentContract.contract->canBeDeployed());
1053 if (!currentContract.yulIROptimized)
1054 return std::nullopt;
1055 return loadGeneratedIR(*currentContract.yulIROptimized).cfgJson();
1056}
1057
1058std::optional<std::string> const& CompilerStack::yulIROptimized(std::string const& _contractName) const
1059{

Callers 2

compileSolidityMethod · 0.80
handleYulCFGExportMethod · 0.80

Calls 2

canBeDeployedMethod · 0.80
cfgJsonMethod · 0.80

Tested by

no test coverage detected