Update ethereum-template

Remove unecessary pb module, import models from tycho-substreams instead.

Integrate package directly into workspace.
This commit is contained in:
kayibal
2024-03-14 12:53:12 +00:00
parent 3b51123311
commit 2e77405342
7 changed files with 23 additions and 1349 deletions

View File

@@ -0,0 +1,12 @@
use std::collections::HashMap;
use substreams_ethereum::pb::eth;
use tycho_substreams::prelude::*;
#[substreams::handlers::map]
fn map_protocol_changes(
block: eth::v2::Block,
) -> Result<BlockContractChanges, substreams::errors::Error> {
let mut transaction_contract_changes = Vec::<TransactionContractChanges>::new();
// TODO: protocol specific logic goes here
Ok(BlockContractChanges { block: Some((&block).into()), changes: transaction_contract_changes })
}