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

feat: add FromStr impl for Chain #756

Merged
merged 2 commits into from Jan 3, 2022

Conversation

odyslam
Copy link
Contributor

@odyslam odyslam commented Jan 3, 2022

Enables foundry-rs/foundry#357

Ideally, I would prefer that the default case of the match statement is sth like Chain::UnknownChain, but I added mainnet for compatibility.

Should we add that to the enum?

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

LGTM. Used thiserror::Error for the error generation and made the function return an error when string not found

@gakonst gakonst merged commit 96ef787 into gakonst:master Jan 3, 2022
@odyslam odyslam deleted the feat/chains-fromstr branch January 5, 2022 09:43
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.

None yet

2 participants