-
Notifications
You must be signed in to change notification settings - Fork 17
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 an environment variable to .env.example for an Alchemy API key and use it hardhat config #28
Comments
I think I've understood the problem: The API is hard-coded to allow correct execution of a Github Action workflow in this repo that was triggered by a push to branch with PR in a forked repo?
I guess 2. is the issue you're having? The question is, if the user creates their own secrets in the settings of their forked repo, will the Workflow triggered in the original repo run with these settings? This is slightly inconvenient, but at least allow the secrets to be maintained correctly. And most importantly allow the workflow to execute. If not, then I don't see any way to do it cleanly; secrets will need to be declared explicitly, but it seems to make more sense do this CI yml instead of other config files? Also, if this works, if the user that forks adds their own secrets, they can run the workflow locally before creating the PR - it just needs some documentation what they require. |
I had this thought too & I remember testing this and it not working, but I may be remembering wrong. I should be trying it again. |
I was just about to test but then I realized, on second thoughts, this doesn't make sense from a security point of view either. So I really think we're stuck with hardcoded values. But I think they'd be better off in the CI yml than in hardhat config to stop the key getting clobbered too much. When a user clones, they have to add their own in their .env. |
Yes, this is the issue. Fine with hardcoding the API key as part of the CI workflow instead of the hardhat config. |
We are for now.
I'm not sure it'd help much. Hardcoded still means it's scrapable. |
Allow the user to configure an API key for an Alchemy endpoint (
ALCHEMY_POLYGON_API_KEY
) in.env.example
and use it in the project's hardhat configuration when forking Polygon for test.Currently the key is hard-coded in
hardhat.config.ts
.The text was updated successfully, but these errors were encountered: