Skip to content

feat: impl FromEnv for SignetConstants types #26

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

Merged
merged 6 commits into from
May 21, 2025

Conversation

anna-carroll
Copy link
Contributor

@anna-carroll anna-carroll commented May 21, 2025

impl FromEnv for SignetConstants types using their FromEnvVar implementation on the CHAIN_NAME. fallback to loading each prop from environment variables if CHAIN_NAME is not present.

@anna-carroll anna-carroll self-assigned this May 21, 2025
@prestwich
Copy link
Member

TODO: is there a way to implement the fallback "sad path" - the case where CHAIN_NAME is missing and we want to load every prop - using the macro?

no there isn't without writing a proc macro (do not do this)

@anna-carroll anna-carroll marked this pull request as ready for review May 21, 2025 15:32
@anna-carroll anna-carroll merged commit 44fefe5 into anna/constants-from-env May 21, 2025
6 checks passed
@anna-carroll anna-carroll deleted the anna/constants-from-env-2 branch May 21, 2025 15:32
anna-carroll added a commit that referenced this pull request May 23, 2025
* feat: FromEnvVar for SignetConstants types

* feat: impl FromEnv for SignetConstants types (#26)

* feat: impl FromEnv for SignetConstants types

* feat: full implementation

* comments

* docs, import

* fix: fmt

* fix: add alloy feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants