add solana explorer subtreams

This commit is contained in:
colindickson
2023-10-31 12:01:30 -04:00
parent b71364d5a1
commit 91648b12e8
19 changed files with 1364 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
use substreams_solana::pb::sf::solana::r#type::v1::Block;
use crate::pb::sol::block_meta::v1::BlockMeta;
#[substreams::handlers::map]
fn map_block_meta(blk: Block) -> Result<BlockMeta, substreams::errors::Error> {
Ok(BlockMeta {
slot: blk.slot,
hash: blk.blockhash,
parent_hash: blk.previous_blockhash,
})
}