UNPKG

@solidstate/hardhat-4byte-uploader

Version:

Upload local function selectors to the Ethereum Selector Database

12 lines (9 loc) 410 B
import { TASK_COMPILE } from 'hardhat/builtin-tasks/task-names'; import { task } from 'hardhat/config'; import { isRunningOnCiServer } from 'hardhat/internal/util/ci-detection'; task(TASK_COMPILE).setAction(async (args, hre, runSuper) => { await runSuper(args); if (hre.config.fourByteUploader.runOnCompile && !isRunningOnCiServer()) { await hre.run('upload-selectors', { noCompile: true }); } });