Files
tycho-protocol-sdk/substreams/ethereum-template/src/modules.rs
kayibal 2e77405342 Update ethereum-template
Remove unecessary pb module, import models from tycho-substreams instead.

Integrate package directly into workspace.
2024-03-14 12:53:12 +00:00

13 lines
479 B
Rust

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 })
}