Skip to content

Commit

Permalink
update sql
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 25, 2024
1 parent 01b7616 commit eb63996
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion blocks/evm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sql-setup:

.PHONY: sql-run
sql-run:
substreams-sink-sql run clickhouse://default:default@localhost:9000/default substreams.yaml -e eth.substreams.pinax.network:443 1:10000 --final-blocks-only --undo-buffer-size 1000 --plaintext
substreams-sink-sql run clickhouse://default:default@localhost:9000/default substreams.yaml -e eth.substreams.pinax.network:443 1:10000 --final-blocks-only --undo-buffer-size 10 --on-module-hash-mistmatch=ignore

.PHONY: deploy
deploy:
Expand Down
4 changes: 2 additions & 2 deletions blocks/evm/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ CREATE TABLE IF NOT EXISTS logs
block_time DateTime,
block_number UInt64,
block_hash String,
block_date Date,
contract_address String,
topic0 String,
topic1 String,
topic2 String,
topic3 String,
data String,
tx_hash String,
log_index UInt32,
tx_hash String,
tx_index UInt32,
block_date Date,
tx_from String,
tx_to String

Expand Down
2 changes: 1 addition & 1 deletion common/src/sinks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::utils::block_time_to_date;

pub fn insert_timestamp(row: &mut TableChange, clock: &Clock, is_block: bool) {
let timestamp = clock.clone().timestamp.unwrap();
let block_time = timestamp.to_string();
let block_time = timestamp.seconds.to_string();
let block_number = clock.number.to_string();
let block_hash = format!("0x{}", clock.id);
let block_date = block_time_to_date(block_time.as_str());
Expand Down

0 comments on commit eb63996

Please sign in to comment.