Skip to content

Commit

Permalink
not we are checking transaction status even on base block
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Dec 6, 2023
1 parent 826084e commit 1718d3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ 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.7](https://github.com/streamingfast/substreams-ethereum/releases/tag/v0.9.6)
* Blocks with `DetailLevel` set to `Base` now have transaction receipt information. Transaction successfulness is not supported.

## [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.
Expand Down
6 changes: 2 additions & 4 deletions core/src/block_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ use crate::pb::eth::v2::{Call, Log};
use crate::{pb::eth::v2 as pb, Event};

impl pb::Block {
/// Iterates over transactions (successful in the case of DetaillevelExtended)
/// Iterates over successful transactions
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 })
}

/// Iterates over transaction receipts of successful transactions.
Expand Down
1 change: 1 addition & 0 deletions substreams-ethereum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

pub use substreams_ethereum_core::scalar;
pub use substreams_ethereum_core::{block_view, pb, rpc, Event, Function, NULL_ADDRESS};
pub use substreams_ethereum_derive::EthabiContract;
Expand Down

0 comments on commit 1718d3b

Please sign in to comment.