hardhat 3.0.0-next.13 → 3.0.0-next.14

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/src/internal/builtin-plugins/index.d.ts +0 -1
  3. package/dist/src/internal/builtin-plugins/index.d.ts.map +1 -1
  4. package/dist/src/internal/builtin-plugins/index.js +0 -2
  5. package/dist/src/internal/builtin-plugins/index.js.map +1 -1
  6. package/dist/src/internal/builtin-plugins/network-manager/http-provider.d.ts.map +1 -1
  7. package/dist/src/internal/builtin-plugins/network-manager/http-provider.js.map +1 -1
  8. package/dist/src/utils/contract-names.d.ts +45 -0
  9. package/dist/src/utils/contract-names.d.ts.map +1 -0
  10. package/dist/src/utils/contract-names.js +60 -0
  11. package/dist/src/utils/contract-names.js.map +1 -0
  12. package/package.json +8 -7
  13. package/src/internal/builtin-plugins/index.ts +0 -3
  14. package/src/internal/builtin-plugins/network-manager/http-provider.ts +2 -1
  15. package/src/utils/contract-names.ts +80 -0
  16. package/templates/01-node-test-runner-viem/package.json +3 -3
  17. package/templates/01-node-test-runner-viem/test/Counter.ts +12 -0
  18. package/templates/02-mocha-ethers/package.json +4 -4
  19. package/templates/02-mocha-ethers/test/Counter.ts +46 -40
  20. package/dist/src/internal/builtin-plugins/verify/index.d.ts +0 -4
  21. package/dist/src/internal/builtin-plugins/verify/index.d.ts.map +0 -1
  22. package/dist/src/internal/builtin-plugins/verify/index.js +0 -12
  23. package/dist/src/internal/builtin-plugins/verify/index.js.map +0 -1
  24. package/dist/src/internal/builtin-plugins/verify/task-action.d.ts +0 -2
  25. package/dist/src/internal/builtin-plugins/verify/task-action.d.ts.map +0 -1
  26. package/dist/src/internal/builtin-plugins/verify/task-action.js +0 -5
  27. package/dist/src/internal/builtin-plugins/verify/task-action.js.map +0 -1
  28. package/src/internal/builtin-plugins/verify/index.ts +0 -15
  29. package/src/internal/builtin-plugins/verify/task-action.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # hardhat
2
2
 
