@solidstate/hardhat-selector-uploader
Version:
Upload local function selectors to the Ethereum Selector Database
23 lines (17 loc) • 531 B
text/typescript
import { uploadSelectors } from '../lib/selector_uploader.js';
import type { NewTaskActionFunction } from 'hardhat/types/tasks';
interface UploadSelectorsActionArguments {
noCompile: boolean;
}
const action: NewTaskActionFunction<UploadSelectorsActionArguments> = async (
args,
hre,
) => {
if (hre.globalOptions.noUploadSelectors) return;
if (!args.noCompile) {
hre.globalOptions.noUploadSelectors = true;
await hre.tasks.getTask('compile').run();
}
await uploadSelectors(hre);
};
export default action;