Skip to content

Hardhat 3 errors

This section contains a list of all the possible errors you may encounter when using Hardhat and an explanation of each of them.

HHE1: You are not inside a Hardhat project

Section titled “HHE1: You are not inside a Hardhat project”

You are trying to run Hardhat outside of a Hardhat project.

You can learn how to use Hardhat by reading the Getting Started guide.

While loading the plugins, two different plugins where found with the same id.

Please double check whether you have multiple versions of the same plugin installed.

Hardhat couldn’t find a config file in the current directory or any of its parents.

The config file doesn’t exist at the provided path.

There is nothing exported from the config file.

The config file doesn’t export a valid configuration object.

A configuration variable was expected to be set as an environment variable, but it wasn’t.

Given value was not a valid URL.

Given value was not a valid BigInt.

Cannot create a new Hardhat project, the current folder is already associated with a project.

You are trying to initialize a project but you are not in an interactive shell.

Please re-run the command inside an interactive shell.

You are trying to perform an unsupported operation.

Unless you are creating a task or plugin, this is probably a bug.

Please report it to help us improve Hardhat.

You are trying to initialize a new Hardhat project, but your package.json does not have the property “type” set to “module”.

Currently, Hardhat only supports ESM projects.

Please add the property “type” with the value “module” in your package.json to ensure that your project is recognized as an ESM project.

The global option is already defined by another plugin. Please ensure that global options are uniquely named to avoid conflicts.

The configuration you provided is invalid. Please check the documentation to learn how to configure Hardhat correctly.

The template you provided is not found. Please check the documentation to learn which templates are available.

The workspace you provided is not a directory. Please ensure that the workspace is a directory and try again.

Given value was not a valid hex string.

HHE19: Config variable format must include {variable}

Section titled “HHE19: Config variable format must include {variable}”

The config variable format must include the string “{variable}”, which will be replaced with the actual value of the variable.

HHE20: Invalid fully qualified contract name

Section titled “HHE20: Invalid fully qualified contract name”

A contract name was expected to be in fully qualified form, but it’s not.

A fully qualified name should look like file.sol:Contract

The config file has JS/TS errors.

Please resolve the errors before rerunning the command.

HHE22: Hardhat is not installed or installed globally

Section titled “HHE22: Hardhat is not installed or installed globally”

You tried to run Hardhat from a global installation or not installing it at all. This is not supported.

Please install Hardhat locally using pnpm, npm or yarn, and try again.

An internal invariant was violated. This is probably caused by a programming error in Hardhat or in one of the used plugins.

Please report it to help us improve Hardhat.

A code path that has not been implemented was unexpectedly triggered.

Please report it to help us improve Hardhat.

A plugin was included in the Hardhat config but has not been installed into “node_modules”.

A plugin’s peer dependency has not been installed.

A plugin’s peer dependency expected version does not match the version of the installed package.

Please install a version of the peer dependency that meets the plugin’s requirements.

HHE203: Plugin dependency could not be loaded

Section titled “HHE203: Plugin dependency could not be loaded”

The loading of a plugin’s dependent plugin failed.

HHE300: Plugin hook factory is not a valid file URL

Section titled “HHE300: Plugin hook factory is not a valid file URL”

The loading of a plugin’s hook factory failed as the import path is not a valid file:// URL.

HHE301: Unexpected hook parameter modification

Section titled “HHE301: Unexpected hook parameter modification”

The parameter is not allowed to be modified

The setAction function was called with a string parameter that is not a valid file URL. A valid file URL must start with ‘file://’.

Please ensure that you are providing a correct file URL.

A task was defined without an action.

Please ensure that an action is defined for each task.

A variadic argument must always be the last positional argument in a task definition.

Required positional arguments must be defined before optional ones in a task definition.

The provided task name does not match any task.

The parent task of the subtask being defined was not found. If you intend to only define subtasks, please first define the parent task as an empty task.

The task is already defined. Please ensure that tasks are uniquely named to avoid conflicts.

The task id cannot be an empty string or an empty array. Please ensure that the array of task names is not empty.

The task option is already defined as a global option by another plugin. Please ensure that task options are uniquely named to avoid conflicts.

HHE409: Task override option already defined

Section titled “HHE409: Task override option already defined”

An attempt is being made to override an option that has already been defined. Please ensure that the option is not defined before trying to override it.

The task is empty. Please ensure that tasks have at least one action.

Unable to import action for task. Please verify that the the file exists and that it provides a default function export.

The action of the task is not a function. Make sure that the file pointed to by the action URL exports a function as the default export.

HHE413: Missing value for the task argument

Section titled “HHE413: Missing value for the task argument”

