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 private network to network enum #7

Merged
merged 7 commits into from Aug 28, 2023
Merged

Conversation

error2215
Copy link
Contributor

No description provided.

@error2215 error2215 requested a review from Kuly14 August 15, 2023 16:26
Copy link
Contributor

@Kuly14 Kuly14 left a comment

Choose a reason for hiding this comment

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

Other than the 1 suggestion I think it looks great.

corebc-core/src/types/network.rs Outdated Show resolved Hide resolved
Comment on lines -29 to -33
// We don't derive Serialize because it is manually implemented using AsRef<str> and it would
// break a lot of things since Serialize is `kebab-case` vs Deserialize `snake_case`.
// This means that the Network type is not "round-trippable", because the Serialize and Deserialize
// implementations do not use the same case style.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you find out why is this the case? It doesn't really make sense to me to make the network type not "round-trippable"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure about that, but thats what I found about this
gakonst/ethers-rs#2038 (comment)
gakonst/ethers-rs#2268 (comment)

https://github.com/gakonst/ethers-rs/pull/2270/files
Seems like it was hot-fixed and tests for "round-trippable" were added

@error2215
Copy link
Contributor Author

Also I removed utils::NetworkType and replaced it with types::Network. The same logic was written twice.
Tests pass
cargo +nightly fmt --all and cargo +nightly clippy applied

@error2215 error2215 requested a review from Kuly14 August 16, 2023 10:05
@error2215 error2215 merged commit 9d15431 into main Aug 28, 2023
@error2215 error2215 deleted the feature/private_network branch August 28, 2023 12:35
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