diff --git a/blocks/evm/Makefile b/blocks/evm/Makefile index 64caf20..bd4026c 100644 --- a/blocks/evm/Makefile +++ b/blocks/evm/Makefile @@ -23,7 +23,7 @@ info: .PHONY: run run: - substreams run -e eth.substreams.pinax.network:443 ch_out -s 1500000 -t 1500001 -o json + substreams run -e eth.substreams.pinax.network:443 ch_out -s 9 -t 10 -o json .PHONY: gui gui: @@ -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: --final-blocks-only --undo-buffer-size 100 --on-module-hash-mistmatch=warn --batch-block-flush-interval 1000 --development-mode + substreams-sink-sql run clickhouse://default:default@localhost:9000/default substreams.yaml -e eth.substreams.pinax.network:443 1: --final-blocks-only --undo-buffer-size 100 --on-module-hash-mistmatch=warn --batch-block-flush-interval 10 --development-mode .PHONY: deploy deploy: diff --git a/blocks/evm/schema.sql b/blocks/evm/schema.sql index c5203a0..c390ef3 100644 --- a/blocks/evm/schema.sql +++ b/blocks/evm/schema.sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS blocks ( time DateTime('UTC'), number UInt64, - date LowCardinality(String), + date Date, hash String, parent_hash String, nonce UInt64, @@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS logs block_time DateTime('UTC'), block_number UInt64, block_hash String, - block_date LowCardinality(String), + block_date Date, contract_address String, topic0 String, topic1 String DEFAULT '', @@ -75,7 +75,7 @@ CREATE TABLE IF NOT EXISTS balance_changes block_time DateTime('UTC'), block_number UInt64, block_hash String, - block_date LowCardinality(String), + block_date Date, address String, new_value UInt256, old_value UInt256, diff --git a/blocks/evm/src/lib.rs b/blocks/evm/src/lib.rs index c1a0e91..44e4101 100644 --- a/blocks/evm/src/lib.rs +++ b/blocks/evm/src/lib.rs @@ -2,3 +2,5 @@ mod balance_changes; mod blocks; mod logs; mod sinks; +// mod traces; +// mod transactions; diff --git a/common/src/sinks.rs b/common/src/sinks.rs index 9eece0d..e78fd53 100644 --- a/common/src/sinks.rs +++ b/common/src/sinks.rs @@ -11,9 +11,8 @@ pub fn insert_timestamp(row: &mut TableChange, clock: &Clock, is_block: bool) { let block_hash = format!("0x{}", clock.id); let prefix = if is_block { "" } else { "block_" }; - row - .change(format!("{}date", prefix).as_str(), ("", block_date.as_str())) + row.change(format!("{}date", prefix).as_str(), ("", block_date.as_str())) .change(format!("{}time", prefix).as_str(), ("", block_time.as_str())) .change(format!("{}number", prefix).as_str(), ("", block_number.as_str())) .change(format!("{}hash", prefix).as_str(), ("", block_hash.as_str())); -} \ No newline at end of file +}