Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General dependency cleanup #5767

Merged
merged 14 commits into from
Oct 26, 2024
4 changes: 2 additions & 2 deletions packages/hardhat-verify/src/index.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import type {
} from "./internal/solc/artifacts";
import type { Bytecode } from "./internal/solc/bytecode";

import chalk from "picocolors";
import picocolors from "picocolors";
import { extendConfig, subtask, task, types } from "hardhat/config";

import {
@@ -197,7 +197,7 @@ subtask(
!config.blockscout.enabled
) {
console.warn(
chalk.yellow(
picocolors.yellow(
`[WARNING] No verification services are enabled. Please enable at least one verification service in your configuration.`
)
);
4 changes: 2 additions & 2 deletions packages/hardhat-verify/src/internal/config.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import type {
BlockscoutConfig,
} from "../types";

import chalk from "picocolors";
import picocolors from "picocolors";

export function etherscanConfigExtender(
config: HardhatConfig,
@@ -28,7 +28,7 @@ export function etherscanConfigExtender(
config.networks?.etherscan !== undefined
) {
console.warn(
chalk.yellow(
picocolors.yellow(
"WARNING: you have an 'etherscan' entry in your networks configuration. This is likely a mistake. The etherscan configuration should be at the root of the configuration, not within the networks object."
)
);
4 changes: 2 additions & 2 deletions packages/hardhat-verify/src/internal/tasks/sourcify.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import type {
LibraryToAddress,
} from "../solc/artifacts";

import chalk from "picocolors";
import picocolors from "picocolors";
import { subtask, types } from "hardhat/config";
import { isFullyQualifiedName } from "hardhat/utils/contract-names";
import { HARDHAT_NETWORK_NAME } from "hardhat/plugins";
@@ -224,7 +224,7 @@ ${contractURL}

subtask(TASK_VERIFY_SOURCIFY_DISABLED_WARNING, async () => {
console.info(
chalk.cyan(
picocolors.cyan(
`[INFO] Sourcify Verification Skipped: Sourcify verification is currently disabled. To enable it, add the following entry to your Hardhat configuration:

sourcify: {
10 changes: 5 additions & 5 deletions packages/hardhat-verify/src/internal/utilities.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import type { JsonFragment } from "@ethersproject/abi";
import type { SolidityConfig } from "hardhat/types";
import type { ChainConfig } from "../types";

import chalk from "picocolors";
import picocolors from "picocolors";
import path from "path";
import { builtinChains } from "./chain-config";
import {
@@ -45,7 +45,7 @@ export async function printSupportedNetworks(
]);

const supportedNetworksTable = table([
[chalk.bold("network"), chalk.bold("chain id")],
[picocolors.bold("network"), picocolors.bold("chain id")],
...supportedNetworks,
]);

@@ -58,7 +58,7 @@ export async function printSupportedNetworks(
const customNetworksTable =
customNetworks.length > 0
? table([
[chalk.bold("network"), chalk.bold("chain id")],
[picocolors.bold("network"), picocolors.bold("chain id")],
...customNetworks,
])
: table([["No custom networks were added"]]);
@@ -85,7 +85,7 @@ To learn how to add custom networks, follow these instructions: https://hardhat.
* are the names of verification subtasks and the values are HardhatVerifyError
* objects describing the specific errors.
* @remarks This function formats and logs the verification errors to the
* console with a red color using chalk. Each error is displayed along with the
* console with a red color using picocolors. Each error is displayed along with the
* name of the verification provider it belongs to.
* @example
* const errors: Record<string, HardhatVerifyError> = {
@@ -119,7 +119,7 @@ export function printVerificationErrors(
errorMessage += `${subtaskLabel}:\n${error.message}\n\n`;
}

console.error(chalk.red(errorMessage));
console.error(picocolors.red(errorMessage));
}

/**
4 changes: 2 additions & 2 deletions packages/hardhat-verify/test/unit/utilities.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import type { ChainConfig } from "../../src/types";
import path from "path";
import { assert, expect } from "chai";
import sinon from "sinon";
import chalk from "picocolors";
import picocolors from "picocolors";

import {
encodeArguments,
@@ -65,7 +65,7 @@ describe("Utilities", () => {
const errorMessage = errorStub.getCall(0).args[0];
assert.equal(
errorMessage,
chalk.red(
picocolors.red(
`hardhat-verify found one or more errors during the verification process:

Etherscan: