Minor fixes

This commit is contained in:
Enol Álvarez
2023-07-20 02:01:14 +02:00
parent 9afafb3421
commit 58e2534e9b
3 changed files with 8 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ The Ethereum Explorer consists of several Substreams modules showcasing the most
## Before You Begin
Make sure you have the [Substreams CLI installed](https://substreams.streamingfast.io/getting-started/installing-the-cli), and you know the [basic structure of a Substreams module](https://substreams.streamingfast.io/getting-started/quickstart).
Make sure you have the [Substreams CLI installed](https://substreams.streamingfast.io/getting-started/installing-the-cli), and you know the [basic structure of a Substreams module](https://substreams.streamingfast.io/getting-started/quickstart). You must also provide an [authentication token](https://substreams.streamingfast.io/reference-and-specs/authentication).
## Modules

View File

@@ -17,6 +17,13 @@ use crate::pb::eth::event::v1::Events;
substreams_ethereum::init!();
#[substreams::handlers::map]
fn map_block_meta(blk: Block) -> Result<BlockMeta, substreams::errors::Error> {
let block_meta = block_meta::map_block_meta(&blk);
Ok(block_meta)
}
#[substreams::handlers::map]
pub fn map_filter_transaction(transaction_hash: String, blk: Block) -> Result<TransactionOption, substreams::errors::Error> {
let filtered_transaction = filter_transaction::filter_by_transaction_hash(transaction_hash, &blk);
@@ -31,10 +38,3 @@ fn map_contract_events(contract_address: String, blk: Block) -> Result<Events, s
Ok(events)
}
#[substreams::handlers::map]
fn map_block_meta(blk: Block) -> Result<BlockMeta, substreams::errors::Error> {
let block_meta = block_meta::map_block_meta(&blk);
Ok(block_meta)
}

View File

@@ -13,12 +13,8 @@ pub fn map_contract_events(contract_address: String, blk: &Block) -> Events {
let to = Hex(&tr.to).to_string();
if to == contract_address {
//substreams::log::info!(hash);
let transaction_events = &mut get_transaction_events(&tr);
events.append(transaction_events);
substreams::log::info!("//////////////////");
}
}