Skip to content

Commit

Permalink
update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 28, 2024
1 parent 4b738ca commit f35c539
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: --final-blocks-only --undo-buffer-size 100 --on-module-hash-mistmatch=warn --batch-block-flush-interval 1000
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

.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 @@ -83,6 +83,6 @@ CREATE TABLE IF NOT EXISTS balance_changes
reason Int32
)
ENGINE = ReplacingMergeTree()
PRIMARY KEY (block_date, block_time, block_number, log_index, tx_hash)
ORDER BY (block_date, block_time, block_number, log_index, tx_hash)
PRIMARY KEY (block_date, block_time, block_number, ordinal)
ORDER BY (block_date, block_time, block_number, ordinal)
COMMENT 'Ethereum balance changes';
2 changes: 1 addition & 1 deletion blocks/evm/src/balance_changes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use common::keys::balance_changes_keys;
use common::sinks::insert_timestamp;
use common::utils::bytes_to_hex;
use common::{keys::balance_changes_keys, utils::optional_bigint_to_string};
use substreams::pb::substreams::Clock;
use substreams_database_change::pb::database::{table_change, DatabaseChanges};
use substreams_ethereum::pb::eth::v2::Block;
Expand Down

0 comments on commit f35c539

Please sign in to comment.