Skip to content

Commit

Permalink
replace graph_out with map_clock
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 7, 2024
1 parent 5ec2a32 commit 7f50988
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ info:

.PHONY: run
run:
substreams run -e eth.substreams.pinax.network:443 graph_out -s -100
substreams run -e eth.substreams.pinax.network:443 map_clock -s -100 --production-mode

.PHONY: gui
gui:
substreams gui -e eth.substreams.pinax.network:443 graph_out -s 1000 -t 1001
substreams gui -e eth.substreams.pinax.network:443 map_clock -s 1 -t 100000 --production-mode

.PHONY: deploy
deploy:
Expand Down
4 changes: 2 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn block_index(min_block: Deltas<DeltaInt64>) -> Result<Keys, Error> {
Ok(match min_block.deltas[0].operation != Operation::Create {
true => Keys::default(),
false => Keys {
keys: vec!["clock".to_string()],
keys: vec!["daily".to_string()],
},
})
}
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mod sinks;
mod maps;
mod index;
mod stores;
7 changes: 7 additions & 0 deletions src/maps.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use substreams::errors::Error;
use substreams::pb::substreams::Clock;

#[substreams::handlers::map]
pub fn map_clock(clock: Clock) -> Result<Clock, Error> {
Ok(clock)
}
21 changes: 0 additions & 21 deletions src/sinks.rs

This file was deleted.

6 changes: 3 additions & 3 deletions substreams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ modules:
output:
type: proto:sf.substreams.index.v1.Keys

- name: graph_out
- name: map_clock
kind: map
inputs:
- source: sf.substreams.v1.Clock
blockFilter:
module: block_index
query:
string: clock
string: daily
params: false
output:
type: proto:sf.substreams.sink.entity.v1.EntityChanges
type: proto:sf.substreams.v1.Clock

0 comments on commit 7f50988

Please sign in to comment.