diff --git a/website/pages/en/substreams.mdx b/website/pages/en/substreams.mdx index a838a6924e2f..6385439f89f0 100644 --- a/website/pages/en/substreams.mdx +++ b/website/pages/en/substreams.mdx @@ -14,17 +14,17 @@ Substreams is a powerful blockchain indexing technology designed to enhance perf 1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash). -```rust -fn get_my_block(blk: Block) -> Result { - let header = blk.header.as_ref().unwrap(); - - Ok(MyBlock { - number: blk.number, - hash: Hex::encode(&blk.hash), - parent_hash: Hex::encode(&header.parent_hash), - }) -} -``` + ```rust + fn get_my_block(blk: Block) -> Result { + let header = blk.header.as_ref().unwrap(); + + Ok(MyBlock { + number: blk.number, + hash: Hex::encode(&blk.hash), + parent_hash: Hex::encode(&header.parent_hash), + }) + } + ``` 2. **You wrap up your Rust program into a WASM module just by running a single CLI command.**