File tree 5 files changed +38
-6
lines changed
packages/hardhat-core/src/internal/cli
5 files changed +38
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " hardhat " : patch
3
+ ---
4
+
5
+ Added a temporary message about the 2023 Solidtiy Developer Survey
Original file line number Diff line number Diff line change @@ -100,9 +100,9 @@ const customRedirects = [
100
100
permanent : false ,
101
101
} ,
102
102
{
103
- source : "/solidity-survey-2022 " ,
103
+ source : "/solidity-survey-2023 " ,
104
104
destination :
105
- "https://cryptpad.fr/form/#/2/form/view/HuPIRv4gvziSV0dPV1SJncKzYJXTVc8LGCaMfLUoj2c/ " ,
105
+ "https://cryptpad.fr/form/#/2/form/view/pV-DdryeJoYUWvW+gXsFaMNynEY7t5mUsgeD1urgwSE " ,
106
106
permanent : false ,
107
107
} ,
108
108
{
Original file line number Diff line number Diff line change @@ -22,13 +22,14 @@ export const SOCIALS_LINKS = {
22
22
[ SocialsEnum . DISCORD ] : "/discord" ,
23
23
} ;
24
24
25
- export const BANNER_LINK = "https://nomic.foundation/hiring" ;
25
+ export const BANNER_LINK =
26
+ "https://cryptpad.fr/form/#/2/form/view/pV-DdryeJoYUWvW+gXsFaMNynEY7t5mUsgeD1urgwSE" ;
26
27
27
28
export const PRIVACY_POLICY_PATH = "/privacy-policy.html" ;
28
29
29
30
export const bannerContent = {
30
- text : "Join the Hardhat team! Nomic Foundation is hiring " ,
31
- shortText : "Join the Hardhat team! We are hiring " ,
31
+ text : "Please take a few minutes to complete the 2023 Solidity Survey " ,
32
+ shortText : "Complete the 2023 Solidity Survey here " ,
32
33
href : BANNER_LINK ,
33
34
} ;
34
35
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import { saveFlamegraph } from "../core/flamegraph";
42
42
import { Analytics } from "./analytics" ;
43
43
import { ArgumentsParser } from "./ArgumentsParser" ;
44
44
import { enableEmoji } from "./emoji" ;
45
- import { createProject } from "./project-creation" ;
45
+ import { createProject , showSoliditySurveyMessage } from "./project-creation" ;
46
46
import { confirmHHVSCodeInstallation , confirmTelemetryConsent } from "./prompt" ;
47
47
import {
48
48
InstallationState ,
@@ -358,6 +358,16 @@ async function main() {
358
358
) {
359
359
await suggestInstallingHardhatVscode ( ) ;
360
360
361
+ // we show the solidity survey message if the tests failed and only
362
+ // 1/3 of the time
363
+ if (
364
+ process . exitCode !== 0 &&
365
+ Math . random ( ) < 0.3333 &&
366
+ process . env . HARDHAT_HIDE_SOLIDITY_SURVEY_MESSAGE !== "true"
367
+ ) {
368
+ showSoliditySurveyMessage ( ) ;
369
+ }
370
+
361
371
// we show the viaIR warning only if the tests failed
362
372
if ( process . exitCode !== 0 ) {
363
373
showViaIRWarning ( resolvedConfig ) ;
Original file line number Diff line number Diff line change @@ -362,6 +362,20 @@ function showStarOnGitHubMessage() {
362
362
console . log ( chalk . cyan ( " https://github.com/NomicFoundation/hardhat" ) ) ;
363
363
}
364
364
365
+ export function showSoliditySurveyMessage ( ) {
366
+ if ( new Date ( ) > new Date ( "2024-01-07 23:39" ) ) {
367
+ // the survey has finished
368
+ return ;
369
+ }
370
+
371
+ console . log ( ) ;
372
+ console . log (
373
+ chalk . cyan (
374
+ "Please take a moment to complete the 2023 Solidity Survey: https://hardhat.org/solidity-survey-2023"
375
+ )
376
+ ) ;
377
+ }
378
+
365
379
export async function createProject ( ) {
366
380
printAsciiLogo ( ) ;
367
381
@@ -407,6 +421,7 @@ export async function createProject() {
407
421
408
422
console . log ( ) ;
409
423
showStarOnGitHubMessage ( ) ;
424
+ showSoliditySurveyMessage ( ) ;
410
425
411
426
return ;
412
427
}
@@ -512,6 +527,7 @@ export async function createProject() {
512
527
console . log ( "See the README.md file for some example tasks you can run" ) ;
513
528
console . log ( ) ;
514
529
showStarOnGitHubMessage ( ) ;
530
+ showSoliditySurveyMessage ( ) ;
515
531
}
516
532
517
533
async function canInstallRecommendedDeps ( ) {
You can’t perform that action at this time.
0 commit comments