@nomicfoundation/hardhat-errors 3.0.0-next.9 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ export interface ErrorDescriptor {
7
7
  */
8
8
  number: number;
9
9
  /**
10
- * A tempalte of the message of the error.
10
+ * A template of the message of the error.
11
11
  *
12
12
  * This should be a short description. If possible, it should tell the user
13
13
  * how to solve their problem.
@@ -157,6 +157,24 @@ export declare const ERRORS: {
157
157
  readonly websiteTitle: "Invalid hex string";
158
158
  readonly websiteDescription: "Given value was not a valid hex string.";
159
159
  };
160
+ readonly CONFIG_VARIABLE_FORMAT_MUST_INCLUDE_VARIABLE: {
161
+ readonly number: 19;
162
+ readonly messageTemplate: "The format string \"{format}\" must include {marker} marker";
163
+ readonly websiteTitle: "Config variable format must include \\{variable\\}";
164
+ readonly websiteDescription: "The config variable format must include the string \"\\{variable\\}\", which will be replaced with the actual value of the variable.";
165
+ };
166
+ readonly INVALID_FULLY_QUALIFIED_NAME: {
167
+ readonly number: 20;
168
+ readonly messageTemplate: "Invalid fully qualified contract name \"{name}\"";
169
+ readonly websiteTitle: "Invalid fully qualified contract name";
170
+ readonly websiteDescription: "A contract name was expected to be in fully qualified form, but it's not.\n\nA fully qualified name should look like file.sol:Contract";
171
+ };
172
+ readonly INVALID_CONFIG_FILE: {
173
+ readonly number: 21;
174
+ readonly messageTemplate: "Invalid Hardhat config file at {configPath}:\n{errors}";
175
+ readonly websiteTitle: "Invalid Hardhat config file";
176
+ readonly websiteDescription: "The config file has JS/TS errors.\n\nPlease resolve the errors before rerunning the command.";
177
+ };
160
178
  };
161
179
  readonly INTERNAL: {
162
180
  readonly ASSERTION_ERROR: {
@@ -207,6 +225,12 @@ export declare const ERRORS: {
207
225
  readonly websiteTitle: "Plugin hook factory is not a valid file URL";
208
226
  readonly websiteDescription: "The loading of a plugin's hook factory failed as the import path is not a valid file:// URL.";
209
227
  };
228
+ readonly UNEXPECTED_HOOK_PARAM_MODIFICATION: {
229
+ readonly number: 301;
230
+ readonly messageTemplate: "Parameter \"{paramName}\" of hook \"{hookCategoryName}#{hookName}\" is not allowed to be modified";
231
+ readonly websiteTitle: "Unexpected hook parameter modification";
232
+ readonly websiteDescription: "The parameter is not allowed to be modified";
233
+ };
210
234
  };
211
235
  readonly TASK_DEFINITIONS: {
212
236
  readonly INVALID_FILE_ACTION: {
@@ -275,15 +299,15 @@ export declare const ERRORS: {
275
299
  readonly websiteTitle: "Empty task";
276
300
  readonly websiteDescription: "The task is empty. Please ensure that tasks have at least one action.";
277
301
  };
278
- readonly INVALID_ACTION_URL: {
302
+ readonly INVALID_ACTION_IMPORT: {
279
303
  readonly number: 411;
280
- readonly messageTemplate: "Unable to import the action specified by task \"{task}\" from the module \"{action}\"";
281
- readonly websiteTitle: "Invalid action URL";
282
- readonly websiteDescription: "The action URL is invalid. Please ensure that the URL is correct.";
304
+ readonly messageTemplate: "Unable to import the action for task \"{task}\".";
305
+ readonly websiteTitle: "Unable to import action for task";
306
+ readonly websiteDescription: "Unable to import action for task. Please verify that the the file exists and that it provides a default function export.";
283
307
  };
284
308
  readonly INVALID_ACTION: {
285
309
  readonly number: 412;
286
- readonly messageTemplate: "The action resolved from \"{action}\" in task \"{task}\" is not a function";
310
+ readonly messageTemplate: "The action resolved in task \"{task}\" is not a function";
287
311
  readonly websiteTitle: "Invalid action";
288
312
  readonly websiteDescription: "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.";
289
313
  };
@@ -367,6 +391,24 @@ export declare const ERRORS: {
367
391
  readonly websiteTitle: "The global option \"--config\" cannot be used with the \"init\" command";
368
392
  readonly websiteDescription: "The global option \"--config\" cannot be used with the \"init\" command.\n\nPlease double check your arguments.";
369
393
  };
394
+ readonly CANNOT_GROUP_OPTIONS: {
395
+ readonly number: 509;
396
+ readonly messageTemplate: "Invalid option \"{option}\". Options cannot be grouped together. Try providing the options separately.";
397
+ readonly websiteTitle: "Options grouping is not supported";
398
+ readonly websiteDescription: "Options cannot be grouped together.\n\nPlease double check your arguments, and try providing the options separately.";
399
+ };
400
+ readonly CANNOT_REPEAT_OPTIONS: {
401
+ readonly number: 510;
402
+ readonly messageTemplate: "Invalid option \"{option}\". Options of type \"{type}\" cannot be repeated.";
403
+ readonly websiteTitle: "Options repetition is not supported";
404
+ readonly websiteDescription: "Some options cannot be repeated.\n\nPlease double check your arguments.";
405
+ };
406
+ readonly INVALID_SHORT_NAME: {
407
+ readonly number: 511;
408
+ readonly messageTemplate: "Argument short name \"{name}\" is invalid. It must consist of exactly one letter.";
409
+ readonly websiteTitle: "Invalid short argument name";
410
+ readonly websiteDescription: "One of your Hardhat or task short argument names is invalid.\n\nPlease double check your arguments.";
411
+ };
370
412
  };
371
413
  readonly BUILTIN_TASKS: {
372
414
  readonly RUN_FILE_NOT_FOUND: {
@@ -501,7 +543,7 @@ export declare const ERRORS: {
501
543
  readonly number: 720;
502
544
  readonly messageTemplate: "The provided network type \"{networkType}\" for network \"{networkName}\" is not recognized, only `http` and `edr` are supported.";
503
545
  readonly websiteTitle: "Invalid network type";
504
- readonly websiteDescription: "The network manager only supports the network types 'http' and 'edr'.";
546
+ readonly websiteDescription: "The network manager only supports the network types 'http' and 'edr-simulated'.";
505
547
  };
506
548
  readonly DATA_FIELD_CANNOT_BE_NULL_WITH_NULL_ADDRESS: {
507
549
  readonly number: 721;
@@ -515,6 +557,12 @@ export declare const ERRORS: {
515
557
  readonly websiteTitle: "Provider closed";
516
558
  readonly websiteDescription: "The provider your are trying to use has been closed. Please create a new one using hre.network.connect() and try again.";
517
559
  };
560
+ readonly INCOMPATIBLE_EIP7702_FIELDS: {
561
+ readonly number: 723;
562
+ readonly messageTemplate: "An incompatible transaction with gasPrice and EIP-7702 fields.";
563
+ readonly websiteTitle: "Incompatible EIP-7702 parameters";
564
+ readonly websiteDescription: "You are trying to send a transaction with a locally managed\naccount, and its parameters are incompatible. You sent both gasPrice and authorizationList.\n\nPlease double check your transactions' parameters.";
565
+ };
518
566
  };
519
567
  readonly SOLIDITY_TESTS: {
520
568
  readonly BUILD_INFO_NOT_FOUND_FOR_CONTRACT: {
@@ -539,203 +587,80 @@ export declare const ERRORS: {
539
587
  };
540
588
  };
541
589
  readonly SOLIDITY: {
542
- readonly RESOLVING_INCORRECT_FILE_AS_PROJECT_FILE: {
590
+ readonly PROJECT_ROOT_RESOLUTION_ERROR: {
543
591
  readonly number: 900;
544
- readonly shouldBeReported: true;
545
- readonly messageTemplate: "File \"{file}\" is being resolved as a project file, but it's not part of the project.";
546
- readonly websiteTitle: "Solidity project file is outside the project";
547
- readonly websiteDescription: "Tried to resolve a file as a project file, but it's not part of the project.";
592
+ readonly messageTemplate: "There was an error while resolving the project file \"{filePath}\":\n\n{error}";
593
+ readonly websiteTitle: "Project file resolution error";
594
+ readonly websiteDescription: "There was an error while resolving the project file.\n\nPlease double-check your configuration. If it keeps happening, please report it.";
548
595
  };
549
- readonly RESOLVING_NONEXISTENT_PROJECT_FILE: {
596
+ readonly NPM_ROOT_RESOLUTION_ERROR: {
550
597
  readonly number: 901;
551
- readonly shouldBeReported: true;
552
- readonly messageTemplate: "File \"{file}\" is being resolved as a project file, but it doesn't exist.";
553
- readonly websiteTitle: "Solidity project file doesn't exist";
554
- readonly websiteDescription: "Tried to resolve a file as a project file, but it doesn't exist.";
598
+ readonly messageTemplate: "There was an error while resolving the npm module \"{npmModule}\" when trying to compile it:\n\n{error}";
599
+ readonly websiteTitle: "Npm file resolution error";
600
+ readonly websiteDescription: "There was an error while resolving an npm module that you are trying to compile and generate artifacts for.\n\nPlease double-check your configuration. If it keeps happening, please report it.";
555
601
  };
556
- readonly IMPORTED_FILE_DOESNT_EXIST: {
602
+ readonly IMPORT_RESOLUTION_ERROR: {
557
603
  readonly number: 902;
558
- readonly messageTemplate: "The import \"{importPath} from \"{from}\" doesn't exist.";
559
- readonly websiteTitle: "Imported file doesn't exist";
560
- readonly websiteDescription: "An imported file doesn't exist.";
561
- };
562
- readonly IMPORTED_FILE_WITH_INCORRECT_CASING: {
563
- readonly number: 903;
564
- readonly messageTemplate: "The import \"{importPath} from \"{from}\" exists, but its casing is incorrect. The correct casing is \"{correctCasing}\".";
565
- readonly websiteTitle: "Imported file with incorrect casing";
566
- readonly websiteDescription: "Hardhat enforces that you import your files with the correct casing (as stored in the filesystem).\n\nThis error is thrown when you import a file with the wrong casing under a case insensitve filesystem.";
567
- };
568
- readonly IMPORTED_PACKAGE_EXPORTS_FILE_WITH_INCORRECT_CASING: {
569
- readonly number: 904;
570
- readonly messageTemplate: "The import \"{importPath} from \"{from}\" exists, but its casing is incorrect.";
571
- readonly websiteTitle: "Imported file with incorrect casing";
572
- readonly websiteDescription: "Hardhat enforces that you import your files with the correct casing (as stored in the filesystem).\n\nThis error is thrown when you import a file with the wrong casing under a case insensitve filesystem.";
573
- };
574
- readonly NPM_DEPEDNDENCY_NOT_INSTALLED: {
575
- readonly number: 905;
576
- readonly messageTemplate: "The npm package \"{packageName}\" isn't installed in the {from}.";
577
- readonly websiteTitle: "Uninstalled npm dependency";
578
- readonly websiteDescription: "Trying to use an npm package as a solidity dependency, but it's not installed.";
579
- };
580
- readonly IMPORTED_NPM_DEPENDENCY_NOT_INSTALLED: {
581
- readonly number: 906;
582
- readonly messageTemplate: "The import \"{importPath}\" from \"{from}\" is trying to use an uninstalled npm dependency.";
583
- readonly websiteTitle: "Uninstalled npm solidity dependency";
584
- readonly websiteDescription: "One of your files is traying to import a dependency using npm, but it hasn't been installed";
585
- };
586
- readonly USER_REMAPPING_WITH_NPM_CONTEXT: {
587
- readonly number: 907;
588
- readonly messageTemplate: "The remapping \"{remapping}\" has a context starting with \"npm/\", which is forbidden. Hardhat doesn't allow changing the behaviour of npm package's imports.";
589
- readonly websiteTitle: "Remapping imports in npm packages is not allowed";
590
- readonly websiteDescription: "This error happened because you are trying to change how the imports within an npm package, which is not allowed.\n\nWhile Hardhat supports user-defined remappings, it doesn't support remapping the behavior of npm packages to ensure that everything what's imported via npm uses the same npm resolution logic.";
591
- };
592
- readonly REMAPPING_WITH_INVALID_SYNTAX: {
593
- readonly number: 908;
594
- readonly messageTemplate: "The remapping \"{remapping}\" is invalid.";
595
- readonly websiteTitle: "Invalid remapping";
596
- readonly websiteDescription: "You are trying to set a user remapping, but it's syntax is invalid.\n\nPlease double check your remmpaings' syntax.";
597
- };
598
- readonly REMAPPING_TO_UNINSTALLED_PACKAGE: {
599
- readonly number: 909;
600
- readonly messageTemplate: "The remapping \"{remapping}\" is trying to use the npm package \"{package}\", which is not installed";
601
- readonly websiteTitle: "Remapping into an uninstaleld npm package";
602
- readonly websiteDescription: "You are trying to set a user remapping that uses an npm pacakge as target, but it's not installed.\n\nPlease make sure to install the package or fix the remapping.";
603
- };
604
- readonly REMAPPING_NPM_PACKAGE_AS_MONOREPO: {
605
- readonly number: 910;
606
- readonly messageTemplate: "The remapping \"{remapping}\" targets the npm pacakge \"{pacakge}\" as if it were part of this repository, but version \"{version}\" is installed instead";
607
- readonly websiteTitle: "Remapping into a monorepo package but found an npm package instead";
608
- readonly websiteDescription: "You are trying to set a remapping setting a monorepo package as target, but Hardhat found the pacakge to be installed from the npm regristry instead.";
609
- };
610
- readonly REMAPPING_HARDHAT_PROJECT_AS_MONOREPO_PACKAGE: {
611
- readonly number: 911;
612
- readonly messageTemplate: "The remapping \"{remapping}\" is trying to set the npm package \"{package}\" as target, but that's the project is the Hardhat project, so it shouldn't be remapped through npm/, but as internal project remappings.";
613
- readonly websiteTitle: "Remapping into the project using npm";
614
- readonly websiteDescription: "You are trying to set a remapping whose target uses the npm/ syntax, but is within your Hardhat project.\n\nPlease don't use npm/... as target, but use normal internal project remapping istead.";
615
- };
616
- readonly REMAPPING_INCORRECT_VERSION: {
617
- readonly number: 912;
618
- readonly messageTemplate: "The remapping \"{remapping}\" is trying to set the npm package \"{package}\" version \"{expectedVersion}\" as target, but found version \"{actualVersion}\" instead.";
619
- readonly websiteTitle: "Remapping into incorrect npm package version";
620
- readonly websiteDescription: "You are trying to set a remapping into an npm package, but the version that you are using is not the currently installed one.\n\nPlease change your remapping to match the installed version, or installed the correct one.";
621
- };
622
- readonly INVALID_NPM_IMPORT: {
623
- readonly number: 913;
624
- readonly messageTemplate: "The import \"{importPath}\" in \"{from}\" is treated as an npm import as it's first directory doesn't exist in your project, but it's syntax is not that of a valid npm import either.";
625
- readonly websiteTitle: "Invalid npm import";
626
- readonly websiteDescription: "You are trying to import a file that is not a valid npm import. Please double check that you are using the correct syntax.";
627
- };
628
- readonly ILLEGAL_PACKAGE_IMPORT: {
629
- readonly number: 914;
630
- readonly messageTemplate: "The import \"{importPath}\" in \"{from}\" is not a legal import as it's trying to import a file outside of its package.";
631
- readonly websiteTitle: "Illegal package import";
632
- readonly websiteDescription: "One of your npm packages has a Solidity file that is trying to import a file outside of its package using a relative import. This is disabled for security reasons.";
633
- };
634
- readonly ILEGALL_PROJECT_IMPORT: {
635
- readonly number: 915;
636
- readonly messageTemplate: "The import \"{importPath}\" in \"{from}\" is not a legal import as it's trying to import a file outside of the project.";
637
- readonly websiteTitle: "Illegal project import";
638
- readonly websiteDescription: "One of your Solidity files is trying to import a file outside of the Hardhat project using a relative import. This is disabled for security reasons.";
639
- };
640
- readonly ILLEGAL_PROJECT_IMPORT_AFTER_REMAPPING: {
641
- readonly number: 916;
642
- readonly messageTemplate: "Applying the remapping \"{remapping}\" to the import \"{importPath}\" from \"{from}\" results in an invalid import \"{remappedDirectImport}\", as it's not a local file. If you are trying to remap into an npm module use the npm/ syntax instead.";
643
- readonly websiteTitle: "Illegal project import after remapping";
644
- readonly websiteDescription: "One of your Solidity files has an import which after applying a user remapping becomes an illegal import, as it tries to import a file outside of the project. This is disabled for security reasons.\n\nIf you are trying to remap into an npm module use the npm/ syntax instead.";
645
- };
646
- readonly IMPORT_PATH_WITH_WINDOWS_SEPARATOR: {
647
- readonly number: 917;
648
- readonly messageTemplate: "The import \"{importPath}\" in \"{from}\" is not a valid import as it contains a Windows path separator.";
649
- readonly websiteTitle: "Import path with Windows path separator";
650
- readonly websiteDescription: "One of your Solidity files is trying to import a file with a Windows path separator, and this is not supported. Please use a Unix-style path instead.";
604
+ readonly messageTemplate: "There was an error while resolving the import \"{importPath}\" from \"{filePath}\":\n\n{error}";
605
+ readonly websiteTitle: "Import resolution error";
606
+ readonly websiteDescription: "There was an error while resolving an import.\n\nPlease double-check your import";
651
607
  };
652
608
  readonly INVALID_SOLC_VERSION: {
653
- readonly number: 918;
609
+ readonly number: 903;
654
610
  readonly messageTemplate: "Solidity version {version} is invalid or hasn't been released yet.\n\nIf you are certain it has been released, run \"npx hardhat clean --global\" and try again";
655
611
  readonly websiteTitle: "Invalid or unreleased `solc` version";
656
612
  readonly websiteDescription: "The Solidity version in your config is invalid or hasn't been released yet.\n\nIf you are certain it has been released, run `npx hardhat clean --global` and try again.";
657
613
  };
658
- readonly RESOLVE_NPM_FILE_WITH_INVALID_FORMAT: {
659
- readonly number: 919;
660
- readonly messageTemplate: "Couldn't resolve the npm file \"{module}\" because it has an invalid format.\n\nMake sure that you are providing valid npm file paths (e.g. package/File.sol) in your config and programatically.";
661
- readonly websiteTitle: "Resolving invalid npm file";
662
- readonly websiteDescription: "Tried to resolve an npm file directly (i.e. not imported by another file) but its format is invalid.\n\nThis can happen if you setting npm files to be compiled as local files, with invalid file paths, or by misusing the solidity build system.";
663
- };
664
- readonly RESOLVE_NPM_FILE_CLASHES_WITH_LOCAL_FILES: {
665
- readonly number: 920;
666
- readonly shouldBeReported: true;
667
- readonly messageTemplate: "You are tying to resolve the npm file \"{module}\", for example to compile it as a local one, but it can clash with your project as the \"{directory}\" directory is present in your project.\n\nPlease try renaming the directory.";
668
- readonly websiteTitle: "Resolution of npm file clashes with local files";
669
- readonly websiteDescription: "You are tying to resolve an npm file, for example to compile it as a local one, but it can clash with your project files.";
670
- };
671
- readonly RESOLVE_NON_EXISTENT_NPM_ROOT: {
672
- readonly number: 921;
673
- readonly messageTemplate: "You are tying to compile the npm file \"{module}\", but it doesn't exist within its package.";
674
- readonly websiteTitle: "Resolution of non-existent npm file";
675
- readonly websiteDescription: "You are tying to resolve an npm file that doesn't exist within its package.";
676
- };
677
- readonly RESOLVE_WRONG_CASING_NPM_ROOT: {
678
- readonly number: 922;
679
- readonly messageTemplate: "You are tying to compile the npm file \"{module}\", its casing is incorrect. Please double check it in your config.";
680
- readonly websiteTitle: "Resolution of npm file with incorrect casing";
681
- readonly websiteDescription: "You are tying to resolve an npm file whose casing is incorrect.";
682
- };
683
614
  readonly DOWNLOAD_FAILED: {
684
- readonly number: 923;
615
+ readonly number: 904;
685
616
  readonly messageTemplate: "Couldn't download compiler version {remoteVersion}. Please check your internet connection and try again.";
686
617
  readonly websiteTitle: "`solc` download failed";
687
618
  readonly websiteDescription: "Couldn't download `solc`.\n\nPlease check your internet connection and try again.";
688
619
  };
689
620
  readonly VERSION_LIST_DOWNLOAD_FAILED: {
690
- readonly number: 924;
621
+ readonly number: 905;
691
622
  readonly messageTemplate: "Couldn't download compiler version list. Please check your internet connection and try again.";
692
623
  readonly websiteTitle: "Couldn't obtain `solc` version list";
693
624
  readonly websiteDescription: "Couldn't download `solc`'s version list.\n\nPlease check your internet connection and try again.";
694
625
  };
695
626
  readonly INVALID_DOWNLOAD: {
696
- readonly number: 925;
627
+ readonly number: 906;
697
628
  readonly messageTemplate: "Couldn't download compiler version {remoteVersion}: Checksum verification failed.\n\nPlease check your internet connection and try again.\n\nIf this error persists, run \"npx hardhat clean --global\".";
698
629
  readonly websiteTitle: "Downloaded `solc` checksum verification failed";
699
630
  readonly websiteDescription: "Hardhat downloaded a version of the Solidity compiler, and its checksum verification failed.\n\nPlease check your internet connection and try again.\n\nIf this error persists, run `npx hardhat clean --global`.";
700
631
  };
701
632
  readonly CANT_RUN_NATIVE_COMPILER: {
702
- readonly number: 926;
633
+ readonly number: 907;
703
634
  readonly messageTemplate: "A native version of solc failed to run.\n\nIf you are running MacOS, try installing Apple Rosetta.\n\nIf this error persists, run \"npx hardhat clean --global\".";
704
635
  readonly websiteTitle: "Failed to run native solc";
705
636
  readonly websiteDescription: "Hardhat successfully downloaded a native version of solc but it doesn't run.\n\nIf you are running MacOS, try installing Apple Rosetta.\n\nIf this error persists, run \"npx hardhat clean --global\".";
706
637
  };
707
638
  readonly CANT_RUN_SOLCJS_COMPILER: {
708
- readonly number: 927;
639
+ readonly number: 908;
709
640
  readonly messageTemplate: "A wasm version of solc failed to run.\n\nIf this error persists, run \"npx hardhat clean --global\".";
710
641
  readonly websiteTitle: "Failed to run solcjs";
711
642
  readonly websiteDescription: "Hardhat successfully downloaded a WASM version of solc but it doesn't run.\n\nIf you are running MacOS, try installing Apple Rosetta.\n\nIf this error persists, run \"npx hardhat clean --global\".";
712
643
  };
713
644
  readonly COMPILATION_JOB_CREATION_ERROR: {
714
- readonly number: 928;
645
+ readonly number: 909;
715
646
  readonly messageTemplate: "Failed to create compilation job for file \"{rootFilePath}\" using the build profile \"{buildProfile}\".\n\n{reason}";
716
647
  readonly websiteTitle: "Failed to create compilation job";
717
648
  readonly websiteDescription: "Hardhat failed to create a compilation job for a file in your project.\n\nThis happens when your files require incompatible versions of solc or you haven't configured a version that works with them";
718
649
  };
719
650
  readonly BUILD_FAILED: {
720
- readonly number: 929;
651
+ readonly number: 910;
721
652
  readonly messageTemplate: "Compilation failed";
722
653
  readonly websiteTitle: "Compilation failed";
723
654
  readonly websiteDescription: "Your smart contracts failed to compile.\n\nPlease check Hardhat's output for more details.";
724
655
  };
725
656
  readonly INVALID_SOLCJS_COMPILER: {
726
- readonly number: 930;
657
+ readonly number: 911;
727
658
  readonly messageTemplate: "A wasm version of solc {version} is invalid. The compile function is not available.";
728
659
  readonly websiteTitle: "Invalid solcjs compiler";
729
- readonly websiteDescription: "Hardhat successfully downloaded a WASM version of solc {version} but it is invalid. The compile function is missing.";
730
- };
731
- readonly RESOLVE_NOT_EXPORTED_NPM_FILE: {
732
- readonly number: 931;
733
- readonly messageTemplate: "You are tying to resolve the npm file \"{module}\", but it's not exported by its package";
734
- readonly websiteTitle: "Resolution of not-exported npm file";
735
- readonly websiteDescription: "You are tying to resolve an npm file that is not exported by its package.";
660
+ readonly websiteDescription: "Hardhat successfully downloaded a WASM version of solc but it is invalid. The compile function is missing.";
736
661
  };
737
662
  readonly BUILD_PROFILE_NOT_FOUND: {
738
- readonly number: 932;
663
+ readonly number: 912;
739
664
  readonly messageTemplate: "The build profile \"{buildProfileName}\" is not defined in your Hardhat config";
740
665
  readonly websiteTitle: "Build profile not defined";
741
666
  readonly websiteDescription: "The build profile you are trying to use is not defined in your Hardhat config.";
@@ -758,9 +683,9 @@ export declare const ERRORS: {
758
683
  readonly NODE: {
759
684
  readonly INVALID_NETWORK_TYPE: {
760
685
  readonly number: 1100;
761
- readonly messageTemplate: "The provided node network type \"{networkType}\" for network \"{networkName}\" is not recognized, only 'edr' is supported.";
686
+ readonly messageTemplate: "The provided node network type \"{networkType}\" for network \"{networkName}\" is not recognized, only 'edr-simulated' is supported.";
762
687
  readonly websiteTitle: "Invalid node network type";
763
- readonly websiteDescription: "The node only supports the 'edr' network type.";
688
+ readonly websiteDescription: "The node only supports the 'edr-simulated' network type.";
764
689
  };
765
690
  };
766
691
  readonly TEST_PLUGIN: {
@@ -771,6 +696,20 @@ export declare const ERRORS: {
771
696
  readonly websiteDescription: "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.";
772
697
  };
773
698
  };
699
+ readonly COVERAGE: {
700
+ readonly SOURCE_NOT_INSTRUMENTED: {
701
+ readonly number: 1300;
702
+ readonly messageTemplate: "The source file \"{sourceName}\" could not be instrumented for coverage.";
703
+ readonly websiteTitle: "Source file not instrumented for coverage";
704
+ readonly websiteDescription: "The source file could not be instrumented for coverage.";
705
+ };
706
+ readonly IMPORT_PATH_ALREADY_DEFINED: {
707
+ readonly number: 1301;
708
+ readonly messageTemplate: "The import path \"{importPath}\" is already defined in the compilation sources";
709
+ readonly websiteTitle: "Import path already defined in compilation sources";
710
+ readonly websiteDescription: "The import path is already defined in the compilation sources";
711
+ };
712
+ };
774
713
  };
775
714
  readonly IGNITION: {
776
715
  readonly GENERAL: {
@@ -786,6 +725,12 @@ export declare const ERRORS: {
786
725
  readonly websiteTitle: "Unsupported ethers.js value";
787
726
  readonly websiteDescription: "Unsupported ethers.js value";
788
727
  };
728
+ readonly ARTIFACT_MIGRATION_NEEDED: {
729
+ readonly number: 10002;
730
+ readonly messageTemplate: "Hardhat Ignition needs to migrate this deployments artifacts to the new format. Please run `npx hardhat ignition migrate {deploymentId}`";
731
+ readonly websiteTitle: "Artifact migration needed";
732
+ readonly websiteDescription: "Hardhat Ignition needs to migrate the artifacts to the new format. Please run `npx hardhat ignition migrate {deploymentId}`";
733
+ };
789
734
  };
790
735
  readonly INTERNAL: {
791
736
  readonly INTERNAL_ERROR: {
@@ -1039,9 +984,9 @@ export declare const ERRORS: {
1039
984
  };
1040
985
  readonly TRANSACTION_LOST: {
1041
986
  readonly number: 10410;
1042
- readonly messageTemplate: "An error occured while trying to send a transaction for future {futureId}.\nPlease use a block explorer to find the hash of the transaction with nonce {nonce} sent from account {sender} and use the following command to add it to your deployment:\nnpx hardhat ignition track-tx <txHash> <deploymentId> --network <networkName>";
987
+ readonly messageTemplate: "An error occurred while trying to send a transaction for future {futureId}.\nPlease use a block explorer to find the hash of the transaction with nonce {nonce} sent from account {sender} and use the following command to add it to your deployment:\nnpx hardhat ignition track-tx <txHash> <deploymentId> --network <networkName>";
1043
988
  readonly websiteTitle: "Transaction lost";
1044
- readonly websiteDescription: "An error occured while trying to send a transaction";
989
+ readonly websiteDescription: "An error occurred while trying to send a transaction";
1045
990
  };
1046
991
  };
1047
992
  readonly RECONCILIATION: {
@@ -1179,7 +1124,7 @@ export declare const ERRORS: {
1179
1124
  readonly number: 10717;
1180
1125
  readonly messageTemplate: "Invalid libraries for contract {contractName}: The names '{inputName}' and '{libName}' clash with each other, please use qualified names for both.";
1181
1126
  readonly websiteTitle: "Conflicting library names";
1182
- readonly websiteDescription: "The libray names clash with each other";
1127
+ readonly websiteDescription: "The library names clash with each other";
1183
1128
  };
1184
1129
  readonly INVALID_LIBRARY_NAME: {
1185
1130
  readonly number: 10718;
@@ -1251,6 +1196,12 @@ export declare const ERRORS: {
1251
1196
  readonly websiteTitle: "Chain ID changed";
1252
1197
  readonly websiteDescription: "The deployment's chain cannot be changed between runs.";
1253
1198
  };
1199
+ readonly ALREADY_IN_PROGRESS: {
1200
+ readonly number: 10901;
1201
+ readonly messageTemplate: "Another instance of `IgnitionHelper.deploy()` is already in use. Please wait for the previous deployment to finish.";
1202
+ readonly websiteTitle: "Deployment already in progress";
1203
+ readonly websiteDescription: "Another instance of `IgnitionHelper.deploy()` is already in use. Please wait for the previous deployment to finish.";
1204
+ };
1254
1205
  };
1255
1206
  readonly VERIFY: {
1256
1207
  readonly UNINITIALIZED_DEPLOYMENT: {
@@ -1437,6 +1388,24 @@ export declare const ERRORS: {
1437
1388
  readonly websiteTitle: "Unsupported type for deep copy";
1438
1389
  readonly websiteDescription: "Unsupported type for deep copy";
1439
1390
  };
1391
+ readonly ACCOUNTS_OF_TYPE_REMOTE: {
1392
+ readonly number: 20014;
1393
+ readonly messageTemplate: "Tried to obtain a private key, but the network is configured to use remote accounts.";
1394
+ readonly websiteTitle: "Remote accounts are not supported";
1395
+ readonly websiteDescription: "Remote accounts are not supported";
1396
+ };
1397
+ readonly WRONG_ACCOUNTS_FORMAT: {
1398
+ readonly number: 20015;
1399
+ readonly messageTemplate: "The \"accounts\" property in your Hardhat configuration file is not set correctly.";
1400
+ readonly websiteTitle: "Invalid \"accounts\" property in your Hardhat configuration file";
1401
+ readonly websiteDescription: "The \"accounts\" property in your Hardhat configuration file is not set correctly. Please double check it and try again.";
1402
+ };
1403
+ readonly NO_PRIVATE_KEY_FOR_ADDRESS: {
1404
+ readonly number: 20016;
1405
+ readonly messageTemplate: "No private key can be associated with the address \"{address}\".";
1406
+ readonly websiteTitle: "Private key for the address could not be found";
1407
+ readonly websiteDescription: "The private key for the address could not be found. Please double check your private keys and try again.";
1408
+ };
1440
1409
  };
1441
1410
  };
1442
1411
  readonly HARDHAT_MOCHA: {
@@ -1455,7 +1424,7 @@ export declare const ERRORS: {
1455
1424
  readonly number: 40000;
1456
1425
  readonly messageTemplate: "No network with chain id \"{chainId}\" found.";
1457
1426
  readonly websiteTitle: "Network not found";
1458
- readonly websiteDescription: "No network with the specified chain id was found. You can override the chain by passing it as a parameter to the client getter:\n\nimport { someChain } from \"viem/chains\";\nconst client = await hre.viem.getPublicClient({\n chain: someChain,\n ...\n});\n\nYou can find a list of supported networks here: https://github.com/wevm/viem/blob/main/src/chains/index.ts";
1427
+ readonly websiteDescription: "No network with the specified chain id was found. You can override the chain by passing it as a parameter to the client getter:\n\n```ts\nimport { someChain } from \"viem/chains\";\nconst client = await hre.viem.getPublicClient({\n chain: someChain,\n ...\n});\n```\n\nYou can find a list of supported networks here: https://github.com/wevm/viem/blob/main/src/chains/index.ts";
1459
1428
  };
1460
1429
  readonly UNSUPPORTED_DEVELOPMENT_NETWORK: {
1461
1430
  readonly number: 40001;
@@ -1467,7 +1436,7 @@ export declare const ERRORS: {
1467
1436
  readonly number: 40002;
1468
1437
  readonly messageTemplate: "No default wallet client found for chain id \"{chainId}\".";
1469
1438
  readonly websiteTitle: "Default Wallet Client Not Found";
1470
- readonly websiteDescription: "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.\n\nTo 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:\n\nconst networkConnection = await hre.network.connect(...);\nconst walletClient = await networkConnection.viem.getWalletClient(address);\n\nawait networkConnection.viem.deployContract(contractName, constructorArgs, { walletClient });\nawait networkConnection.viem.sendDeploymentTransaction(contractName, constructorArgs, { walletClient });\nawait networkConnection.viem.getContractAt(contractName, address, { walletClient });";
1439
+ readonly websiteDescription: "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.\n\nTo 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:\n\n```ts\nconst networkConnection = await hre.network.connect(...);\nconst walletClient = await networkConnection.viem.getWalletClient(address);\n\nawait networkConnection.viem.deployContract(contractName, constructorArgs, { walletClient });\nawait networkConnection.viem.sendDeploymentTransaction(contractName, constructorArgs, { walletClient });\nawait networkConnection.viem.getContractAt(contractName, address, { walletClient });\n```\n";
1471
1440
  };
1472
1441
  readonly LINKING_CONTRACT_ERROR: {
1473
1442
  readonly number: 40003;
@@ -1497,6 +1466,18 @@ export declare const ERRORS: {
1497
1466
  readonly websiteTitle: "Invalid password or corrupted keystore file";
1498
1467
  readonly websiteDescription: "The password you provided is incorrect or the keystore file is corrupted.";
1499
1468
  };
1469
+ readonly CANNOT_CHANGED_PASSWORD_FOR_DEV_KEYSTORE: {
1470
+ readonly number: 50001;
1471
+ readonly messageTemplate: "The keystore \"change-password\" task cannot be used with the development keystore";
1472
+ readonly websiteTitle: "Cannot change password for dev keystore";
1473
+ readonly websiteDescription: "The keystore \"change-password\" task cannot be used with the development keystore";
1474
+ };
1475
+ readonly KEY_NOT_FOUND_DURING_TESTS_WITH_DEV_KEYSTORE: {
1476
+ readonly number: 50002;
1477
+ readonly messageTemplate: "Key \"{key}\" not found in the development keystore. Run \"npx hardhat keystore set {key} --dev\" to set it.";
1478
+ readonly websiteTitle: "Key not found in the development keystore during tests";
1479
+ readonly websiteDescription: "Key not found in the development keystore. During tests, configuration variables can only be accessed through the development keystore.\n\nRun `npx hardhat keystore set <KEY> --dev` to set it.";
1480
+ };
1500
1481
  };
1501
1482
  };
1502
1483
  readonly NETWORK_HELPERS: {
@@ -1665,8 +1646,8 @@ export declare const ERRORS: {
1665
1646
  readonly REVERT_INVALID_ARGUMENTS_LENGTH: {
1666
1647
  readonly number: 70010;
1667
1648
  readonly messageTemplate: "The .revertedWithCustomError matcher expects two arguments: the contract and the custom error name. Arguments should be asserted with the .withArgs helper.";
1668
- readonly websiteTitle: "Invalid arguments length for the .revertedWithCustomError matcher";
1669
- readonly websiteDescription: "Invalid arguments length for the .revertedWithCustomError matcher";
1649
+ readonly websiteTitle: "Invalid arguments length for the .revertedWithCustomError matcher";
1650
+ readonly websiteDescription: "Invalid arguments length for the .revertedWithCustomError matcher";
1670
1651
  };
1671
1652
  readonly WITH_ARGS_FORBIDDEN: {
1672
1653
  readonly number: 70011;
@@ -1746,6 +1727,247 @@ export declare const ERRORS: {
1746
1727
  readonly websiteTitle: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined";
1747
1728
  readonly websiteDescription: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined";
1748
1729
  };
1730
+ readonly DEPRECATED_REVERTED_MATCHER: {
1731
+ readonly number: 70024;
1732
+ readonly messageTemplate: "The .reverted matcher has been deprecated. Use .revert(ethers) instead.";
1733
+ readonly websiteTitle: "Deprecated `reverted` matcher";
1734
+ readonly websiteDescription: "The `.reverted` matcher was deprecated and you should use `.revert(ethers)` instead.";
1735
+ };
1736
+ };
1737
+ };
1738
+ readonly HARDHAT_VERIFY: {
1739
+ readonly GENERAL: {
1740
+ readonly NETWORK_NOT_SUPPORTED: {
1741
+ readonly number: 80000;
1742
+ readonly messageTemplate: "The network \"{networkName}\" with chain id \"{chainId}\" is not supported.";
1743
+ readonly websiteTitle: "Network not supported";
1744
+ readonly websiteDescription: "The network is not supported by hardhat-verify. To see the list of supported networks, run:\n\n```sh\nnpx hardhat verify --list-networks\n```\n\nTo add support for a new network, see https://hardhat.org/verify-custom-networks";
1745
+ };
1746
+ readonly EXPLORER_REQUEST_FAILED: {
1747
+ readonly number: 80001;
1748
+ readonly messageTemplate: "The request to {url} failed with the message \"{errorMessage}\". This error comes from {name}, not Hardhat.";
1749
+ readonly websiteTitle: "Explorer request failed";
1750
+ readonly websiteDescription: "The request to the explorer failed.\n\n- Verify that the URL is correct.\n- Ensure the service is up and reachable.\n- Check your network connection and try again.";
1751
+ };
1752
+ readonly EXPLORER_REQUEST_STATUS_CODE_ERROR: {
1753
+ readonly number: 80002;
1754
+ readonly messageTemplate: "The request to {url} returned a non-success status code {statusCode}: \"{errorMessage}\". (This response comes from {name}, not Hardhat.)";
1755
+ readonly websiteTitle: "Explorer request status code error";
1756
+ readonly websiteDescription: "The request to the explorer returned a non-success status code.\n\n- Verify that the URL is correct.\n- Ensure the service is up and reachable.\n- Check your network connection and try again.";
1757
+ };
1758
+ readonly SOLC_VERSION_NOT_SUPPORTED: {
1759
+ readonly number: 80003;
1760
+ readonly messageTemplate: "The following Solidity compiler versions are not supported by the Etherscan API: {unsupportedSolcVersions}.";
1761
+ readonly websiteTitle: "Unsupported solidity compiler version";
1762
+ readonly websiteDescription: "The specified Solidity compiler version is not supported by the Etherscan API. Only versions 0.4.11 and above are supported.\nFor a full list of supported versions, visit: https://etherscan.io/solcversions";
1763
+ };
1764
+ readonly DEPLOYED_BYTECODE_NOT_FOUND: {
1765
+ readonly number: 80004;
1766
+ readonly messageTemplate: "No bytecode found at address \"{address}\". Is the contract deployed on the \"{networkName}\" network?";
1767
+ readonly websiteTitle: "Deployed bytecode not found";
1768
+ readonly websiteDescription: "No bytecode was found at the specified address. This usually means the contract is not deployed or was deployed to a different network.\nPlease verify the address and selected network, and try again.";
1769
+ };
1770
+ readonly SOLC_VERSION_MISMATCH: {
1771
+ readonly number: 80005;
1772
+ readonly messageTemplate: "The contract deployed to the \"{networkName}\" network was compiled with Solidity {deployedSolcVersion}, but the configured compiler {configuredSolcVersionSummary}.";
1773
+ readonly websiteTitle: "Compiler version mismatch";
1774
+ readonly websiteDescription: "The Solidity compiler version used to compile the deployed contract does not match any of the versions configured in your Hardhat project.\n\nThis mismatch may indicate:\n\n- You're not on the same commit that was used to deploy the contract.\n- The compiler version in your Hardhat config is incorrect.\n- The address provided is not the deployed contract.\n- The selected network is incorrect.";
1775
+ };
1776
+ readonly CONTRACT_NOT_FOUND: {
1777
+ readonly number: 80006;
1778
+ readonly messageTemplate: "The contract \"{contract}\" is not present in your project's artifacts.";
1779
+ readonly websiteTitle: "Contract not found";
1780
+ readonly websiteDescription: "The specified contract is not present in your project's artifacts. Please ensure the contract is compiled and the name is correct.";
1781
+ };
1782
+ readonly BUILD_INFO_NOT_FOUND: {
1783
+ readonly number: 80007;
1784
+ readonly messageTemplate: "The contract \"{contract}\" is present in your project, but its build info is missing.";
1785
+ readonly websiteTitle: "Build info not found";
1786
+ readonly websiteDescription: "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.";
1787
+ };
1788
+ readonly BUILD_INFO_SOLC_VERSION_MISMATCH: {
1789
+ readonly number: 80008;
1790
+ readonly messageTemplate: "The contract \"{contract}\" build info specifies Solidity {buildInfoSolcVersion}, but the deployed bytecode on the \"{networkName}\" network indicates {versionDetails}.";
1791
+ readonly websiteTitle: "Build info compiler version mismatch";
1792
+ readonly websiteDescription: "The compiler version in the build info does not match the version encoded in the deployed bytecode.\nPossible causes:\n\n- Compiler settings were changed after deployment.\n- The contract address is incorrect.\n- The selected network is incorrect.";
1793
+ };
1794
+ readonly DEPLOYED_BYTECODE_MISMATCH: {
1795
+ readonly number: 80009;
1796
+ readonly messageTemplate: "The address contains a contract whose bytecode does not match {contractDescription}.";
1797
+ readonly websiteTitle: "Deployed bytecode mismatch";
1798
+ readonly websiteDescription: "The bytecode at the specified address did not match the expected contract.\n\nPossible causes:\n\n- Your artifacts are outdated or missing; try running `npx hardhat compile --force --buildProfile production`.\n- The contract code was modified after deployment.\n- Compiler settings (optimizer, EVM version, etc.) changed after deployment.\n- The provided address is incorrect.\n- The selected network is incorrect.";
1799
+ };
1800
+ readonly DEPLOYED_BYTECODE_MULTIPLE_MATCHES: {
1801
+ readonly number: 80010;
1802
+ readonly messageTemplate: "More than one contract matches the deployed bytecode:\n{fqnList}\n\nSpecify the exact contract using the `--contract` flag.";
1803
+ readonly websiteTitle: "Multiple contract matches";
1804
+ readonly websiteDescription: "The deployed bytecode matches multiple compiled contracts. Specify the exact contract using the `--contract` flag. For example:\n\n```sh\nnpx hardhat verify --contract contracts/Example.sol:ExampleContract <other args>\n```\n";
1805
+ };
1806
+ readonly INVALID_LIBRARY_ADDRESS: {
1807
+ readonly number: 80011;
1808
+ readonly messageTemplate: "The library \"{library}\" provided for the contract \"{contract}\" has an invalid address: \"{address}\".";
1809
+ readonly websiteTitle: "Invalid library address";
1810
+ readonly websiteDescription: "The address provided for a linked library is invalid. Please make sure the address is a valid Ethereum address.";
1811
+ };
1812
+ readonly UNUSED_LIBRARY: {
1813
+ readonly number: 80012;
1814
+ readonly messageTemplate: "The library \"{library}\" provided for the contract \"{contract}\" is not used by the contract.\n\n{suggestion}";
1815
+ readonly websiteTitle: "Library not found in contract";
1816
+ readonly websiteDescription: "A library was specified using the \"--libraries\" option, but the selected contract does not use it.\n\nIf the contract uses external libraries, verify that the provided name matches the fully qualified name (FQN) of one of them, such as:\n\n```\n contracts/Math.sol:SafeMath\n```\n";
1817
+ };
1818
+ readonly LIBRARY_MULTIPLE_MATCHES: {
1819
+ readonly number: 80013;
1820
+ readonly messageTemplate: "The library \"{library}\" provided for the contract \"{contract}\" is ambiguous.\nIt matches multiple libraries:\n{fqnList}\n\nTo fix this, specify one of these fully qualified library names and try again.";
1821
+ readonly websiteTitle: "Library name is ambiguous";
1822
+ readonly websiteDescription: "The specified library name matches multiple libraries used by the contract.\n\nTo resolve the ambiguity, provide the fully qualified library name in the format:\n\n```\n path/to/LibraryFile.sol:LibraryName\n```\n";
1823
+ };
1824
+ readonly DUPLICATED_LIBRARY: {
1825
+ readonly number: 80014;
1826
+ readonly messageTemplate: "The library name \"{library}\" and its fully qualified name \"{libraryFqn}\" refer to the same library.\n\nTo fix this, remove one of them and try again.";
1827
+ readonly websiteTitle: "Duplicated library entry";
1828
+ readonly websiteDescription: "The same library was specified more than once using both its short name and fully qualified name (FQN) in the `--libraries` option.\n\nOnly one form should be used for each library. Remove one of the entries and try again.";
1829
+ };
1830
+ readonly LIBRARY_ADDRESSES_MISMATCH: {
1831
+ readonly number: 80015;
1832
+ readonly messageTemplate: "The following detected library addresses differ from those you provided:\n{conflictList}\n\nYou can either fix these addresses in your libraries, or remove them to let the plugin autodetect them.";
1833
+ readonly websiteTitle: "Library address mismatch";
1834
+ readonly websiteDescription: "Some libraries have conflicting addresses between what you provided and what was detected in the deployed bytecode.\n\nPlease ensure each library address is correct. You can remove entries from your input to use autodetection instead.";
1835
+ };
1836
+ readonly MISSING_LIBRARY_ADDRESSES: {
1837
+ readonly number: 80016;
1838
+ readonly messageTemplate: "The contract \"{contract}\" has one or more library addresses that cannot be detected from the deployed bytecode.\nThis can occur if a library is only used in the contract's constructor. The missing libraries are:\n{missingList}";
1839
+ readonly websiteTitle: "Missing library addresses";
1840
+ readonly websiteDescription: "One or more libraries required by the contract could not be detected from the deployed bytecode.\n\nThis 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.";
1841
+ };
1842
+ readonly INVALID_CONSTRUCTOR_ARGUMENT_TYPE: {
1843
+ readonly number: 80017;
1844
+ readonly messageTemplate: "The value \"{value}\" for a constructor parameter cannot be encoded.\nReason: {reason}.";
1845
+ readonly websiteTitle: "Invalid constructor argument type";
1846
+ readonly websiteDescription: "One of the arguments passed to the contract's constructor has an invalid JavaScript type.\n\nThis 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.\n\nPlease verify that each constructor argument is the correct JS type.";
1847
+ };
1848
+ readonly INVALID_CONSTRUCTOR_ARGUMENTS_LENGTH: {
1849
+ readonly number: 80018;
1850
+ readonly messageTemplate: "The constructor for \"{contract}\" has {requiredArgs} parameters but {providedArgs} arguments were provided instead.";
1851
+ readonly websiteTitle: "Invalid constructor argument count";
1852
+ readonly websiteDescription: "The number of arguments provided to the contract's constructor doesn't match the number of parameters defined in its ABI.\n\nThis 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.\n\nPlease verify that you pass the exact number of arguments required by the constructor.";
1853
+ };
1854
+ readonly CONSTRUCTOR_ARGUMENT_OVERFLOW: {
1855
+ readonly number: 80019;
1856
+ readonly messageTemplate: "The value \"{value}\" is out of bounds for its Solidity type and cannot be encoded.";
1857
+ readonly websiteTitle: "Constructor argument value out of bounds";
1858
+ readonly websiteDescription: "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).\n\nThis error occurs when a value exceeds the maximum or minimum allowed for the specified Solidity type.\n\nPlease ensure all argument values fit within the valid range for their respective Solidity types.";
1859
+ };
1860
+ readonly CONSTRUCTOR_ARGUMENTS_ENCODING_FAILED: {
1861
+ readonly number: 80020;
1862
+ readonly messageTemplate: "The constructor arguments for \"{contract}\" could not be encoded. Reason: {reason}.";
1863
+ readonly websiteTitle: "Constructor arguments encoding failed";
1864
+ readonly websiteDescription: "The constructor arguments provided for the contract could not be encoded correctly.\nPlease review the provided arguments and ensure they match the expected arguments defined in the contract's ABI.";
1865
+ };
1866
+ readonly CONTRACT_VERIFICATION_MISSING_BYTECODE: {
1867
+ readonly number: 80021;
1868
+ readonly messageTemplate: "The request to {url} failed because the address \"{address}\" does not have bytecode.";
1869
+ readonly websiteTitle: "Missing bytecode at address";
1870
+ readonly websiteDescription: "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.\n\nPlease 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.";
1871
+ };
1872
+ readonly CONTRACT_ALREADY_VERIFIED: {
1873
+ readonly number: 80022;
1874
+ readonly messageTemplate: "The contract \"{contract}\" at address \"{address}\" is already verified.";
1875
+ readonly websiteTitle: "Contract already verified";
1876
+ readonly websiteDescription: "The block explorer responded that the contract is already verified.\n\nThis 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.";
1877
+ };
1878
+ readonly CONTRACT_VERIFICATION_REQUEST_FAILED: {
1879
+ readonly number: 80023;
1880
+ readonly messageTemplate: "The contract verification request failed: \"{message}\".";
1881
+ readonly websiteTitle: "Contract verification request failed";
1882
+ readonly websiteDescription: "The block explorer returned an error when attempting to verify the contract's source code.\n\nPlease check the returned message for details.";
1883
+ };
1884
+ readonly CONTRACT_VERIFICATION_STATUS_POLLING_FAILED: {
1885
+ readonly number: 80024;
1886
+ readonly messageTemplate: "The contract verification status polling encountered an error: \"{message}\". Verification may still succeed.";
1887
+ readonly websiteTitle: "Contract verification status polling failed";
1888
+ readonly websiteDescription: "The block explorer returned a failure status when checking the verification status. Verification may still succeed; please check manually.";
1889
+ };
1890
+ readonly CONTRACT_VERIFICATION_UNEXPECTED_RESPONSE: {
1891
+ readonly number: 80025;
1892
+ readonly messageTemplate: "The block explorer API returned an unexpected message: \"{message}\". Please report this issue to the Hardhat team.";
1893
+ readonly shouldBeReported: true;
1894
+ readonly websiteTitle: "Unexpected API response during contract verification";
1895
+ readonly websiteDescription: "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.\n\nPlease report this issue to the Hardhat team.";
1896
+ };
1897
+ readonly CONTRACT_VERIFICATION_FAILED: {
1898
+ readonly number: 80026;
1899
+ readonly messageTemplate: "The contract verification failed.\nReason: \"{reason}\".\n{librariesWarning}";
1900
+ readonly websiteTitle: "Contract verification failed";
1901
+ readonly websiteDescription: "Unable to verify the contract on the block explorer.\n\nIf your contract uses libraries whose addresses cannot be detected automatically, make sure you are providing the correct address for each undetectable library.";
1902
+ };
1903
+ readonly BLOCK_EXPLORER_NOT_CONFIGURED: {
1904
+ readonly number: 80027;
1905
+ readonly messageTemplate: "No {verificationProvider} block explorer is configured for the {chainId} chain in the chain descriptors.";
1906
+ readonly websiteTitle: "Block explorer not configured";
1907
+ readonly websiteDescription: "\nBlock explorer information is missing in your chain descriptor configuration.\n\nTo enable contract verification, add an entry for the verification provider in the blockExplorers field of the relevant chain descriptor.\nYou can override the default chain descriptor by providing your own chainDescriptors object in the Hardhat config, with the following structure:\n\n```\nchainDescriptors: {\n <chainId>: {\n name: <name>,\n blockExplorers: {\n blockscout: { name: \"Blockscout\", url: <blockscout-url> apiUrl: <blockscout-api-url> };\n etherscan: { name: \"Etherscan\", url: <etherscan-url> apiUrl: <etherscan-api-url> };\n }\n }\n}\n```\n";
1908
+ };
1909
+ readonly ADDRESS_NOT_A_CONTRACT: {
1910
+ readonly number: 80028;
1911
+ readonly messageTemplate: "{verificationProvider} responded that the address \"{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.";
1912
+ readonly websiteTitle: "Address is not a contract";
1913
+ readonly websiteDescription: "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.\nPlease verify the address and network, and try again later if necessary.";
1914
+ };
1915
+ readonly EXPLORER_API_KEY_EMPTY: {
1916
+ readonly number: 80029;
1917
+ readonly messageTemplate: "The {verificationProvider} API key is empty.";
1918
+ readonly websiteTitle: "Block explorer API key is empty";
1919
+ readonly websiteDescription: "The provided API key for the block explorer is empty. This can happen in the following cases:\n\n- No \"apiKey\" field is configured in the hardhat config.\n- The \"apiKey\" is explicitly set to an empty string in the Hardhat config.\n- The \"apiKey\" is assigned to a config variable that resolves to an empty string at runtime.\n\nTo resolve this, set a valid non-empty API key in your Hardhat config, then try again.";
1920
+ };
1921
+ };
1922
+ readonly VALIDATION: {
1923
+ readonly INVALID_ADDRESS: {
1924
+ readonly number: 80100;
1925
+ readonly messageTemplate: "\"{value}\" is not a valid address";
1926
+ readonly websiteTitle: "Invalid address";
1927
+ readonly websiteDescription: "The value is not a valid address";
1928
+ };
1929
+ readonly MUTUALLY_EXCLUSIVE_CONSTRUCTOR_ARGS: {
1930
+ readonly number: 80101;
1931
+ readonly messageTemplate: "The parameters constructorArgs and constructorArgsPath are mutually exclusive.";
1932
+ readonly websiteTitle: "Mutually exclusive constructor arguments";
1933
+ readonly websiteDescription: "The parameters constructorArgs and constructorArgsPath are mutually exclusive. Please provide only one of them.";
1934
+ };
1935
+ readonly INVALID_CONSTRUCTOR_ARGS_MODULE_EXPORT: {
1936
+ readonly number: 80102;
1937
+ readonly messageTemplate: "The module specified by \"{constructorArgsPath}\" must default export an array of constructor arguments.";
1938
+ readonly websiteTitle: "Invalid constructor arguments module";
1939
+ readonly websiteDescription: "The module specified by the constructorArgsPath parameter must default export an array of constructor arguments.\n\nExample:\n\n```ts\nexport default [\"arg1\", \"arg2\", ...];\n```\n";
1940
+ };
1941
+ readonly MODULE_NOT_FOUND: {
1942
+ readonly number: 80103;
1943
+ readonly messageTemplate: "The module specified by \"{modulePath}\" could not be found.";
1944
+ readonly websiteTitle: "Module not found";
1945
+ readonly websiteDescription: "The specified module could not be found. Please check the path and try again.";
1946
+ };
1947
+ readonly MODULE_SYNTAX_ERROR: {
1948
+ readonly number: 80104;
1949
+ readonly messageTemplate: "The module specified by \"{modulePath}\" has a syntax error: {errorMessage}";
1950
+ readonly websiteTitle: "Module syntax error";
1951
+ readonly websiteDescription: "The specified module has a syntax error. Please fix the error and try again.";
1952
+ };
1953
+ readonly IMPORT_MODULE_FAILED: {
1954
+ readonly number: 80105;
1955
+ readonly messageTemplate: "The module specified by \"{modulePath}\" could not be imported: {errorMessage}";
1956
+ readonly websiteTitle: "Import module failed";
1957
+ readonly websiteDescription: "The specified module could not be imported.";
1958
+ };
1959
+ readonly INVALID_LIBRARIES_MODULE_EXPORT: {
1960
+ readonly number: 80106;
1961
+ readonly messageTemplate: "The module specified by \"{librariesPath}\" must default export a record of libraries.";
1962
+ readonly websiteTitle: "Invalid libraries module";
1963
+ readonly websiteDescription: "The module specified by the librariesPath parameter must default export a record of libraries.\n\nExample:\n\n```ts\nexport default { lib1: \"0x...\", lib2: \"0x...\", ... };\n```";
1964
+ };
1965
+ readonly INVALID_VERIFICATION_PROVIDER: {
1966
+ readonly number: 80107;
1967
+ readonly messageTemplate: "The verification provider \"{verificationProvider}\" is not supported. Supported providers are: {supportedVerificationProviders}.";
1968
+ readonly websiteTitle: "Invalid verification provider";
1969
+ readonly websiteDescription: "The specified verification provider is not supported. Please use one of the supported providers.";
1970
+ };
1749
1971
  };
1750
1972
  };
1751
1973
  };