View full block with map_block_full.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
mod map_block_meta;
|
mod map_block_meta;
|
||||||
|
mod map_block_full;
|
||||||
mod map_contract_events;
|
mod map_contract_events;
|
||||||
mod map_filter_transactions;
|
mod map_filter_transactions;
|
||||||
mod pb;
|
mod pb;
|
||||||
|
|||||||
6
ethereum-explorer/src/map_block_full.rs
Normal file
6
ethereum-explorer/src/map_block_full.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
use substreams_ethereum::pb::eth::v2::Block;
|
||||||
|
|
||||||
|
#[substreams::handlers::map]
|
||||||
|
fn map_block_full(blk: Block) -> Result<Block, substreams::errors::Error> {
|
||||||
|
Ok(blk)
|
||||||
|
}
|
||||||
@@ -73,7 +73,6 @@ fn apply_filter(transaction: &TransactionTrace, filters: &TransactionFilterParam
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "substreams_template"
|
name: "ethereum_explorer"
|
||||||
version: v0.1.0
|
version: v0.1.0
|
||||||
|
|
||||||
|
imports:
|
||||||
|
ethereum: https://github.com/streamingfast/firehose-ethereum/releases/download/v1.4.8/ethereum-v1.0.0.spkg
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
- transaction.proto
|
- transaction.proto
|
||||||
@@ -23,6 +26,14 @@ modules:
|
|||||||
- source: sf.ethereum.type.v2.Block
|
- source: sf.ethereum.type.v2.Block
|
||||||
output:
|
output:
|
||||||
type: proto:eth.block_meta.v1.BlockMeta
|
type: proto:eth.block_meta.v1.BlockMeta
|
||||||
|
|
||||||
|
- name: map_block_full
|
||||||
|
kind: map
|
||||||
|
inputs:
|
||||||
|
- source: sf.ethereum.type.v2.Block
|
||||||
|
output:
|
||||||
|
type: proto:sf.ethereum.type.v2.Block
|
||||||
|
|
||||||
- name: map_filter_transactions
|
- name: map_filter_transactions
|
||||||
kind: map
|
kind: map
|
||||||
inputs:
|
inputs:
|
||||||
@@ -30,6 +41,7 @@ modules:
|
|||||||
- source: sf.ethereum.type.v2.Block
|
- source: sf.ethereum.type.v2.Block
|
||||||
output:
|
output:
|
||||||
type: proto:eth.transaction.v1.Transactions
|
type: proto:eth.transaction.v1.Transactions
|
||||||
|
|
||||||
- name: map_contract_events
|
- name: map_contract_events
|
||||||
kind: map
|
kind: map
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
Reference in New Issue
Block a user