Skip to content

Commit

Permalink
pull chain from module_hashes instead of blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Dec 1, 2023
1 parent 20dcf4f commit cecc658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clickhouse/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ClickhouseStore {
public get chains() {
if (!this.chainsPromise) {
this.chainsPromise = readOnlyClient
.query({ query: "SELECT DISTINCT chain FROM blocks", format: "JSONEachRow" })
.query({ query: "SELECT DISTINCT chain FROM module_hashes", format: "JSONEachRow" })
.then((response) => response.json<Array<{ chain: string }>>())
.then((chains) => chains.map(({ chain }) => chain))
.catch(() => []);
Expand Down

0 comments on commit cecc658

Please sign in to comment.