Commit 7625d6f 1 parent cd60ea6 commit 7625d6f Copy full SHA for 7625d6f
File tree 3 files changed +20
-0
lines changed
packages/hardhat-viem/test/fixture-projects/type-generation/snapshots
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,8 @@ declare module "hardhat/types/artifacts" {
9
9
interface ArtifactsMap {
10
10
B : never ;
11
11
}
12
+
13
+ interface ContractTypesMap {
14
+ B : never ;
15
+ }
12
16
}
Original file line number Diff line number Diff line change 4
4
// eslint-disable
5
5
6
6
import "hardhat/types/artifacts" ;
7
+ import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types" ;
7
8
8
9
import { A$Type } from "./A" ;
9
10
import { B$Type } from "./B" ;
@@ -15,4 +16,11 @@ declare module "hardhat/types/artifacts" {
15
16
[ "contracts/A.sol:A" ] : A$Type ;
16
17
[ "contracts/A.sol:B" ] : B$Type ;
17
18
}
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
+ }
18
26
}
Original file line number Diff line number Diff line change 4
4
// eslint-disable
5
5
6
6
import "hardhat/types/artifacts" ;
7
+ import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types" ;
7
8
8
9
import { B$Type } from "./B" ;
9
10
import { C$Type } from "./C" ;
@@ -15,4 +16,11 @@ declare module "hardhat/types/artifacts" {
15
16
[ "contracts/C.sol:B" ] : B$Type ;
16
17
[ "contracts/C.sol:C" ] : C$Type ;
17
18
}
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
+ }
18
26
}
You can’t perform that action at this time.
0 commit comments