hardhat/builtin-tasks/task-names#TASK_COMPILE_SOLIDITY TypeScript Examples
The following examples show how to use
hardhat/builtin-tasks/task-names#TASK_COMPILE_SOLIDITY.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts From openzeppelin-upgrades with MIT License | 6 votes |
subtask(TASK_COMPILE_SOLIDITY, async (args: { force: boolean }, hre, runSuper) => {
const { readValidations, ValidationsCacheOutdated, ValidationsCacheNotFound } = await import('./utils/validations');
try {
await readValidations(hre);
} catch (e) {
if (e instanceof ValidationsCacheOutdated || e instanceof ValidationsCacheNotFound) {
args = { ...args, force: true };
} else {
throw e;
}
}
return runSuper(args);
});