You tried to run a task, but one of the values of its arguments was missing.

Please double check how you invoked Hardhat or ran your task.

One of your task arguments has an invalid type.

Please double check your task arguments.

One of the options for your task is invalid.

Please double check your arguments.

The subtask for the task you provided is not recognized.

Please check you have the correct subtask.

One of your Hardhat or task arguments has an invalid type.

Please double check your arguments.

One of your Hardhat or task arguments has a reserved name.

Please double check your arguments.

One of your Hardhat or task argument names is already in use.

Please double check your arguments.

One of your Hardhat or task argument names is invalid.

Please double check your arguments.

One of your Hardhat options is invalid.

Please double check your arguments.

HHE505: Missing value for the task argument

Section titled “HHE505: Missing value for the task argument”

You tried to run a task, but one of the values of its arguments was missing.

Please double check how you invoked Hardhat or ran your task.

You tried to run a task, but one of your arguments was not consumed.

Please double check how you invoked Hardhat or ran your task.

A path to the configuration file is expected after the global option “—config”, but none was provided.

Please double check your arguments.

HHE508: The global option “—config” cannot be used with the “init” command

Section titled “HHE508: The global option “—config” cannot be used with the “init” command”

The global option “—config” cannot be used with the “init” command.

Please double check your arguments.

Options cannot be grouped together.

Please double check your arguments, and try providing the options separately.

HHE510: Options repetition is not supported

Section titled “HHE510: Options repetition is not supported”

Some options cannot be repeated.

Please double check your arguments.

One of your Hardhat or task short argument names is invalid.

Please double check your arguments.

Tried to use hardhat run to execute a nonexistent script.

Please double check your script’s path.

HHE700: Invalid URL for network or forking

Section titled “HHE700: Invalid URL for network or forking”

You are trying to connect to a network with an invalid network or forking URL.

Please check that you are sending a valid URL string for the network or forking URL parameter.

The JSON-RPC request parameters are invalid. You are trying to make an EIP-1193 request with object parameters, but only array parameters are supported. Ensure that the ‘params’ parameter is correctly specified as an array in your JSON-RPC request.

One of your JSON-RPC requests received an invalid response.

Please make sure your node is running, and check your internet connection and networks config.

Cannot connect to the network.

Please make sure your node is running, and check your internet connection and networks config.

One of your JSON-RPC requests timed out.

Please make sure your node is running, and check your internet connection and networks config.

The network you are trying to connect to is not found.

Please double check that the network is correctly defined in your networks config.

The chain type does not match the network’s chain type.

If you want to use a different chain type, please update your networks config.

The configuration override you provided is invalid.

Hardhat was set to use a chain id but connected to a chain with a different id

No local account was set and there are accounts in the remote node

HHE710: Missing “data” param when calling eth_sign

Section titled “HHE710: Missing “data” param when calling eth_sign”

You called “eth_sign” with incorrect parameters.

Please check that you are sending a “data” parameter.

HHE711: Missing “address” param when calling personal_sign

Section titled “HHE711: Missing “address” param when calling personal_sign”

You called “personal_sign” with incorrect parameters.

Please check that you are sending an “address” parameter.

HHE712: Invalid “data” param when calling eth_signTypedData_v4

Section titled “HHE712: Invalid “data” param when calling eth_signTypedData_v4”

You called “eth_signTypedData_v4” with incorrect parameters.

Please check that you are sending a “data” parameter with a JSON string or object conforming to EIP712 TypedData schema.

You are trying to send a transaction with a locally managed account, and some parameters are missing.

Please double check your transactions’ parameters.

You are trying to send a transaction with a locally managed account, and no fee price parameters were provided. You need to send gasPrice, or maxFeePerGas and maxPriorityFeePerGas.

Please double check your transactions’ parameters.

You are trying to send a transaction with a locally managed account, and its parameters are incompatible. You sent both gasPrice, and maxFeePerGas or maxPriorityFeePerGas.

Please double check your transactions’ parameters.

You are trying to send a transaction or sign some data with an account not managed by your Ethereum node nor Hardhat.

Please double check your accounts and the “from” parameter in your RPC calls.

An invalid HD/BIP32 derivation path was provided in your config.

Read the documentation to learn how to define HD accounts correctly.

One of your HD keys could not be derived.

Try using another mnemonic or deriving less keys.

The validation of parameters against the schemas failed.

The network manager only supports the network types ‘http’ and ‘edr-simulated’.

HHE721: Transaction to null address cannot have undefined data

Section titled “HHE721: Transaction to null address cannot have undefined data”

The transaction to the null address cannot have undefined data

The provider your are trying to use has been closed. Please create a new one using hre.network.connect() and try again.

