Skip to content

Commit

Permalink
refactor(protos-examples): clean up rust doc landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
suchapalaver committed Nov 26, 2024
1 parent cc03250 commit a581b20
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
3 changes: 0 additions & 3 deletions crates/firehose-protos-examples/examples/receipt_root.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//! This example demonstrates how to calculate the receipts root of a block and
//! compare it to the receipts root in the block header.
//!
use alloy_primitives::FixedBytes;
use firehose_client::{Chain, FirehoseClient};
use firehose_protos::EthBlock as Block;
Expand Down
27 changes: 27 additions & 0 deletions crates/firehose-protos-examples/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//! # Firehose Protos Examples
//!
//! Examples that use methods implemented on the Rust-compiled Firehose
//! protobuffer types from [Firehose Protos](../firehose_protos/index.html).
//!
//! ## Running Examples
//!
//! To run the examples, you need access to a Firehose provider for each chain from which you want
//! to extract data - an endpoint and an API key (if the latter is required).
//!
//! If you need access to a Firehose provider, we suggest using [Pinax](https://app.pinax.network/).
//!
//! Add your endpoint and API key to a `.env` file in the root of the repository. See `.env.examples` for
//! a configuration template.
//!
//! To run individual examples, use the following command:
//!
//! ```terminal
//! cargo run -p firehose-protos-examples --example <example_name>
//! ```
//!
//! So, for example, to run the `receipt_root` example:
//!
//! ```terminal
//! cargo run -p firehose-protos-examples --example receipt_root
//! ```
//!
5 changes: 3 additions & 2 deletions crates/forrestrie-examples/examples/receipts_proof.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! # Receipts proof given an EL block's `receipt_root``
//! # Receipts proof given an EL block's `receipt_root`
//!
//! This example shows how to generate an inclusion proof for a set of receipts of an EL block.
//!
//! This example shows how to generate an inclusion proof for a set of receipts of a EL block;
use firehose_client::{Chain, FirehoseClient};
use firehose_protos::{EthBlock as Block, FullReceipt};
Expand Down

0 comments on commit a581b20

Please sign in to comment.