diff --git a/ethereum-explorer/src/lib.rs b/ethereum-explorer/src/lib.rs index 62d27a0..0b9a030 100644 --- a/ethereum-explorer/src/lib.rs +++ b/ethereum-explorer/src/lib.rs @@ -1,4 +1,5 @@ mod map_block_meta; +mod map_block_full; mod map_contract_events; mod map_filter_transactions; mod pb; diff --git a/ethereum-explorer/src/map_block_full.rs b/ethereum-explorer/src/map_block_full.rs new file mode 100644 index 0000000..05ffeca --- /dev/null +++ b/ethereum-explorer/src/map_block_full.rs @@ -0,0 +1,6 @@ +use substreams_ethereum::pb::eth::v2::Block; + +#[substreams::handlers::map] +fn map_block_full(blk: Block) -> Result { + Ok(blk) +} diff --git a/ethereum-explorer/src/map_filter_transactions.rs b/ethereum-explorer/src/map_filter_transactions.rs index aa2e6ad..e4bb4dc 100644 --- a/ethereum-explorer/src/map_filter_transactions.rs +++ b/ethereum-explorer/src/map_filter_transactions.rs @@ -73,7 +73,6 @@ fn apply_filter(transaction: &TransactionTrace, filters: &TransactionFilterParam { return false; } - true } diff --git a/ethereum-explorer/substreams.yaml b/ethereum-explorer/substreams.yaml index e99db20..83f4c6a 100644 --- a/ethereum-explorer/substreams.yaml +++ b/ethereum-explorer/substreams.yaml @@ -1,8 +1,11 @@ specVersion: v0.1.0 package: - name: "substreams_template" + name: "ethereum_explorer" version: v0.1.0 +imports: + ethereum: https://github.com/streamingfast/firehose-ethereum/releases/download/v1.4.8/ethereum-v1.0.0.spkg + protobuf: files: - transaction.proto @@ -23,6 +26,14 @@ modules: - source: sf.ethereum.type.v2.Block output: 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 kind: map inputs: @@ -30,6 +41,7 @@ modules: - source: sf.ethereum.type.v2.Block output: type: proto:eth.transaction.v1.Transactions + - name: map_contract_events kind: map inputs: @@ -42,4 +54,4 @@ params: # Filtering transactions with to = 0xdAC17F958D2ee523a2206206994597C13D831ec7 (USDT contract address) map_filter_transactions: "to=0xdAC17F958D2ee523a2206206994597C13D831ec7" # Getting the logs of the BoredApeYachtClub smart contract - map_contract_events: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" \ No newline at end of file + map_contract_events: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"