You are trying to send a transaction with a locally managed account, and its parameters are incompatible. You sent both gasPrice and authorizationList.

Please double check your transactions’ parameters.

Build info not found for contract while compiling Solidity test contracts.

Runner timed out while running Solidity tests.

HHE802: Unhandled EDR error in Solidity tests

Section titled “HHE802: Unhandled EDR error in Solidity tests”

Unhandled EDR error while running Solidity tests.

There was an error while resolving the project file.

Please double-check your configuration. If it keeps happening, please report it.

There was an error while resolving an npm module that you are trying to compile and generate artifacts for.

Please double-check your configuration. If it keeps happening, please report it.

There was an error while resolving an import.

Please double-check your import

HHE903: Invalid or unreleased solc version

Section titled “HHE903: Invalid or unreleased solc version”

The Solidity version in your config is invalid or hasn’t been released yet.

If you are certain it has been released, run npx hardhat clean --global and try again.

Couldn’t download solc.

Please check your internet connection and try again.

HHE905: Couldn’t obtain solc version list

Section titled “HHE905: Couldn’t obtain solc version list”

Couldn’t download solc’s version list.

Please check your internet connection and try again.

HHE906: Downloaded solc checksum verification failed

Section titled “HHE906: Downloaded solc checksum verification failed”

Hardhat downloaded a version of the Solidity compiler, and its checksum verification failed.

Please check your internet connection and try again.

If this error persists, run npx hardhat clean --global.

Hardhat successfully downloaded a native version of solc but it doesn’t run.

If you are running MacOS, try installing Apple Rosetta.

If this error persists, run “npx hardhat clean —global”.

Hardhat successfully downloaded a WASM version of solc but it doesn’t run.

If you are running MacOS, try installing Apple Rosetta.

If this error persists, run “npx hardhat clean —global”.

Hardhat failed to create a compilation job for a file in your project.

This happens when your files require incompatible versions of solc or you haven’t configured a version that works with them

Your smart contracts failed to compile.

Please check Hardhat’s output for more details.

Hardhat successfully downloaded a WASM version of solc but it is invalid. The compile function is missing.

The build profile you are trying to use is not defined in your Hardhat config.

The compiler path you are trying to use does not exist. Ensure you specified the correct path in the config file and that the file exists.

HHE914: Could not parse a compiler version

Section titled “HHE914: Could not parse a compiler version”

Hardhat failed to parse the full compiler version from the output of the compiler’s ‘version’ command.

Tried to read a nonexistent artifact.

Please double check that your contracts have been compiled and double check your artifact’s name.

There are multiple artifacts that match the given contract name, and Hardhat doesn’t know which one to use.

Please use the fully qualified name of the contract to disambiguate it.

The node only supports the ‘edr-simulated’ network type.

HHE1200: Cannot determine a test runner for files

Section titled “HHE1200: Cannot determine a test runner for files”

Cannot determine a test runner for the test files. This may be because the files are not correctly included in the test paths defined by the test plugins in the Hardhat configuration. If they are correctly included, this likely indicates an issue with a plugin failing to detect the files.

HHE1300: Source file not instrumented for coverage

Section titled “HHE1300: Source file not instrumented for coverage”

The source file could not be instrumented for coverage.

HHE1301: Import path already defined in compilation sources

Section titled “HHE1301: Import path already defined in compilation sources”

The import path is already defined in the compilation sources

HHE10000: Internal Hardhat Ignition invariant was violated

Section titled “HHE10000: Internal Hardhat Ignition invariant was violated”

An internal Hardhat Ignition invariant was violated.

Unsupported ethers.js value

Hardhat Ignition needs to migrate the artifacts to the new format. Please run npx hardhat ignition migrate {deploymentId}

HHE10100: An internal error to Hardhat Ignition has occurred

Section titled “HHE10100: An internal error to Hardhat Ignition has occurred”

An internal error to Hardhat Ignition has occurred

One of your Hardhat Ignition template variables has an invalid name

HHE10102: Variable tag not found in template

Section titled “HHE10102: Variable tag not found in template”

One of your Hardhat Ignition template variables has a tag that is not present in the template

HHE10103: Template value includes variable tag

Section titled “HHE10103: Template value includes variable tag”

One of your Hardhat Ignition template variables has a value that includes a variable tag

You are trying to run verification during a Hardhat Ignition deploy, but there is no Etherscan API Key set.

HHE10105: Cannot reset deployment on ephemeral Hardhat network

Section titled “HHE10105: Cannot reset deployment on ephemeral Hardhat network”

The reset flag can only used against a persistent network. You are trying to reset a deployment against an in-memory network.

