Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Dec 15, 2024
1 parent af2ac8e commit ea5be9a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -829,4 +829,4 @@ adapters/**/*.jsonl
*.sublime*

# parquet-sink-files state file
*state.yaml
*state*.yaml
2 changes: 1 addition & 1 deletion blocks/evm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ parquet:

.PHONY: s3
s3:
substreams-sink-files run "$(NETWORK).substreams.pinax.network:443" substreams.yaml map_events "s3://pinax/$(NETWORK)/$(HASH)?region=us-east-1" 0: --encoder parquet --parquet-default-column-compression snappy --file-block-count 100
substreams-sink-files run "$(NETWORK).substreams.pinax.network:443" substreams.yaml map_events "s3://pinax/$(NETWORK)/$(HASH)?region=us-east-1" 0: --encoder parquet --parquet-default-column-compression snappy --file-block-count 100 --state-store "$(NETWORK).state.yaml"
220 changes: 0 additions & 220 deletions blocks/evm/schema.snowflake.sql

This file was deleted.

25 changes: 19 additions & 6 deletions snowflake/ethereum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Try 30 day limited trial access to the dataset on the [Snowflake Data Marketplac
SELECT
date_trunc('minute', block_time) AS minute,
count(distinct "from") AS user
FROM ethereum.transactions
WHERE block_date = '2024-10-01'
FROM eth.transactions
WHERE block_date = '2024-11-01'
GROUP BY minute
ORDER BY minute ASC;
```
Expand All @@ -36,25 +36,38 @@ ORDER BY minute ASC;
SELECT
"to" AS contract,
count(*) AS transactions
FROM ethereum.transactions
WHERE block_date = '2024-10-01'
FROM eth.transactions
WHERE block_date = '2024-11-01'
GROUP BY contract
ORDER BY transactions DESC
LIMIT 10;
```

**View the first and last block indexed**

> This query tells you how fresh the data is.
```sql
SELECT
MIN(number) AS "First block",
MAX(number) AS "Newest block",
COUNT(1) AS "Total number of blocks"
FROM
eth.blocks
```

**ERC-20 Transfers**

```sql
SELECT
block_date,
count(*) as total
FROM
ethereum.traces
eth.traces
WHERE
tx_success = true AND
SUBSTR(input, 1, 10) IN ('0xa9059cbb', '0x23b872dd') // Transfer and TransferFrom
AND block_date >= '2024-09-01' AND block_date <= '2024-09-07'
AND block_date >= '2024-11-01' AND block_date <= '2024-12-01'
GROUP BY block_date
ORDER BY block_date
```
Expand Down

0 comments on commit ea5be9a

Please sign in to comment.