We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 824adfe commit ac0327dCopy full SHA for ac0327d
script/libraries/LibInitializeGuard.sol
@@ -340,9 +340,12 @@ library LibInitializeGuard {
340
string memory path
341
) internal pure returns (string memory contractName) {
342
uint256 length = bytes(path).length;
343
- // Remove ".sol"
+ contractName = path;
344
if (path.endsWith(".sol")) contractName = path.slice(0, length - 4);
345
- return string(contractName);
+ string[] memory parts = contractName.split(":");
346
+ if (parts.length != 0) contractName = parts[parts.length - 1];
347
+ parts = contractName.split("/");
348
349
}
350
351
/**
0 commit comments