Ignition was unable to find the module requested for deployment.

Ignition failed to parse the JSON parameters for deployment. Review the JSON and try again.

HHE10108: The deployment-id contains banned characters

Section titled “HHE10108: The deployment-id contains banned characters”

The deployment-id being used for the Hardhat Ignition deployment contains banned characters. Deployment ids can only contain alphanumerics, dashes or underscores.

HHE10109: Neither the viem or ethers Ignition extension plugin is installed.

Section titled “HHE10109: Neither the viem or ethers Ignition extension plugin is installed.”

Please install either @nomicfoundation/hardhat-ignition-viem or @nomicfoundation/hardhat-ignition-ethers to use Ignition in your Hardhat tests

HHE10110: Hardhat Ignition was unable to display an unknown transaction type

Section titled “HHE10110: Hardhat Ignition was unable to display an unknown transaction type”

Hardhat Ignition was unable to display an unknown transaction type

HHE10111: Parameter exceeds maximum safe integer size

Section titled “HHE10111: Parameter exceeds maximum safe integer size”

Parameter exceeds maximum safe integer size

Hardhat Ignition found problems while validating the module. Please review the module and try again.

HHE10113: Parsing of deployment parameters failed.

Section titled “HHE10113: Parsing of deployment parameters failed.”

Parsing of deployment parameters failed.

HHE10114: Visualization template directory not found

Section titled “HHE10114: Visualization template directory not found”

Visualization template directory not found

Hardhat Ignition was not able to find an Ignition Module at the given path.

HHE10116: Ignition module outside of module directory

Section titled “HHE10116: Ignition module outside of module directory”

Ignition modules must be located within the module directory.

HHE10117: Test error in Hardhat Ignition Viem’s test helper

Section titled “HHE10117: Test error in Hardhat Ignition Viem’s test helper”

Test error in Hardhat Ignition Viem’s test helper.

HHE10118: Hardhat Ignition unable to find artifact path for the contract name

Section titled “HHE10118: Hardhat Ignition unable to find artifact path for the contract name”

Hardhat Ignition unable to find artifact path for the contract name

HHE10119: Only one Ignition extension plugin allowed

Section titled “HHE10119: Only one Ignition extension plugin allowed”

Both the ethers and viem Ignition extension plugins were found, but only one can be used at a time.

Please only include one of the plugins in your Hardhat configuration.

HHE10120: Hardhat Ignition deployment error

Section titled “HHE10120: Hardhat Ignition deployment error”

Hardhat Ignition was not able to successfully complete a deployment.

Please review the error message and try again.

HHE10121: No default Viem wallet client found

Section titled “HHE10121: No default Viem wallet client found”

Hardhat Ignition will use the default wallet client to create Viem contract instances for deployed contracts. No wallet clients were found.

Module id must be a string

Module ids can only have alphanumerics and underscore, and they must start with an alphanumeric.

HHE10202: Invalid module definition function

Section titled “HHE10202: Invalid module definition function”

Module definition function must be a function.

HHE10203: Async module definition function

Section titled “HHE10203: Async module definition function”

Async callbacks are not allowed in ‘buildModule’.

Please make sure all module ids are unique.

Unable to lookup future during deserialization

Invalid FutureType as serialized argument

Lookahead value missing

One of the transactions sent by Hardhat Ignition was dropped

Hardhat Ignition received an invalid JSON-RPC response for the given method

Waiting for confirmations for transactions sent from the sender

Waiting for confirmations for transactions sent from the sender

The next nonce for the sender is not what Hardhat Ignition expected

The configured base fee exceeds the block gas limit

HHE10406: Max fee per gas exceeds gas limit

Section titled “HHE10406: Max fee per gas exceeds gas limit”

The calculated max fee per gas exceeds the configured limit

Sender account has insufficient funds for transfer

Sender account has insufficient funds for deploy

Gas estimation failed

An error occurred while trying to send a transaction

Unsupported execution status

Cannot wipe future as the deployment hasn’t been intialialized yet

Cannot wipe future as it has no previous execution recorded

Cannot wipe future as there are dependent futures that have previous executions recorded

The default sender is not part of the configured accounts

The emitter must be provided when reading an event from a SendDataFuture

Module validation failed

HHE10703: Invalid constructor arguments length

Section titled “HHE10703: Invalid constructor arguments length”

Invalid constructor arguments length

HHE10704: Invalid function arguments length

Section titled “HHE10704: Invalid function arguments length”

Invalid function arguments length

Function is not ‘pure’ or ‘view’ and should not be statically called

Indexed argument of event is not stored in the receipt

Invalid overload name

Overload not found

HHE10709: Overload name used for non-overloaded contract

