Skip to content

Commit 7625d6f

Browse files
committed
update snapshots for adding ContractTypesMap
1 parent cd60ea6 commit 7625d6f

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

packages/hardhat-viem/test/fixture-projects/type-generation/snapshots/artifacts.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ declare module "hardhat/types/artifacts" {
99
interface ArtifactsMap {
1010
B: never;
1111
}
12+
13+
interface ContractTypesMap {
14+
B: never;
15+
}
1216
}

packages/hardhat-viem/test/fixture-projects/type-generation/snapshots/contracts/A.sol/artifacts.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// eslint-disable
55

66
import "hardhat/types/artifacts";
7+
import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types";
78

89
import { A$Type } from "./A";
910
import { B$Type } from "./B";
@@ -15,4 +16,11 @@ declare module "hardhat/types/artifacts" {
1516
["contracts/A.sol:A"]: A$Type;
1617
["contracts/A.sol:B"]: B$Type;
1718
}
19+
20+
interface ContractTypesMap {
21+
["A"]: GetContractReturnType<A$Type["abi"]>;
22+
["B"]: GetContractReturnType<B$Type["abi"]>;
23+
["contracts/A.sol:A"]: GetContractReturnType<A$Type["abi"]>;
24+
["contracts/A.sol:B"]: GetContractReturnType<B$Type["abi"]>;
25+
}
1826
}

packages/hardhat-viem/test/fixture-projects/type-generation/snapshots/contracts/C.sol/artifacts.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// eslint-disable
55

66
import "hardhat/types/artifacts";
7+
import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types";
78

89
import { B$Type } from "./B";
910
import { C$Type } from "./C";
@@ -15,4 +16,11 @@ declare module "hardhat/types/artifacts" {
1516
["contracts/C.sol:B"]: B$Type;
1617
["contracts/C.sol:C"]: C$Type;
1718
}
19+
20+
interface ContractTypesMap {
21+
["B"]: GetContractReturnType<B$Type["abi"]>;
22+
["C"]: GetContractReturnType<C$Type["abi"]>;
23+
["contracts/C.sol:B"]: GetContractReturnType<B$Type["abi"]>;
24+
["contracts/C.sol:C"]: GetContractReturnType<C$Type["abi"]>;
25+
}
1826
}

0 commit comments

Comments
 (0)