Skip to content

Commit

Permalink
feat: update tokens table schema
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsign committed Nov 30, 2023
1 parent f1d873f commit 947ab70
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/db/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export async function selectToken(client: ClickHouseClient, chainId: number, add
FROM evm_indexer2.tokens
WHERE
"chain" = {chainId: UInt64} AND
"address_short" = {addressShort: String} AND
"address" = {address: String};
`,
query_params: {
Expand All @@ -79,13 +78,12 @@ export async function selectUndecodedChainAddresses(client: ClickHouseClient, li
query: `
SELECT
"chain",
"address_short",
"address"
FROM evm_indexer2.token_transfers
WHERE ("chain", "address_short", "address") NOT IN (
SELECT "chain", "address_short", "address" FROM evm_indexer2.tokens
SELECT "chain", "address" FROM evm_indexer2.tokens
)
GROUP BY "chain", "address_short", "address"
GROUP BY "chain", "address"
LIMIT {limit: UInt32}
OFFSET {offset: UInt32};
`,
Expand Down

0 comments on commit 947ab70

Please sign in to comment.