Section titled “HHE10709: Overload name used for non-overloaded contract”

Overload name used for non-overloaded contract

Overload name required

Invalid overload given

Event argument not found

Invalid event argument index

Function argument not found

Invalid function argument index

The following libraries are missing

The library names clash with each other

Invalid library name

Invalid library

The library name is ambiguous

Invalid address for library

Account index cannot be a negative number

Requested account index is greater than the total number of available accounts

Artifact for contract is invalid

Module parameter requires a value but was given none

Module parameter must be of the expected type

Cannot get status for nonexistant deployment

The deployment’s chain cannot be changed between runs.

Another instance of IgnitionHelper.deploy() is already in use. Please wait for the previous deployment to finish.

Cannot verify contracts for nonexistant deployment

Cannot verify deployment as no contracts were deployed

Verification not natively supported for the requested chain

HHE11100: Invalid strategy name, must be either ‘basic’ or ‘create2’

Section titled “HHE11100: Invalid strategy name, must be either ‘basic’ or ‘create2’”

Invalid strategy, must be either ‘basic’ or ‘create2’

No strategy config passed for strategy

HHE11102: Missing strategy config parameter

Section titled “HHE11102: Missing strategy config parameter”

Missing required strategy configuration parameter

HHE11103: Invalid strategy config parameter

Section titled “HHE11103: Invalid strategy config parameter”

Strategy configuration parameter is invalid

The CreateX contract is not deployed on the current network

Cannot list transactions for nonexistant deployment

The deployment directory was not found

Cannot track transaction for nonexistant deployment

The transaction hash you provided was not found on the network.

The transaction you provided doesn’t seem to belong to your deployment.

The transaction hash that you provided was already present in your deployment.

The transaction you provided doesn’t have enough confirmations yet.

Method not implemented

Event not supported

Account index out of range

HHE20003: Broadcasted transaction hash mismatch

Section titled “HHE20003: Broadcasted transaction hash mismatch”

Broadcasted transaction hash mismatch

Cannot get account

Invalid block tag

HHE20006: Invalid artifact for contract factory creation

Section titled “HHE20006: Invalid artifact for contract factory creation”

Invalid artifact for contract factory creation

HHE20007: Invalid abstract contract for contract factory creation

Section titled “HHE20007: Invalid abstract contract for contract factory creation”

Invalid abstract contract for contract factory creation

Section titled “HHE20008: Invalid address to link contract”

Invalid address to link contract

HHE20009: Library is not one of the contract libraries

Section titled “HHE20009: Library is not one of the contract libraries”

Library is not one of the contract libraries

Ambiguous library name

Reference to same library

Missing links for library

Unsupported type for deep copy

HHE20014: Remote accounts are not supported

Section titled “HHE20014: Remote accounts are not supported”

Remote accounts are not supported

HHE20015: Invalid “accounts” property in your Hardhat configuration file

Section titled “HHE20015: Invalid “accounts” property in your Hardhat configuration file”

The “accounts” property in your Hardhat configuration file is not set correctly. Please double check it and try again.

HHE20016: Private key for the address could not be found

Section titled “HHE20016: Private key for the address could not be found”

The private key for the address could not be found. Please double check your private keys and try again.

HHE30000: Running tests twice in an ESM project

Section titled “HHE30000: Running tests twice in an ESM project”

