hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
12 lines (9 loc) • 325 B
text/typescript
import type { ArtifactId } from "@nomicfoundation/edr";
export function formatArtifactId(
artifactId: ArtifactId,
sourceNameToUserSourceName: Map<string, string>,
): string {
const sourceName =
sourceNameToUserSourceName.get(artifactId.source) ?? artifactId.source;
return `${sourceName}:${artifactId.name}`;
}