hardhat-abi-exporter
Version:
Export Ethereum smart contract ABIs on compilation
12 lines (11 loc) • 490 B
JavaScript
import { exportAbiGroup } from '../logic.js';
export default async () => ({
onCleanUpArtifacts: async (context, artifactPaths, next) => {
// TODO: skip if solidity coverage running
if (!context.globalOptions.noExportAbi) {
const entries = context.config.abiExporter.filter((entry) => entry.runOnCompile);
await Promise.all(entries.map((entry) => exportAbiGroup(context, entry)));
}
return next(context, artifactPaths);
},
});