hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
20 lines • 797 B
JavaScript
import { emptyTask } from "../../../core/config.js";
import { constants } from "./constants/index.js";
import { convert } from "./convert/index.js";
import { fetch } from "./fetch/index.js";
/**
* The category builders that contribute the utils tasks. Each one receives the
* id prefix to nest its tasks under and returns its task definitions. Adding a
* new category is a single entry here.
*/
const CATEGORIES = [constants, convert, fetch];
export function generateTasks(options) {
const prefix = options.prefixWithUtils ? ["utils"] : [];
return [
...(prefix.length > 0
? [emptyTask(prefix, "Utilities for common Ethereum tasks").build()]
: []),
...CATEGORIES.flatMap((category) => category(prefix)),
];
}
//# sourceMappingURL=index.js.map