-
Notifications
You must be signed in to change notification settings - Fork 397
docs(provider): add usage examples to provider README #2313
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yash-atreya should we do this, given that we already have this in the book?
crates/provider/README.md
Outdated
use alloy_primitives::Address; | ||
|
||
#[tokio::main] | ||
async fn main() -> anyhow::Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should juse just Box<dyn Error>
here
I don't think it makes sense, I would just link to the book instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're currently in the process of updating the alloy book https://alloy.rs/ , we should link to the examples in the book.
Like this? or in the book repository? |
* docs(provider): add usage examples to provider README * Update README.md * Update README.md
Motivation
The provider README.md file contained a TODO placeholder in the usage section without any actual examples. This made it difficult for new users to understand how to use the alloy-provider crate effectively. Clear documentation with usage examples is essential for developer adoption and understanding of the library's capabilities.
Solution
Added comprehensive usage examples to the provider README.md file, replacing the "TODO :)" with actual code samples. The examples demonstrate:
These examples cover the most common use cases and provide a good starting point for users of the alloy-provider crate.
PR Checklist