Skip to content

Commit b4fd378

Browse files
kumarakCopilot
andauthored
Update lib/patchestry/Passes/InstrumentationPass.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 86c98f0 commit b4fd378

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/patchestry/Passes/InstrumentationPass.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,16 @@ namespace patchestry::passes {
365365
}
366366
}
367367
for (auto &spec : config->libraries.contracts.contracts) {
368+
// Check contract type; assume 'type' field exists and can be "static" or "dynamic"
369+
if (spec.type == "static") {
370+
// Perform any required validation or processing for static contracts here.
371+
// For now, just log that a static contract was found.
372+
LOG(INFO) << "Static contract '" << spec.name << "' does not require implementation file.\n";
373+
continue;
374+
}
368375
if (!spec.implementation) {
369-
continue; // Skip contracts without implementation (e.g., static contracts)
376+
LOG(ERROR) << "Non-static contract '" << spec.name << "' is missing implementation.\n";
377+
continue;
370378
}
371379
auto contracts_file_path =
372380
ConfigurationFile::getInstance().resolve_path(spec.implementation->code_file);

0 commit comments

Comments
 (0)