Skip to content

Commit

Permalink
Merge pull request #3558 from NomicFoundation/remove-solidity-survey-msg
Browse files Browse the repository at this point in the history
Remove solidity survey message
  • Loading branch information
fvictorio committed Jan 10, 2023
2 parents 2fb8044 + 72f54a0 commit 0b79475
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-seals-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Removed the message linking to the 2022 solidity survey
7 changes: 3 additions & 4 deletions docs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ export const SOCIALS_LINKS = {
[SocialsEnum.DISCORD]: "/discord",
};

export const BANNER_LINK =
"https://cryptpad.fr/form/#/2/form/view/HuPIRv4gvziSV0dPV1SJncKzYJXTVc8LGCaMfLUoj2c";
export const BANNER_LINK = "https://nomic.foundation/hiring";

export const PRIVACY_POLICY_PATH = "/privacy-policy.html";

export const bannerContent = {
text: "Please take a few minutes to complete the 2022 Solidity Survey",
shortText: "Complete the 2022 Solidity Survey here",
text: "Join the Hardhat team! Nomic Foundation is hiring",
shortText: "Join the Hardhat team! We are hiring",
href: BANNER_LINK,
};

Expand Down
12 changes: 1 addition & 11 deletions packages/hardhat-core/src/internal/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { saveFlamegraph } from "../core/flamegraph";
import { Analytics } from "./analytics";
import { ArgumentsParser } from "./ArgumentsParser";
import { enableEmoji } from "./emoji";
import { createProject, showSoliditySurveyMessage } from "./project-creation";
import { createProject } from "./project-creation";
import { confirmHHVSCodeInstallation, confirmTelemetryConsent } from "./prompt";
import {
InstallationState,
Expand Down Expand Up @@ -305,16 +305,6 @@ async function main() {
process.stdout.isTTY === true
) {
await suggestInstallingHardhatVscode();

// we show the solidity survey message if the tests failed and only
// 1/3 of the time
if (
process.exitCode !== 0 &&
Math.random() < 0.3333 &&
process.env.HARDHAT_HIDE_SOLIDITY_SURVEY_MESSAGE !== "true"
) {
showSoliditySurveyMessage();
}
}

log(`Killing Hardhat after successfully running task ${taskName}`);
Expand Down
16 changes: 0 additions & 16 deletions packages/hardhat-core/src/internal/cli/project-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,6 @@ function showStarOnGitHubMessage() {
console.log(chalk.cyan(" https://github.com/NomicFoundation/hardhat"));
}

export function showSoliditySurveyMessage() {
if (new Date() > new Date("2023-07-01 23:39")) {
// the survey has finished
return;
}

console.log();
console.log(
chalk.cyan(
"Please take a moment to complete the 2022 Solidity Survey: https://hardhat.org/solidity-survey-2022"
)
);
}

export async function createProject() {
printAsciiLogo();

Expand Down Expand Up @@ -301,7 +287,6 @@ export async function createProject() {

console.log();
showStarOnGitHubMessage();
showSoliditySurveyMessage();

return;
}
Expand Down Expand Up @@ -402,7 +387,6 @@ export async function createProject() {
console.log("See the README.md file for some example tasks you can run");
console.log();
showStarOnGitHubMessage();
showSoliditySurveyMessage();
}

async function canInstallRecommendedDeps() {
Expand Down

0 comments on commit 0b79475

Please sign in to comment.