Skip to content

Commit

Permalink
update block view rust fmt, update CHANGELOG with changes to block.tr…
Browse files Browse the repository at this point in the history
…ansactions() and preparing for release 0.9.6
  • Loading branch information
Eduard-Voiculescu committed Nov 16, 2023
1 parent 4e245d4 commit 3a87b04
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.6](https://github.com/streamingfast/substreams-ethereum/releases/tag/v0.9.6)
* Update `block_view` with updated ethereum block at `https://github.com/streamingfast/firehose-ethereum/releases/download/v2.0.0/ethereum-v1.1.0.spkg` with added field `DetailLevel`
> **_IMPORTANT:_**: Using blocks with `DetailLevel` set to `Extended` (the default level), `block.transactions()` returns only successful transactions.
> Blocks with `DetailLevel` set to `Base` does not have information about transaction successfulness. Note that a failed transaction will never have logs attached to it.
## [0.9.5](https://github.com/streamingfast/substreams-ethereum/releases/tag/v0.9.5)

* Generate ABI from bytes with method `from_bytes` of `Abigen`
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
]

[workspace.package]
version = "0.9.5"
version = "0.9.6"
edition = "2021"
description = "Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding."
homepage = "https://substreams.streamingfast.io/"
Expand All @@ -20,10 +20,10 @@ categories = ["api-bindings", "external-ffi-bindings", "wasm"]
rust-version = "1.60"

[workspace.dependencies]
substreams-ethereum = { version = "0.9.5", path = "./substreams-ethereum" }
substreams-ethereum-abigen = { version = "0.9.5", path = "./abigen" }
substreams-ethereum-core = { version = "0.9.5", path = "./core" }
substreams-ethereum-derive = { version = "0.9.5", path = "./derive" }
substreams-ethereum = { version = "0.9.6", path = "./substreams-ethereum" }
substreams-ethereum-abigen = { version = "0.9.6", path = "./abigen" }
substreams-ethereum-core = { version = "0.9.6", path = "./core" }
substreams-ethereum-derive = { version = "0.9.6", path = "./derive" }

[profile.release]
lto = true
Expand Down
4 changes: 3 additions & 1 deletion core/src/block_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ use crate::{pb::eth::v2 as pb, Event};
impl pb::Block {
/// Iterates over transactions (successful in the case of DetaillevelExtended)
pub fn transactions(&self) -> impl Iterator<Item = &pb::TransactionTrace> {
self.transaction_traces.iter().filter(|tx| tx.status == 1 || self.detail_level == pb::block::DetailLevel::DetaillevelBase.into())
self.transaction_traces.iter().filter(|tx| {
tx.status == 1 || self.detail_level == pb::block::DetailLevel::DetaillevelBase.into()
})
}

/// Iterates over transaction receipts of successful transactions.
Expand Down

0 comments on commit 3a87b04

Please sign in to comment.