Skip to content

Commit

Permalink
Update COMPILER_VERSION_RANGE_ERROR message
Browse files Browse the repository at this point in the history
  • Loading branch information
Mimi TxFusion committed Sep 20, 2023
1 parent 1b6a3d1 commit 2715167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat-zksync-vyper/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DEFAULT_COMPILER_VERSION_INFO_CACHE_PERIOD = 24 * 60 * 60 * 1000; /
export const COMPILER_VERSION_INFO_FILE_NOT_FOUND_ERROR = 'Could not find zkvyper compiler version info file. Please check your internet connection and try again.';
export const COMPILER_VERSION_INFO_FILE_DOWNLOAD_ERROR = 'Could not download zkvyper compiler version info file. Please check your internet connection and try again.';

export const COMPILER_VERSION_RANGE_ERROR = (version: string, minVersion: string, latestVersion: string) => `Deprecated zkvyper compiler version in hardhat config file (${version}). Please use versions ${minVersion} to ${latestVersion}.`;
export const COMPILER_VERSION_RANGE_ERROR = (version: string, minVersion: string, latestVersion: string) => `The zkvyper compiler version (${version}) in the hardhat config file is not within the allowed range. Please use versions ${minVersion} to ${latestVersion}.`;
export const COMPILER_VERSION_WARNING = (version: string, latestVersion: string) => `The zkvyper compiler version in your Hardhat config file (${version}) is not the latest. We recommend using the latest version ${latestVersion}.`;
export const COMPILER_BINARY_CORRUPTION_ERROR = (compilerPath: string) => `The zkvyper binary at path ${compilerPath} is corrupted. Please delete it and try again.`;
export const COMPILING_INFO_MESSAGE = (zksolcVersion: string, solcVersion: string) => `Compiling contracts for zkSync Era with zkvyper v${zksolcVersion} and vyper v${solcVersion}`;
Expand Down
22 changes: 2 additions & 20 deletions packages/hardhat-zksync-vyper/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,29 +206,11 @@ subtask(TASK_COMPILE_VYPER_LOG_COMPILATION_ERRORS)
.addParam("output", undefined, undefined, types.any)
.addParam("quiet", undefined, undefined, types.boolean)
.setAction(async ({ output }: { output: any; quiet: boolean }) => {
// if (output?.errors === undefined) {
// return;
// }

// for (const error of output.errors) {
// if (error.severity === "error") {
// const errorMessage: string =
// getFormattedInternalCompilerErrorMessage(error) ??
// error.formattedMessage;

// console.error(errorMessage.replace(/^\w+:/, (t) => chalk.red.bold(t)));
// } else {
// console.warn(
// (error.formattedMessage as string).replace(/^\w+:/, (t) =>
// chalk.yellow.bold(t)
// )
// );
// }
// }

// Iterate over contracts
for (const contractPath in output) {
if (contractPath !== "version" && contractPath !== "zk_version") {
const contract = output[contractPath];

if (contract.warnings && Array.isArray(contract.warnings) && contract.warnings.length > 0) {
// Iterate over warnings
for (const warning of contract.warnings) {
Expand Down

0 comments on commit 2715167

Please sign in to comment.