@returns true if any binary was requested, i.e. we actually have to perform compilation.
| 268 | |
| 269 | /// @returns true if any binary was requested, i.e. we actually have to perform compilation. |
| 270 | bool isBinaryRequested(Json const& _outputSelection) |
| 271 | { |
| 272 | if (!_outputSelection.is_object()) |
| 273 | return false; |
| 274 | |
| 275 | // This does not include "evm.methodIdentifiers" on purpose! |
| 276 | static std::vector<std::string> const outputsThatRequireBinaries = std::vector<std::string>{ |
| 277 | "*", |
| 278 | "ir", "irAst", "irOptimized", "irOptimizedAst", "yulCFGJson", |
| 279 | "evm.gasEstimates", "evm.legacyAssembly", "evm.assembly" |
| 280 | } + evmObjectComponents("bytecode") + evmObjectComponents("deployedBytecode"); |
| 281 | |
| 282 | for (auto const& fileRequests: _outputSelection) |
| 283 | for (auto const& requests: fileRequests) |
| 284 | for (auto const& output: outputsThatRequireBinaries) |
| 285 | if (isArtifactRequested(requests, output, false)) |
| 286 | return true; |
| 287 | return false; |
| 288 | } |
| 289 | |
| 290 | /// @returns true if EVM bytecode was requested, i.e. we have to run the old code generator. |
| 291 | bool isEvmBytecodeRequested(Json const& _outputSelection) |
no test coverage detected