From 1718d3bde667d83ca63ac0e8dc3699210fb1c910 Mon Sep 17 00:00:00 2001 From: billettc Date: Wed, 6 Dec 2023 12:03:06 -0500 Subject: [PATCH] not we are checking transaction status even on base block --- CHANGELOG.md | 3 +++ core/src/block_view.rs | 6 ++---- substreams-ethereum/src/lib.rs | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88f7813..b69b2b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/core/src/block_view.rs b/core/src/block_view.rs index 020fb7f..afae6cd 100644 --- a/core/src/block_view.rs +++ b/core/src/block_view.rs @@ -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 { - 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. diff --git a/substreams-ethereum/src/lib.rs b/substreams-ethereum/src/lib.rs index ed11fb4..fba8754 100644 --- a/substreams-ethereum/src/lib.rs +++ b/substreams-ethereum/src/lib.rs @@ -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;