Skip to content

Commit 34963f3

Browse files
committed
fix: add error handling for missing contract output in storage layout script
1 parent cc92805 commit 34963f3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

contracts/scripts/storage-layout.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ task("storage-layout", "Prints the storage layout of a contract").setAction(
2222
const contractOutput = buildInfo.output.contracts[
2323
"src/arbitration/KlerosCore.sol"
2424
]["KlerosCore"] as ContractOutputWithStorageLayout;
25+
if (!contractOutput) {
26+
throw new Error(
27+
"Contract output not found for src/arbitration/KlerosCore.sol:KlerosCore",
28+
);
29+
}
2530
console.log(contractOutput.storageLayout);
2631
},
2732
);

0 commit comments

Comments
 (0)