3
+ ## 3.0.0-next.14
4
+
5
+ ### Patch Changes
6
+
7
+ - a1319ee: Add examples of our viem and ethers assertions in the sample projects
8
+ - dcd5f89: Fix node test reporter not stripping some diffs because of coloring (#6688)
9
+ - e582eaa: Removed unreliable context information from falsy expression error messages
10
+ - cf5c563: Add `hardhat-verify` to toolboxes ([#6756](https://github.com/NomicFoundation/hardhat/pull/6756))
11
+ - b7912e2: Rename the package `@nomicfoundation/hardhat-viem-matchers` to `@nomicfoundation/hardhat-viem-assertions` ([#6774](https://github.com/NomicFoundation/hardhat/pull/6774))
12
+ - 18dda34: Fix to set 0 retries on development networks for `hardhat-viem`, thanks @TateB ([#6784](https://github.com/NomicFoundation/hardhat/pull/6784))
13
+
3
14
  ## 3.0.0-next.13
4
15
 
5
16
  ### Patch Changes
@@ -10,7 +10,6 @@ export type * from "./run/index.js";
10
10
  export type * from "./node/index.js";
11
11
  export type * from "./flatten/index.js";
12
12
  export type * from "./coverage/index.js";
13
- export type * from "./verify/index.js";
14
13
  export type * from "./telemetry/index.js";
15
14
  export declare const builtinPlugins: HardhatPlugin[];
16
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/builtin-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAkB5D,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,sBAAsB,CAAC;AAI1C,eAAO,MAAM,cAAc,EAAE,aAAa,EAczC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/builtin-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAiB5D,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,sBAAsB,CAAC;AAI1C,eAAO,MAAM,cAAc,EAAE,aAAa,EAazC,CAAC"}
@@ -10,7 +10,6 @@ import solidity from "./solidity/index.js";
10
10
  import solidityTest from "./solidity-test/index.js";
11
11
  import telemetry from "./telemetry/index.js";
12
12
  import test from "./test/index.js";
13
- import verify from "./verify/index.js";
14
13
  // This array should be kept in order, respecting the dependencies between the
15
14
  // plugins.
16
15
  export const builtinPlugins = [
@@ -25,7 +24,6 @@ export const builtinPlugins = [
25
24
  node,
26
25
  flatten,
27
26
  coverage,
28
- verify,
29
27
  telemetry,
30
28
  ];
31
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/builtin-plugins/index.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,QAAQ,MAAM,qBAA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,IAAI;IACJ,YAAY;IACZ,cAAc;IACd,KAAK;IACL,OAAO;IACP,GAAG;IACH,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,SAAS;CACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"http-provider.d.ts","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/network-manager/http-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAGV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,UAAU,EAEX,MAAM,wCAAwC,CAAC;AAkBhD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBlD,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,6BAA6B,CAAC;IACtD,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED,qBAAa,YAAa,SAAQ,YAAY;;IAS5C;;OAEG;WACiB,MAAM,CAAC,EACzB,GAAG,EACH,WAAW,EACX,YAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,cAAc,GACf,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqB7C;;;;;;OAMG;IACH,OAAO;IAgBM,OAAO,CAClB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IA0ClC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CA8GpC;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAarB"}
1
+ {"version":3,"file":"http-provider.d.ts","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/network-manager/http-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAGV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,wCAAwC,CAAC;AAkBhD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBlD,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,6BAA6B,CAAC;IACtD,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED,qBAAa,YAAa,SAAQ,YAAY;;IAS5C;;OAEG;WACiB,MAAM,CAAC,EACzB,GAAG,EACH,WAAW,EACX,YAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,cAAc,GACf,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqB7C;;;;;;OAMG;IACH,OAAO;IAgBM,OAAO,CAClB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IA0ClC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CA8GpC;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAarB"}
@@ -1 +1 @@
1
- {"version":3,"file":"http-provider.js","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/network-manager/http-provider.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MA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,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5B,uEAAuE;YACvE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,UAAU,EAAE,2BAA2B,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,mBAAmB,CAAC,iBAAyB,EAAE,UAAkB;QAC/D,IAAI,UAAU,GAAG,WAAW,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,iBAAiB,GAAG,2BAA2B,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAuB,EACvB,iBAAyB,EACzB,UAAkB;QAElB,MAAM,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAW,EACX,OAAgB;IAEhB,IAAI,UAAsB,CAAC;IAE3B,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;QAChE,UAAU,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE;YACpC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;YAC7B,OAAO;SACR,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"http-provider.js","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/network-manager/http-provider.ts"],"names":[],"mappings":"AAaA,OAAO,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name or path of the source file (e.g., "contracts/MyToken.sol").
5
+ * @param contractName The name of the contract declared in that source file.
6
+ * @returns The fully qualified name in the form "sourceName:contractName".
7
+ */
8
+ export declare function getFullyQualifiedName(sourceName: string, contractName: string): string;
9
+ /**
10
+ * Checks whether a given string is a fully qualified name.
11
+ *
12
+ * A fully qualified name contains at least one colon (`:`) separating
13
+ * the source and contract segments.
14
+ *
15
+ * @param name The string to test.
16
+ * @returns `true` if the string contains a colon, `false` otherwise.
17
+ */
18
+ export declare function isFullyQualifiedName(name: string): boolean;
19
+ /**
20
+ * Parses a fully qualified name into its source and contract components.
21
+ *
22
+ * @param fullyQualifiedName The name in the form "sourceName:contractName".
23
+ * @returns An object with `sourceName` and `contractName` properties.
24
+ * @throws {HardhatError} If the input does not contain a source segment.
25
+ */
26
+ export declare function parseFullyQualifiedName(fullyQualifiedName: string): {
27
+ sourceName: string;
28
+ contractName: string;
29
+ };
30
+ /**
31
+ * Splits a string into optional source and contract name parts.
32
+ *
33
+ * If the input contains no colon, `sourceName` will be `undefined`
34
+ * and `contractName` will be the entire string.
35
+ *
36
+ * @param name The string to split, which may be "contractName" or "source:contractName".
37
+ * @returns An object with:
38
+ * - `sourceName`: the joined segments before the last colon, or `undefined` if none.
39
+ * - `contractName`: the segment after the last colon, or the entire string if no colon.
40
+ */
41
+ export declare function parseName(name: string): {
42
+ sourceName?: string;
43
+ contractName: string;
44
+ };
45
+ //# sourceMappingURL=contract-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-names.d.ts","sourceRoot":"","sources":["../../../src/utils/contract-names.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,kBAAkB,EAAE,MAAM,GAAG;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAaA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAWA"}
@@ -0,0 +1,60 @@
1
+ import { HardhatError } from "@nomicfoundation/hardhat-errors";
2
+ /**
3
+ * Combines a source file name and a contract name into a fully qualified name.
4
+ *
5
+ * @param sourceName The name or path of the source file (e.g., "contracts/MyToken.sol").
6
+ * @param contractName The name of the contract declared in that source file.
7
+ * @returns The fully qualified name in the form "sourceName:contractName".
8
+ */
9
+ export function getFullyQualifiedName(sourceName, contractName) {
10
+ return `${sourceName}:${contractName}`;
11
+ }
12
+ /**
13
+ * Checks whether a given string is a fully qualified name.
14
+ *
15
+ * A fully qualified name contains at least one colon (`:`) separating
16
+ * the source and contract segments.
17
+ *
18
+ * @param name The string to test.
19
+ * @returns `true` if the string contains a colon, `false` otherwise.
20
+ */
21
+ export function isFullyQualifiedName(name) {
22
+ return name.includes(":");
23
+ }
24
+ /**
25
+ * Parses a fully qualified name into its source and contract components.
26
+ *
27
+ * @param fullyQualifiedName The name in the form "sourceName:contractName".
28
+ * @returns An object with `sourceName` and `contractName` properties.
29
+ * @throws {HardhatError} If the input does not contain a source segment.
30
+ */
31
+ export function parseFullyQualifiedName(fullyQualifiedName) {
32
+ const { sourceName, contractName } = parseName(fullyQualifiedName);
33
+ if (sourceName === undefined) {
34
+ throw new HardhatError(HardhatError.ERRORS.CORE.GENERAL.INVALID_FULLY_QUALIFIED_NAME, {
35
+ name: fullyQualifiedName,
36
+ });
37
+ }
38
+ return { sourceName, contractName };
39
+ }
40
+ /**
41
+ * Splits a string into optional source and contract name parts.
42
+ *
43
+ * If the input contains no colon, `sourceName` will be `undefined`
44
+ * and `contractName` will be the entire string.
45
+ *
46
+ * @param name The string to split, which may be "contractName" or "source:contractName".
47
+ * @returns An object with:
48
+ * - `sourceName`: the joined segments before the last colon, or `undefined` if none.
49
+ * - `contractName`: the segment after the last colon, or the entire string if no colon.
50
+ */
51
+ export function parseName(name) {
52
+ const parts = name.split(":");
53
+ if (parts.length === 1) {
54
+ return { contractName: parts[0] };
55
+ }
56
+ const contractName = parts[parts.length - 1];
57
+ const sourceName = parts.slice(0, parts.length - 1).join(":");
58
+ return { sourceName, contractName };
59
+ }
60
+ //# sourceMappingURL=contract-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-names.js","sourceRoot":"","sources":["../../../src/utils/contract-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,UAAkB,EAClB,YAAoB;IAEpB,OAAO,GAAG,UAAU,IAAI,YAAY,EAAE,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,kBAA0B;IAIhE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAEnE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,IAAI,YAAY,CACpB,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,4BAA4B,EAC7D;YACE,IAAI,EAAE,kBAAkB;SACzB,CACF,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IAIpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hardhat",
3
- "version": "3.0.0-next.13",
3
+ "version": "3.0.0-next.14",
4
4
  "description": "Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.",
5
5
  "homepage": "https://github.com/nomicfoundation/hardhat/tree/v-next/v-next/hardhat",
6
6
  "repository": {
@@ -35,7 +35,8 @@
35
35
  "./types/utils": "./dist/src/types/utils.js",
36
36
  "./types/solidity": "./dist/src/types/solidity.js",
37
37
  "./console.sol": "./console.sol",
38
- "./internal/coverage": "./dist/src/internal/builtin-plugins/coverage/exports.js"
38
+ "./internal/coverage": "./dist/src/internal/builtin-plugins/coverage/exports.js",
39
+ "./utils/contract-names": "./dist/src/utils/contract-names.js"
39
40
  },
40
41
  "keywords": [
41
42
  "ethereum",
@@ -53,7 +54,7 @@
53
54
  "README.md"
54
55
  ],
55
56
  "devDependencies": {
56
- "@nomicfoundation/hardhat-node-test-reporter": "^3.0.0-next.13",
57
+ "@nomicfoundation/hardhat-node-test-reporter": "^3.0.0-next.14",
57
58
  "@types/adm-zip": "^0.5.5",
58
59
  "@types/debug": "^4.1.7",
59
60
  "@types/node": "^20.14.9",
@@ -65,14 +66,14 @@
65
66
  "prettier": "3.2.5",
66
67
  "rimraf": "^5.0.5",
67
68
  "typescript": "~5.5.0",
68
- "@nomicfoundation/hardhat-test-utils": "^3.0.0-next.13"
69
+ "@nomicfoundation/hardhat-test-utils": "^3.0.0-next.14"
69
70
  },
70
71
  "dependencies": {
71
72
  "@ignored/edr": "0.10.0-alpha.5",
72
73
  "@ignored/edr-optimism": "0.13.0-alpha.4",
73
- "@nomicfoundation/hardhat-errors": "^3.0.0-next.13",
74
- "@nomicfoundation/hardhat-utils": "^3.0.0-next.13",
75
- "@nomicfoundation/hardhat-zod-utils": "^3.0.0-next.13",
74
+ "@nomicfoundation/hardhat-errors": "^3.0.0-next.14",
75
+ "@nomicfoundation/hardhat-utils": "^3.0.0-next.14",
76
+ "@nomicfoundation/hardhat-zod-utils": "^3.0.0-next.14",
76
77
  "@nomicfoundation/solidity-analyzer": "^0.1.1",
77
78
  "@sentry/core": "^9.4.0",
78
79
  "@sentry/node": "^9.4.0",
@@ -12,7 +12,6 @@ import solidity from "./solidity/index.js";
12
12
  import solidityTest from "./solidity-test/index.js";
13
13
  import telemetry from "./telemetry/index.js";
14
14
  import test from "./test/index.js";
15
- import verify from "./verify/index.js";
16
15
 
17
16
  // Note: When importing a plugin, you have to export its types, so that its
18
17
  // type extensions, if any, also get loaded.
@@ -27,7 +26,6 @@ export type * from "./run/index.js";
27
26
  export type * from "./node/index.js";
28
27
  export type * from "./flatten/index.js";
29
28
  export type * from "./coverage/index.js";
30
- export type * from "./verify/index.js";
31
29
  export type * from "./telemetry/index.js";
32
30
 
33
31
  // This array should be kept in order, respecting the dependencies between the
@@ -44,6 +42,5 @@ export const builtinPlugins: HardhatPlugin[] = [
44
42
  node,
45
43
  flatten,
46
44
  coverage,
47
- verify,
48
45
  telemetry,
49
46
  ];
@@ -7,6 +7,7 @@ import type {
7
7
  } from "../../../types/providers.js";
8
8
  import type {
9
9
  Dispatcher,
10
+ HttpResponse,
10
11
  RequestOptions,
11
12
  } from "@nomicfoundation/hardhat-utils/request";
12
13
 
@@ -177,7 +178,7 @@ export class HttpProvider extends BaseProvider {
177
178
  },
178
179
  };
179
180
 
180
- let response;
181
+ let response: HttpResponse;
181
182
  try {
182
183
  response = await postJsonRequest(
183
184
  this.#url,
@@ -0,0 +1,80 @@
1
+ import { HardhatError } from "@nomicfoundation/hardhat-errors";
2
+
3
+ /**
4
+ * Combines a source file name and a contract name into a fully qualified name.
5
+ *
6
+ * @param sourceName The name or path of the source file (e.g., "contracts/MyToken.sol").
7
+ * @param contractName The name of the contract declared in that source file.
8
+ * @returns The fully qualified name in the form "sourceName:contractName".
9
+ */
10
+ export function getFullyQualifiedName(
11
+ sourceName: string,
12
+ contractName: string,
13
+ ): string {
14
+ return `${sourceName}:${contractName}`;
15
+ }
16
+
17
+ /**
18
+ * Checks whether a given string is a fully qualified name.
19
+ *
20
+ * A fully qualified name contains at least one colon (`:`) separating
21
+ * the source and contract segments.
22
+ *
23
+ * @param name The string to test.
24
+ * @returns `true` if the string contains a colon, `false` otherwise.
25
+ */
26
+ export function isFullyQualifiedName(name: string): boolean {
27
+ return name.includes(":");
28
+ }
29
+
30
+ /**
31
+ * Parses a fully qualified name into its source and contract components.
32
+ *
33
+ * @param fullyQualifiedName The name in the form "sourceName:contractName".
34
+ * @returns An object with `sourceName` and `contractName` properties.
35
+ * @throws {HardhatError} If the input does not contain a source segment.
36
+ */
37
+ export function parseFullyQualifiedName(fullyQualifiedName: string): {
38
+ sourceName: string;
39
+ contractName: string;
40
+ } {
41
+ const { sourceName, contractName } = parseName(fullyQualifiedName);
42
+
43
+ if (sourceName === undefined) {
44
+ throw new HardhatError(
45
+ HardhatError.ERRORS.CORE.GENERAL.INVALID_FULLY_QUALIFIED_NAME,
46
+ {
47
+ name: fullyQualifiedName,
48
+ },
49
+ );
50
+ }
51
+
52
+ return { sourceName, contractName };
53
+ }
54
+
55
+ /**
56
+ * Splits a string into optional source and contract name parts.
57
+ *
58
+ * If the input contains no colon, `sourceName` will be `undefined`
59
+ * and `contractName` will be the entire string.
60
+ *
61
+ * @param name The string to split, which may be "contractName" or "source:contractName".
62
+ * @returns An object with:
63
+ * - `sourceName`: the joined segments before the last colon, or `undefined` if none.
64
+ * - `contractName`: the segment after the last colon, or the entire string if no colon.
65
+ */
66
+ export function parseName(name: string): {
67
+ sourceName?: string;
68
+ contractName: string;
69
+ } {
70
+ const parts = name.split(":");
71
+
72
+ if (parts.length === 1) {
73
+ return { contractName: parts[0] };
74
+ }
75
+
76
+ const contractName = parts[parts.length - 1];
77
+ const sourceName = parts.slice(0, parts.length - 1).join(":");
78
+
79
+ return { sourceName, contractName };
80
+ }
@@ -5,9 +5,9 @@
5
5
  "description": "A TypeScript Hardhat project using Node Test Runner and Viem",
6
6
  "type": "module",
7
7
  "devDependencies": {
8
- "hardhat": "workspace:^3.0.0-next.13",
9
- "@nomicfoundation/hardhat-toolbox-viem": "workspace:^4.0.0-next.13",
10
- "@nomicfoundation/hardhat-ignition": "workspace:^3.0.0-next.13",
8
+ "hardhat": "workspace:^3.0.0-next.14",
9
+ "@nomicfoundation/hardhat-toolbox-viem": "workspace:^4.0.0-next.14",
10
+ "@nomicfoundation/hardhat-ignition": "workspace:^3.0.0-next.14",
11
11
  "@types/node": "^22.8.5",
12
12
  "forge-std": "foundry-rs/forge-std#v1.9.4",
13
13
  "typescript": "~5.5.0",
@@ -57,6 +57,18 @@ describe("Counter", async function () {
57
57
  const { viem } = await network.connect();
58
58
  const publicClient = await viem.getPublicClient();
59
59
 
60
+ it("Should emit the Increment event when calling the inc() function", async function () {
61
+ const counter = await viem.deployContract("Counter");
62
+
63
+ // Hardhat 3 comes with assertions to work with viem
64
+ await viem.assertions.emitWithArgs(
65
+ counter.write.inc(),
66
+ counter,
67
+ "Increment",
68
+ [1n],
69
+ );
70
+ });
71
+
60
72
  it("The sum of the Increment events should match the current value", async function () {
61
73
  const counter = await viem.deployContract("Counter");
62
74
 
@@ -5,10 +5,10 @@
5
5
  "description": "A TypeScript Hardhat project using Mocha and Ethers.js",
6
6
  "type": "module",
7
7
  "devDependencies": {
8
- "hardhat": "workspace:^3.0.0-next.13",
9
- "@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.0-next.13",
10
- "@nomicfoundation/hardhat-ignition": "workspace:^3.0.0-next.13",
11
- "@nomicfoundation/hardhat-ethers": "workspace:^4.0.0-next.13",
8
+ "hardhat": "workspace:^3.0.0-next.14",
9
+ "@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.0-next.14",
10
+ "@nomicfoundation/hardhat-ignition": "workspace:^3.0.0-next.14",
11
+ "@nomicfoundation/hardhat-ethers": "workspace:^4.0.0-next.14",
12
12
  "@types/chai": "^4.2.0",
13
13
  "@types/chai-as-promised": "^8.0.1",
14
14
  "@types/mocha": ">=10.0.10",
@@ -1,49 +1,55 @@
1
1
  import { network } from "hardhat";
2
2
  import { expect } from "chai";
3
3
 
4
+ /*
5
+ * In Hardhat 3, there isn't a single global connection to a network. Instead,
6
+ * you have a `network` object that allows you to connect to different
7
+ * networks.
8
+ *
9
+ * You can create multiple network connections using `network.connect`.
10
+ * It takes two optional parameters and returns a `NetworkConnection` object.
11
+ *
12
+ * Its parameters are:
13
+ *
14
+ * 1. The name of the network configuration to use (from `config.networks`).
15
+ *
16
+ * 2. The `ChainType` to use.
17
+ *
18
+ * Providing a `ChainType` ensures the connection is aware of the kind of
19
+ * chain it's using, potentially affecting RPC interactions for HTTP
20
+ * connections, and changing the simulation behavior for EDR networks.
21
+ *
22
+ * If you don't provide a `ChainType`, it will be inferred from the network
23
+ * config, and default to `generic` if not specified in the config.
24
+ *
25
+ * Every time you call `network.connect` with an EDR network config name, a
26
+ * new instance of EDR will be created. Each of these instances has its own
27
+ * state and blockchain, and they have no communication with each other.
28
+ *
29
+ * Examples:
30
+ *
31
+ * - `await network.connect({network: "sepolia", chainType: "l1"})`: Connects
32
+ * to the `sepolia` network config, treating it as an "l1" network.
33
+ *
34
+ * - `await network.connect(network: "hardhatOp", chainType: "optimism"})`:
35
+ * Creates a new EDR instance in Optimism mode, using the `hardhatOp`
36
+ * network config.
37
+ *
38
+ * - `await network.connect()`: Creates a new EDR instance with the default
39
+ * network config (i.e. `hardhat`) and the `generic` chain type.
40
+ *
41
+ * Each network connection object has a `provider` property and other
42
+ * network-related fields added by plugins, like `ethers` and `networkHelpers`.
43
+ */
4
44
  const { ethers } = await network.connect();
5
45
 
6
46
  describe("Counter", function () {
7
- /*
8
- * In Hardhat 3, there isn't a single global connection to a network. Instead,
9
- * you have a `network` object that allows you to connect to different
10
- * networks.
11
- *
12
- * You can create multiple network connections using `network.connect`.
13
- * It takes two optional parameters and returns a `NetworkConnection` object.
14
- *
15
- * Its parameters are:
16
- *
17
- * 1. The name of the network configuration to use (from `config.networks`).
18
- *
19
- * 2. The `ChainType` to use.
20
- *
21
- * Providing a `ChainType` ensures the connection is aware of the kind of
22
- * chain it's using, potentially affecting RPC interactions for HTTP
23
- * connections, and changing the simulation behavior for EDR networks.
24
- *
25
- * If you don't provide a `ChainType`, it will be inferred from the network
26
- * config, and default to `generic` if not specified in the config.
27
- *
28
- * Every time you call `network.connect` with an EDR network config name, a
29
- * new instance of EDR will be created. Each of these instances has its own
30
- * state and blockchain, and they have no communication with each other.
31
- *
32
- * Examples:
33
- *
34
- * - `await network.connect({network: "sepolia", chainType: "l1"})`: Connects
35
- * to the `sepolia` network config, treating it as an "l1" network.
36
- *
37
- * - `await network.connect(network: "hardhatOp", chainType: "optimism"})`:
38
- * Creates a new EDR instance in Optimism mode, using the `hardhatOp`
39
- * network config.
40
- *
41
- * - `await network.connect()`: Creates a new EDR instance with the default
42
- * network config (i.e. `hardhat`) and the `generic` chain type.
43
- *
44
- * Each network connection object has a `provider` property and other
45
- * network-related fields added by plugins, like `ethers` and `networkHelpers`.
46
- */
47
+ it("Should emit the Increment event when calling the inc() function", async function () {
48
+ const counter = await ethers.deployContract("Counter");
49
+
50
+ // Hardhat 3 comes with chai assertions to work with ethers, like `emit` here
51
+ await expect(counter.inc()).to.emit(counter, "Increment").withArgs(1n);
52
+ });
47
53
 
48
54
  it("The sum of the Increment events should match the current value", async function () {
49
55
  const counter = await ethers.deployContract("Counter");
@@ -1,4 +0,0 @@
1
- import type { HardhatPlugin } from "../../../types/plugins.js";
2
- declare const hardhatPlugin: HardhatPlugin;
3
- export default hardhatPlugin;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/verify/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,QAAA,MAAM,aAAa,EAAE,aAQpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,12 +0,0 @@
1
- import { task } from "../../core/config.js";
2
- const hardhatPlugin = {
3
- id: "builtin:verify",
4
- tasks: [
5
- task("verify")
6
- .setDescription("Not implemented yet - to be available soon")
7
- .setAction(import.meta.resolve("./task-action.js"))
8
- .build(),
9
- ],
10
- };
11
- export default hardhatPlugin;
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/verify/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,MAAM,aAAa,GAAkB;IACnC,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE;QACL,IAAI,CAAC,QAAQ,CAAC;aACX,cAAc,CAAC,4CAA4C,CAAC;aAC5D,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;aAClD,KAAK,EAAE;KACX;CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- export default function (): Promise<void>;
2
- //# sourceMappingURL=task-action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-action.d.ts","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/verify/task-action.ts"],"names":[],"mappings":"AAEA,4BAAkC,OAAO,CAAC,IAAI,CAAC,CAM9C"}
@@ -1,5 +0,0 @@
1
- import chalk from "chalk";
2
- export default async function () {
3
- console.log(chalk.yellow("This task will be implemented soon. Check back soon for more updates."));
4
- }
5
- //# sourceMappingURL=task-action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-action.js","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/verify/task-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,MAAM,CACV,uEAAuE,CACxE,CACF,CAAC;AACJ,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { HardhatPlugin } from "../../../types/plugins.js";
2
-
3
- import { task } from "../../core/config.js";
4
-
5
- const hardhatPlugin: HardhatPlugin = {
6
- id: "builtin:verify",
7
- tasks: [
8
- task("verify")
9
- .setDescription("Not implemented yet - to be available soon")
10
- .setAction(import.meta.resolve("./task-action.js"))
11
- .build(),
12
- ],
13
- };
14
-
15
- export default hardhatPlugin;
@@ -1,9 +0,0 @@
1
- import chalk from "chalk";
2
-
3
- export default async function (): Promise<void> {
4
- console.log(
5
- chalk.yellow(
6
- "This task will be implemented soon. Check back soon for more updates.",
7
- ),
8
- );
9
- }