You have run your tests twice programmatically and your project is an ESM project (you have "type": "module" in your package.json, or some of your files have the .mjs extension). This is not supported by Mocha yet (https://github.com/mochajs/mocha/issues/2706).

No network with the specified chain id was found. You can override the chain by passing it as a parameter to the client getter:

import { someChain } from "viem/chains";
const client = await hre.viem.getPublicClient({
chain: someChain,
...
});

You can find a list of supported networks here: https://github.com/wevm/viem/blob/main/src/chains/index.ts

The chain ID corresponds to a development network, but we were unable to identify it as either Hardhat or Anvil.

Please ensure you’re using one of the supported networks.

A default wallet client could not be found for the specified chain ID. This issue may occur if no accounts were configured for the selected network.

To resolve this, make sure to add an account to the specified network in the Hardhat config. Alternatively, you can set a custom wallet client by passing it as a parameter in the relevant function:

const networkConnection = await hre.network.connect(...);
const walletClient = await networkConnection.viem.getWalletClient(address);
await networkConnection.viem.deployContract(contractName, constructorArgs, { walletClient });
await networkConnection.viem.sendDeploymentTransaction(contractName, constructorArgs, { walletClient });
await networkConnection.viem.getContractAt(contractName, address, { walletClient });

An error occurred while linking the contract libraries.

Please check Hardhat’s output for more details.

Invalid confirmations value. The confirmations value provided is invalid.

The deployment transaction was mined but its receipt doesn’t contain a contract address.

HHE50000: Invalid password or corrupted keystore file

Section titled “HHE50000: Invalid password or corrupted keystore file”

The password you provided is incorrect or the keystore file is corrupted.

HHE50001: Cannot change password for dev keystore

Section titled “HHE50001: Cannot change password for dev keystore”

The keystore “change-password” task cannot be used with the development keystore

HHE50002: Key not found in the development keystore during tests

Section titled “HHE50002: Key not found in the development keystore during tests”

Key not found in the development keystore. During tests, configuration variables can only be accessed through the development keystore.

Run npx hardhat keystore set <KEY> --dev to set it.

HHE60000: Only hex-encoded strings prefixed with “0x” are accepted

Section titled “HHE60000: Only hex-encoded strings prefixed with “0x” are accepted”

Only hex-encoded strings prefixed with “0x” are accepted

HHE60001: Cannot converted into an RPC quantity

Section titled “HHE60001: Cannot converted into an RPC quantity”

The value cannot be converted into an RPC quantity

The value is not a valid hex string

The value is not a valid transaction hash

The value is not a valid address

The address has an invalid checksum

HHE60006: Block number smaller than the current block number

Section titled “HHE60006: Block number smaller than the current block number”

The block number is smaller than the current block number

HHE60007: The evm_snapshot value should be a string

Section titled “HHE60007: The evm_snapshot value should be a string”

The value returned by evm_snapshot should be a string

HHE60008: The evm_revert value should be a boolean

Section titled “HHE60008: The evm_revert value should be a boolean”

The value returned by evm_revert should be a boolean

HHE60009: Trying to restore an invalid snapshot.

Section titled “HHE60009: Trying to restore an invalid snapshot.”

Trying to restore an invalid snapshot.

HHE60010: Invalid input, expected a non-negative number

Section titled “HHE60010: Invalid input, expected a non-negative number”

Invalid input, expected a non-negative number

HHE60011: Cannot convert negative number to RPC quantity

Section titled “HHE60011: Cannot convert negative number to RPC quantity”

Cannot convert negative number to RPC quantity

HHE60012: Anonymous functions cannot be used as fixtures

Section titled “HHE60012: Anonymous functions cannot be used as fixtures”

Anonymous functions cannot be used as fixtures

Error while reverting snapshot

HHE60014: Hardhat network helpers can only be used with the Hardhat Network

Section titled “HHE60014: Hardhat network helpers can only be used with the Hardhat Network”

Hardhat network helpers can only be used with the Hardhat Network

HHE60015: Hardhat network helpers can only be used with the Hardhat Network - version info

Section titled “HHE60015: Hardhat network helpers can only be used with the Hardhat Network - version info”

Hardhat network helpers can only be used with the Hardhat Network

Unknown comparison operation

Expected string or addressable

HHE70002: Assertion doesn’t have an error message

Section titled “HHE70002: Assertion doesn’t have an error message”

Assertion doesn’t have an error message. Please open an issue to report this.

The matcher cannot be chained after another matcher. Please open an issue to report this.

There was an error decoding data

HHE70005: Expected a valid transaction hash

Section titled “HHE70005: Expected a valid transaction hash”

Expected a valid transaction hash

HHE70006: Expected the revert reason to be a string or a regular expression

Section titled “HHE70006: Expected the revert reason to be a string or a regular expression”

Expected the revert reason to be a string or a regular expression

HHE70007: First argument must be a contract

Section titled “HHE70007: First argument must be a contract”

First argument must be a contract

HHE70008: Expected the custom error name to be a string

Section titled “HHE70008: Expected the custom error name to be a string”

Expected the custom error name to be a string

HHE70009: Contract doesn’t have a custom error with the specified name

Section titled “HHE70009: Contract doesn’t have a custom error with the specified name”

Contract doesn’t have a custom error with the specified name

HHE70010: Invalid arguments length for the .revertedWithCustomError matcher

Section titled “HHE70010: Invalid arguments length for the .revertedWithCustomError matcher”

Invalid arguments length for the .revertedWithCustomError matcher

HHE70011: [.withArgs] should never happen, please submit an issue to the Hardhat repository

Section titled “HHE70011: [.withArgs] should never happen, please submit an issue to the Hardhat repository”

[.withArgs] should never happen, please submit an issue to the Hardhat repository

HHE70012: Should not get an indexed event when the assertion type is not event

Section titled “HHE70012: Should not get an indexed event when the assertion type is not event”

Should not get an indexed event when the assertion type is not event

HHE70013: Expected the given panic code to be a number-like value

Section titled “HHE70013: Expected the given panic code to be a number-like value”

Expected the given panic code to be a number-like value

HHE70014: The number of accounts is different than the number of expected balance changes

Section titled “HHE70014: The number of accounts is different than the number of expected balance changes”

The number of accounts is different than the number of expected balance changes

HHE70015: First argument must be a contract instance

Section titled “HHE70015: First argument must be a contract instance”

First argument must be a contract instance

HHE70016: Given contract instance is not an ERC20 token

Section titled “HHE70016: Given contract instance is not an ERC20 token”

Given contract instance is not an ERC20 token

Invalid transaction

HHE70018: Contract target must be a string

Section titled “HHE70018: Contract target must be a string”

Contract target must be a string

HHE70019: Invalid arguments length for the .emit matcher

Section titled “HHE70019: Invalid arguments length for the .emit matcher”

Invalid arguments length for the .emit matcher

HHE70020: Contract runner’s provider shouldn’t be null

Section titled “HHE70020: Contract runner’s provider shouldn’t be null”

Contract runner’s provider shouldn’t be null

HHE70021: Do not combine .not. with .withArgs()

Section titled “HHE70021: Do not combine .not. with .withArgs()”

Do not combine .not. with .withArgs()

HHE70022: withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion

Section titled “HHE70022: withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion”

withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion

HHE70023: withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined

Section titled “HHE70023: withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined”

withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined

The .reverted matcher was deprecated and you should use .revert(ethers) instead.

The network is not supported by hardhat-verify. To see the list of supported networks, run:

Terminal window
npx hardhat verify --list-networks

To add support for a new network, see https://hardhat.org/verify-custom-networks

The request to the explorer failed.

  • Verify that the URL is correct.
  • Ensure the service is up and reachable.
  • Check your network connection and try again.

HHE80002: Explorer request status code error

Section titled “HHE80002: Explorer request status code error”

The request to the explorer returned a non-success status code.

  • Verify that the URL is correct.
  • Ensure the service is up and reachable.
  • Check your network connection and try again.

HHE80003: Unsupported solidity compiler version

Section titled “HHE80003: Unsupported solidity compiler version”

The specified Solidity compiler version is not supported by the Etherscan API. Only versions 0.4.11 and above are supported. For a full list of supported versions, visit: https://etherscan.io/solcversions

No bytecode was found at the specified address. This usually means the contract is not deployed or was deployed to a different network. Please verify the address and selected network, and try again.

The Solidity compiler version used to compile the deployed contract does not match any of the versions configured in your Hardhat project.

This mismatch may indicate:

  • You’re not on the same commit that was used to deploy the contract.
  • The compiler version in your Hardhat config is incorrect.
  • The address provided is not the deployed contract.
  • The selected network is incorrect.

The specified contract is not present in your project’s artifacts. Please ensure the contract is compiled and the name is correct.

The specified contract is present in your project, but its build info is missing. Please ensure the contract is compiled by Hardhat and that it is written in Solidity.

HHE80008: Build info compiler version mismatch

Section titled “HHE80008: Build info compiler version mismatch”

The compiler version in the build info does not match the version encoded in the deployed bytecode. Possible causes:

  • Compiler settings were changed after deployment.
  • The contract address is incorrect.
  • The selected network is incorrect.

The bytecode at the specified address did not match the expected contract.

Possible causes:

  • Your artifacts are outdated or missing; try running npx hardhat compile --force --buildProfile production.
  • The contract code was modified after deployment.
  • Compiler settings (optimizer, EVM version, etc.) changed after deployment.
  • The provided address is incorrect.
  • The selected network is incorrect.

The deployed bytecode matches multiple compiled contracts. Specify the exact contract using the --contract flag. For example:

Terminal window
npx hardhat verify --contract contracts/Example.sol:ExampleContract <other args>

The address provided for a linked library is invalid. Please make sure the address is a valid Ethereum address.

A library was specified using the “—libraries” option, but the selected contract does not use it.

If the contract uses external libraries, verify that the provided name matches the fully qualified name (FQN) of one of them, such as:

contracts/Math.sol:SafeMath

The specified library name matches multiple libraries used by the contract.

To resolve the ambiguity, provide the fully qualified library name in the format:

path/to/LibraryFile.sol:LibraryName

The same library was specified more than once using both its short name and fully qualified name (FQN) in the --libraries option.

Only one form should be used for each library. Remove one of the entries and try again.

Some libraries have conflicting addresses between what you provided and what was detected in the deployed bytecode.

Please ensure each library address is correct. You can remove entries from your input to use autodetection instead.

One or more libraries required by the contract could not be detected from the deployed bytecode.

This usually happens when a library is only referenced in the contract’s constructor. To resolve this, provide the missing library addresses using the “—libraries” option.

HHE80017: Invalid constructor argument type

Section titled “HHE80017: Invalid constructor argument type”

One of the arguments passed to the contract’s constructor has an invalid JavaScript type.

This error occurs when you supply a value whose runtime type doesn’t match the expected Solidity type. For example, you must pass a JS string for a Solidity string parameter.

Please verify that each constructor argument is the correct JS type.

HHE80018: Invalid constructor argument count

Section titled “HHE80018: Invalid constructor argument count”

The number of arguments provided to the contract’s constructor doesn’t match the number of parameters defined in its ABI.

This error occurs when you supply a different number of arguments than the constructor expects. For example, if the constructor expects two parameters but you provided three.

Please verify that you pass the exact number of arguments required by the constructor.

HHE80019: Constructor argument value out of bounds

Section titled “HHE80019: Constructor argument value out of bounds”

One of the arguments passed to the contract’s constructor is outside the allowed range for its Solidity type (for example, passing 256 to a uint8 parameter).

This error occurs when a value exceeds the maximum or minimum allowed for the specified Solidity type.

Please ensure all argument values fit within the valid range for their respective Solidity types.

HHE80020: Constructor arguments encoding failed

Section titled “HHE80020: Constructor arguments encoding failed”

The constructor arguments provided for the contract could not be encoded correctly. Please review the provided arguments and ensure they match the expected arguments defined in the contract’s ABI.

The explorer responded that the specified address does not contain bytecode. This usually means the contract was deployed recently and the explorer’s backend has not yet indexed it.

Please wait a short time (e.g., 30-60 seconds) and try again. If you’re running this from a script, wait for at least five confirmations before verifying.

The block explorer responded that the contract is already verified.

This typically occurs if you used the “—force” flag and the explorer does not support re-verification, or if the contract was previously verified with a full match.

HHE80023: Contract verification request failed

Section titled “HHE80023: Contract verification request failed”

The block explorer returned an error when attempting to verify the contract’s source code.

Please check the returned message for details.

HHE80024: Contract verification status polling failed

Section titled “HHE80024: Contract verification status polling failed”

The block explorer returned a failure status when checking the verification status. Verification may still succeed; please check manually.

HHE80025: Unexpected API response during contract verification

Section titled “HHE80025: Unexpected API response during contract verification”

The block explorer API returned a message that doesn’t match the expected format. This may indicate a change in the API or an issue with the request.

Please report this issue to the Hardhat team.

Unable to verify the contract on the block explorer.

If your contract uses libraries whose addresses cannot be detected automatically, make sure you are providing the correct address for each undetectable library.

Block explorer information is missing in your chain descriptor configuration.

To enable contract verification, add an entry for the verification provider in the blockExplorers field of the relevant chain descriptor. You can override the default chain descriptor by providing your own chainDescriptors object in the Hardhat config, with the following structure:

chainDescriptors: {
<chainId>: {
name: <name>,
blockExplorers: {
blockscout: { name: "Blockscout", url: <blockscout-url> apiUrl: <blockscout-api-url> };
etherscan: { name: "Etherscan", url: <etherscan-url> apiUrl: <etherscan-api-url> };
}
}
}

The block explorer responded that the address does not contain a contract. This usually means the address is incorrect, the contract was not deployed on the selected network, or there is a temporary issue with the block explorer not updating its index. Please verify the address and network, and try again later if necessary.

The provided API key for the block explorer is empty. This can happen in the following cases:

  • No “apiKey” field is configured in the hardhat config.
  • The “apiKey” is explicitly set to an empty string in the Hardhat config.
  • The “apiKey” is assigned to a config variable that resolves to an empty string at runtime.

To resolve this, set a valid non-empty API key in your Hardhat config, then try again.

The value is not a valid address

HHE80101: Mutually exclusive constructor arguments

Section titled “HHE80101: Mutually exclusive constructor arguments”

The parameters constructorArgs and constructorArgsPath are mutually exclusive. Please provide only one of them.

HHE80102: Invalid constructor arguments module

Section titled “HHE80102: Invalid constructor arguments module”

The module specified by the constructorArgsPath parameter must default export an array of constructor arguments.

Example:

export default ["arg1", "arg2", ...];

The specified module could not be found. Please check the path and try again.

The specified module has a syntax error. Please fix the error and try again.

The specified module could not be imported.

The module specified by the librariesPath parameter must default export a record of libraries.

Example:

export default { lib1: "0x...", lib2: "0x...", ... };

The specified verification provider is not supported. Please use one of the supported providers.