@@ -3,6 +3,7 @@ import inquirer from "inquirer";
3
3
4
4
import Logger from "../../../utils/logger.js" ;
5
5
import { packageManagers } from "../../../utils/packageManager.js" ;
6
+ import { isPrivateKey } from "../../../utils/validators.js" ;
6
7
import { askForTemplate , setupTemplate , askForPackageManager , successfulMessage } from "../utils.js" ;
7
8
8
9
import type { GenericTemplate } from "../index.js" ;
@@ -18,14 +19,16 @@ export const templates: Template[] = [
18
19
value : "hardhat_solidity" ,
19
20
framework : "Hardhat" ,
20
21
language : "Solidity" ,
21
- git : "https://github.com/matter-labs/zksync-hardhat-template" ,
22
+ path : "templates/hardhat/solidity" ,
23
+ git : "https://github.com/matter-labs/zksync-contract-templates/" ,
22
24
} ,
23
25
{
24
26
name : "Hardhat + Vyper" ,
25
27
value : "hardhat_vyper" ,
26
28
framework : "Hardhat" ,
27
29
language : "Vyper" ,
28
- git : "https://github.com/matter-labs/zksync-hardhat-vyper-template" ,
30
+ path : "templates/hardhat/vyper" ,
31
+ git : "https://github.com/matter-labs/zksync-contract-templates/" ,
29
32
} ,
30
33
] ;
31
34
@@ -41,7 +44,13 @@ export default async (folderLocation: string, folderRelativePath: string, templa
41
44
name : "privateKey" ,
42
45
suffix : chalk . gray ( " (optional)" ) ,
43
46
type : "input" ,
44
- required : true ,
47
+ validate : ( input : string ) => {
48
+ if ( ! input ) return true ; // since it's optional
49
+ return isPrivateKey ( input ) ;
50
+ } ,
51
+ transformer : ( input : string ) => {
52
+ return input . replace ( / ./ g, "*" ) ;
53
+ } ,
45
54
} ,
46
55
] ) ;
47
56
env = {
0 commit comments