Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a better mechanism for variables management #4446

Merged

Conversation

ChristopherDedominici
Copy link
Contributor

@ChristopherDedominici ChristopherDedominici commented Oct 5, 2023

Add the new feature: configuration variables.
See docs for more info: https://hardhat.org/hardhat-runner/docs/guides/configuration-variables

@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2023

🦋 Changeset detected

Latest commit: 2257ae6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 1:42pm
hardhat-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 1:42pm

packages/hardhat-core/src/internal/cli/vars.ts Outdated Show resolved Hide resolved
Comment on lines +130 to +133
const globalAsAny: any = global;
Object.entries(configEnv).forEach(
([key, value]) => (globalAsAny[key] = value)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should also indicate that this is a lightweight version of loadConfigAndTasks that duplicates some of its logic. @schaable this is a decision we consciously made; the alternative was to refactor the config-loading.ts module to make that part of the logic reusable, but that didn't seem worth the risk.

packages/hardhat-core/src/internal/cli/vars.ts Outdated Show resolved Hide resolved
packages/hardhat-core/src/internal/cli/vars.ts Outdated Show resolved Hide resolved
@fvictorio fvictorio merged commit c8609f8 into main Nov 2, 2023
@fvictorio fvictorio deleted the feature/2265-add-a-better-mechanism-for-secrets-management branch November 2, 2023 12:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants