Update ethereum-template
Remove unecessary pb module, import models from tycho-substreams instead. Integrate package directly into workspace.
This commit is contained in:
12
substreams/ethereum-template/src/modules.rs
Normal file
12
substreams/ethereum-template/src/modules.rs
Normal 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 })
|
||||
}
|
||||
Reference in New Issue
Block a user