extract_artifact_component_json (crates/cli/src/solc/mod.rs:19-29 at bba50a7) indexes the parsed artifact JSON with json["abi"] / json["bytecode"] / json["deployedBytecode"] and clones the result. When the requested component is absent, indexing yields Value::Null, which is returned as Ok(Null) — the function's own doc comment notes it "does not perform any checks on the returned [Value] such as if it is null or not".
The CLI surfaces this directly:
$ printf '{"bytecode":{"object":"0x60"},"deployedBytecode":{"object":"0x60"}}' > artifact-no-abi.json
$ rain-metadata solc artifact --component abi --input-path artifact-no-abi.json
null
$ echo $?
0
A missing component prints null with exit code 0, indistinguishable from an artifact whose component legitimately serializes as null. Anything piping this output (e.g. into ABI tooling) receives null instead of an error.
Options:
- return an error (nonzero exit) when the component key is absent from the artifact, or
- keep the passthrough but document/flag it at the CLI layer.
Found during round-2 adversarial mutation testing (adjudication A-2).
extract_artifact_component_json(crates/cli/src/solc/mod.rs:19-29at bba50a7) indexes the parsed artifact JSON withjson["abi"]/json["bytecode"]/json["deployedBytecode"]and clones the result. When the requested component is absent, indexing yieldsValue::Null, which is returned asOk(Null)— the function's own doc comment notes it "does not perform any checks on the returned [Value] such as if it is null or not".The CLI surfaces this directly:
A missing component prints
nullwith exit code 0, indistinguishable from an artifact whose component legitimately serializes asnull. Anything piping this output (e.g. into ABI tooling) receivesnullinstead of an error.Options:
Found during round-2 adversarial mutation testing (adjudication A-2).