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

Handle 0x prefix str for Address #223

Closed
yanganto opened this issue Oct 8, 2021 · 2 comments · Fixed by #227
Closed

Handle 0x prefix str for Address #223

yanganto opened this issue Oct 8, 2021 · 2 comments · Fixed by #227
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest lable for Hacktoberfest
Projects

Comments

@yanganto
Copy link
Member

yanganto commented Oct 8, 2021

Currently, Address type can use from_str to build the instance, for example.

let charman_address = Address::from_str("8663DBF0cC68AaF37fC8BA262F2df4c666a41993")?;

The API just fit and easily for the developer using web3.js before.

And there is a similar another API in Rust crate web3.

let charman_address = Address::from_str("0x8663DBF0cC68AaF37fC8BA262F2df4c666a41993")?;

So it is good to make this the 0x prefix input also work in sewup, such that developer can use this much easier.

@yanganto yanganto added enhancement New feature or request good first issue Good for newcomers Hacktoberfest lable for Hacktoberfest labels Oct 8, 2021
@yanganto yanganto added this to To do in DX via automation Oct 8, 2021
@carlosfrodrigues
Copy link
Contributor

I can take this issue! Can you assign this for me?

@yanganto
Copy link
Member Author

Hey @carlosfrodrigues,
If you run into problems, you are welcome to ask help here.
😄

DX automation moved this from To do to Done Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest lable for Hacktoberfest
Projects
DX
Done
Development

Successfully merging a pull request may close this issue.

2 participants